Twenty years ago, during my college days, I dabbled in developing games for Palm OS. The best result of my efforts was a strategy game.
Mankind's Conquest, free download on PalmDB
If you are unfamiliar with Palm OS, it was a hugely popular mobile operating system for PDA's back in the 90's and early 00's.
Since I've been restoring some Palm PDA devices lately, I started wondering what it would take to make a game for Palm PDA's again.
A week or two of playing around and getting familiar again with the system API's and architecture, I ended up with a very spartan MiniGolf game:
Video demo of a very early alpha
Screenshot if you can't play the video
I don't have any source code anymore (or I can't find it at least) for my old projects, nor hardware that I used back then, so I had to do this from scratch.
Here's what I remember though about the dev environment that I had:
- An IBM 486 box - Running Slackware Linux - PRC Tools (C compiler, linker, everything you need to compile an app) - Software SDK of Palm
The best news is that developing a PalmOS game can be done on modern hardware, that saves me allot of time not having to deal with virtual machines or having to set up an old pc running Linux.
For getting a working compiler, I used prc-tools-remix, which is the same old compiler as in the old days, but it's updated to work on a modern day Linux or OS X system.
It includes a hello world example to verify that everything is working as expected.
Having recently played a MiniGolf game on the Mac Classic, I had MiniGolf on my mind. Runner up's were petanque and curling ;)
Might not have been the best choice to start of with though, since most of the time spent on the project had to do with angle calculation.
I want the game to run on 1999 era Palm devices. This means aiming to support OS3.5 through OS5, covering a wide range of devices from the Palm III, all the way to the fabulous Tungsten devices of the mid to late 00's.
Once all the technical setup was met, it was time to do some coding.
Programming language of choice is good old C, I did try to incorporate some newer concepts, like Coordinators. Mainly ensuring a separation of concerns.
'Old' C does have some annoyances, like the need to declare your variables on top of your current code block.
When going through other Palm OS projects on GitHub, looking for references on how stuff was done, something I often saw was huge monolithic blocks of code in one file.
That's something that won't fly anymore in any modern development team. But I guess most of those projects back then just had one person behind them.
Every level currently just consists of 3 things:
- A list of walls (coordinates for lines) from which the ball will bounce off from when it hits them
- The starting position of the golf ball
- The position of the hole
Once the user touches the screen, a line is drawn from the ball to the touched location. The longer this line is, the further the ball will travel.
When the user lifts up the stylus, the full trajectory of the ball is calculated and then the ball is launched.
Since we have to handle allot of angle calculations, it was necessary to see if the complete trajectory after launching a ball was created correctly.
When running the debug build, it will show the complete trajectory drawn out on the screen.
Debugging right now is allot of trial and error, fortunately the entire app compiles in a second or two so I don't have to wait very long.
There are a couple of things I would like to get ready before releasing a beta:
- Support loading levels from a database file (PDB)
- Add a level editor
- Add a viewport so you can scroll through bigger maps
A follow up to this post is now available!
Holy smokes, I just released a MiniGolf game for Palm OS in 2024
You can get in touch through Mastodon:
Retro Coding Like It's 1999: My Journey into creating a Palm OS MiniGolf Game was published on 2024-07-18