u/LlaroLlethri

▲ 5 r/gameenginedevs+2 crossposts

Publishing Freehold Games for the Raspberry Pi 5

Greetings you beautiful bastards.

[Steve Ballmer voice] "DEVELOPERS! DEVELOPERS! DEVELOPERS! ..."

I’ve been working on a C++/Vulkan game engine for the past few months with the ultimate goal of producing a game similar to Morrowind - although initially just a “vertical slice”, i.e. all gameplay systems in place, but only a small amount of content, such as a single village.

A few months ago I wrote about the concept of freehold software, which was well received here and on Hacker News. Essentially, it’s a term I coined to refer to old-school software that is free from micro-transactions, ads, “active” DRM, and remote servers (unless the server side component is made available for self-hosting) - or anything that threatens the user’s long term ownership of the application. These concerns overlap somewhat with those of the Stop Killing Games movement. Indeed, the modern state of gaming is particularly depressing to me and I've been feeling increasingly nostalgic about older console generations. I even repurchased an original Xbox recently.

It got me thinking about how great it would be if a company were to create a new console built on freehold principles. This is wildly unrealistic, but let me describe to you my fantasy for this hypothetical console: It would be a powerful, modern system, not just some retro or indie gaming machine. It would support physical media only. Yes, that's right - no option to download games at all. Publishing over the air updates would also be prohibited. That means no bugfixes. Once the developer submits their final build to the publisher, that's it - so it better be finished! This would force developers to care once again about the quality of their games on launch. At least, that's the idea. What would likely happen in reality is that developers would release their games for this console later than for other platforms (if at all). Still a win, IMO. Games would not be allowed to contain ads (except maybe placement ads) or micro-transactions. Games with online multiplayer (or any online component) would have to make their server-side software available (also on physical media, but part of a separate purchase), so the community can re-host the server if the official one ever goes offline.

Naturally, many people would hate this idea, but many like me would love it. Are there enough weirdos like me to make this idea viable? No, hence why it will forever remain a fantasy.

Another aspect of modern software I despise is bloat. I hate that we waste such powerful hardware with crap, slow software. People will say that businesses have to make a trade-off between optimising for performance and optimising for development cost, and they often choose the latter. This is true, obviously, but I don’t like this excuse. I distrust anyone who doesn’t share my lamentations about this sad state of affairs. Good engineering is about minimalism and elegance. What kind of engineer are you if shipping bloated slop doesn’t cause you to die a little inside?

About 20 years ago I aspired to be like John Carmack, pushing the boundaries of what’s possible by squeezing every last ounce of performance from a piece of hardware. Sadly, my career thus far hasn’t really provided much of that kind of development, so I have to do it in my own time.

To that end then, I needed a fairly constrained hardware platform to use as a performance target. I chose the 1 GB Raspberry Pi 5 as it was cheap (£43 for the board) and has good Vulkan support despite its limited capabilities. The plan is to provide a Raspberry Pi 5 edition of the game in a nice box (with a paper map!) on a micro SD card, which will have a very minimal custom Linux image on it - no window manager or desktop environment (gotta get the most out of that 1 GB!) - and the game will run automatically on start up. I will display a splash screen to hide the usual boot sequence and will attempt to hide the BIOS splash too if possible. This way, the user experience would be like playing an old games console: insert the game, power on the machine, play the game. I’ve already got the engine working on the Pi running Raspberry Pi Lite, so I just need to build a custom Linux image. Micro SD cards can be quite cheap if bought in bulk.

This idea ticks a number of boxes:

  • I get to do the kind of software development I love.
  • Ultimately, it results in better performance and quality of the engine and game.
  • It aligns with my freehold software principles. The game will continue to work forever.
  • It provides the nostalgic gaming experience that I desperately miss - physical media, box, manual, map, etc.

And it got me thinking: The Raspberry Pi 5 may not be the dream console I was fantasising about, but there's nothing to stop indie developers collectively deciding to build games for it and from creating games that conform to freehold principles. These are orthogonal concepts, of course - one could release for the Pi 5 while still incorporating micro-transactions and ads into their games. I'm basically trying to test the waters for a dev community that builds freehold games for the Raspberry Pi 5.

From a technical point of view, it's not too difficult. If you're using C++, you'll need to cross-compile for arm64. If using Vulkan, the way you obtain a VkSurface is different. For user input, you won't be able to use libraries like GLFW. I'm using libevdev. You can refer to the Lithic3D source for how exactly I do it. I have a docker environment set up, so making a build is as simple as:

./start_pi5_env.sh ../relative/path/to/project
LITHIC3D_PROJECT=../game cmake --workflow --preset=pi5-debug

Then I scp the build to the device. This is only during development as the release image won't have an ssh server. My device is currently running Raspberry Pi OS Lite, but the final release image will probably not even include the linux networking stack as my game doesn't require internet access.

If there is sufficient interest I could set up a forum or subreddit. Let me know what you think.

Cheers.

reddit.com
u/LlaroLlethri — 8 days ago

I have an app that has failed review a few times due to crashing. It works fine on my Pixel 7a and on all the simulated devices I've tried, but apparently crashed during review. I'd appreciate if you could just try it and see if it runs. If it crashes, I should get a stack trace sent to my Firebase dashboard, which will be very useful.

Google group: https://groups.google.com/g/minefield_testers

Play store link: https://play.google.com/store/apps/details?id=com.freeholdapps.minefield

Thanks

reddit.com
u/LlaroLlethri — 25 days ago