User blog:Swaxhog/Apple Chomp - My First Program

I have to thank the 'Flappy Bird' mania for introducing me to Petit Computer. I recently purchased a 3DS XL and when I read a news article about the Flappy Bird written for the DS using BASIC I just had to check out PTC.

While I have some programming experience from many years ago starting with an Apple computer using Applesoft BASIC, my programming has mainly been in business or application development using Delphi. Even that stopped almost 10 years ago. So I know the concepts I just need to learn the syntax.

Another thing I've never done is actually write a game. With scoring and rules and music. Luckily PTC handles a lot of that for me.

So with a few hours free this day, I started learning some basic things like drawing on the screen at a specific coordinate, playing music and beeps, checking 'collisions' and trying to figure out how to add a timer (I think it's a little buggy when the minute flips before the math is calculated)

I decided to start simple and just work with text. This little game called APPLE CHOMP generates a random maze and you move your character to chomp on apples of various colors. You have 60 seconds and get +2 seconds for each apple. If you hit a wall, you lose one of your 3 men. The game is over when the timer runs out or you die 3 times. Sometimes you or the apple are boxed in. Life is tough!

Apple Chomp ver 1. Notice that juicy red apple? Yum!

I learned a lot in this simple program and for any beginners it might be helpful to see how easy it is to do things like keep score, move around a screen, and even a simple timer.