May's Program: Up-Cake

Well it is getting late in the month and I didn’t want to pull another last-minute update…

Still Celebrating Programing, Elsewhere!

Iíve paused updating this site to focus instead on my primary domain over at You can still read what crazy program Iíve published this month. Even better, read a few other articles!

[Up-Cake, 1985]Well it is getting late in the month and I didn’t want to pull another last-minute update. To make things a bit interesting, I used Zed Ex on my Android tablet to enter in this month’s entry. More on that in a bit. Let me first introduce our deliciously short entry for May: Up-Cake. A fast and simple scrolling game that is easy to play and hard to lose at. My kind of game!

As I mentioned, I used the ZX81 Android emulator to enter in this month’s program. Although I had dabbled with Zed Ex running programs, I really hadn’t used it write one. Using Zed Ex was surprisingly easy and I felt like I was back on my original ZX81. I use a 10” Toshiba Thrive. Flipping it into landscape mode, the keyboard shows at the bottom of the screen. By doing so the touch screen is very much like the old membrane keyboard. The size is just about right on my tablet. I even messed up when pressing some of the keys, just like I would back in the day. The only annoyance I had to overcome was the use of the shift key. On the original ZX81, you had to hold down the shift to use it. Zed Ex requires you to tap the shift key then touch the next key. It wasn’t hard to get used to, but it did make deleting or moving around a bit harder. I basically had to hit each key twice. Overall though, I found Zed Ex responsive and a joy to use.

Now one problem I did have to overcome was the fact that Zed Ex saves the programs in the root directory of my device. Not really a big deal as I thought I could move it to my external SD card and then transfer it to my computer. Sadly, that didn’t work and I’ll have to dig around to understand why. Fortunately, I have Dropbox. I just shared the file to a folder and Dropbox happily synced it to my computer. Nice! Maybe I’ll explore that more in the future.

On the program itself, Up-Cake is pretty simple. Normally, the game would have dropped the cakes down for the player to catch. Since the ZX81 doesn’t support scrolling in that direction, I just took advantage of the existing upwards scroll, hence the name Up-Cake instead of Down-Cake. This offered another benefit, I don’t have to manage screen control. Scrolling the screen moves the character off. The program really only has to move the character, print a new cake, and see if you hit anything.

To keep the program short, I printed the cakes from a string array. In fact, I used this array later in the program to theoretically make things harder by replacing it with one that has more burnt cakes in it. I say theoretically harder because it is pretty easy to avoid the burnt cakes. Heck, it’s probably harder to hit to the good ones, but I digress. The use of the array does open up opportunities. I could easily change the look of the game by swapping out different graphics in the array, but the game play would stay the same.

To see if you caught a cake, I use a simple screen check. This is probably the one place I’d do something different. So I wouldn’t have to remember the number, I use the CODE command to see what piece was hit. CODE is a very slow routine and I use it multiple times. The CHR$ command is much faster and I could have used it once, yet kept the program readable. A non-readable method would have been to replace the CODE lines with the real values. Either way, the program would be bit a bit faster which could have made it more challenging.

I did make a few slight changes. I added a save routine so it would automatically run on load. I also removed a STOP command and replaced it with a “play again” routine. Neither of these changes alters the game play.

Have fun catching the cakes.

If you want to run this program on your Android phone or tablet you can download a compressed copy of the program to your device. You'll need to save the .p version of the program to your device to allow Zed Ex (Beta) to run it.

Comments on this article:

No comments so far.

Write a comment:

Type The Letters You See.
[captcha image][captcha image][captcha image][captcha image][captcha image][captcha image]
not case sensitive