New game - Boris goes skiing


(Tom Sparrow) #1

Hi all, just finished version 1.0 of my first ever Arduboy game, Boris goes skiing, a clone of the ZX Spectrum game Horace goes skiing.

A massive thank you to Mike McRoberts (The Arduino guy) for your patience and teachings, I have a most enjoyable hobby now.

Download from here

Thank you.

Tom


(Celine) #2

cool! I was just thinking that the Arduboy could use a skiing game! Would be nice if it was press to start playing though…
recently found out about the DO WHILE function, you could use it in your void title screen loop:

  do{ } while( !arduboy.pressed(A_BUTTON) ); 

:slight_smile:


(Tom Sparrow) #3

Thanks for the tip, I’m very much a beginner with coding so hopefully I can improve things as I progress.


(Tom Sparrow) #4

Tried that command, much better, will probably use that for other screens too. Thanks Celine.


(Scott) #5

Using just while is more common than do/while. With just a leading while the statements between the braces (none in this case) will be run 0 times if the condition is not true. Wiith do/while the statements are run at least once.

while (!arduboy.pressed(A_BUTTON)) { }


(Scott) #6

@sones,

Your game is using only a little over half of the available program space. Why are you using boot() to eliminate the boot logo? Why not use begin() to retain all the boot features?


(Tom Sparrow) #7

Just while I was testing the start up screen coming on, I was adjusting it lots so cut the boot logo to save time, I simply forgot to put it back.


(Tom Sparrow) #8

Just put arduboy.begin(); back and now have 2 images at the same time, will play again tomorrow.


(Scott) #9

During development, you can leave the boot logo in, then to save time you can press the RIGHT button to abort it.

Also, you’re currently forcing audio on and there’s no way to turn it off to play the game silently. If you use begin() (or remove arduboy.audio.on(); and add arduboy.systemButtons() and arduboy.audio.begin() after boot()), then users will be able to enable or mute the sound using the B buttion during power up.


(Tom Sparrow) #10

Ah thanks, will do, I was wondering how I could turn audio off, Great!


(Scott) #11

Add arduboy.clear(); after arduboy.begin();

void setup()
{
  arduboy.begin();
  arduboy.clear();
  Serial.begin(9600);
// etc....

(Phil Graham) #12

You should’ve done Boris Goes On a Zip wire, and gets stuck lol.


(Tom Sparrow) #13

Lol… That’s next :wink:


(Mike McRoberts) #14

Great job @sones.

I take it version 1.0 means we will be seeing the ‘Frogger’ part of Borace Goes Skiing in Version 2.0 ?


(Tom Sparrow) #15

Eventually yes, I have the images done, but you know how long this took.
Can’t thank you enough for teaching me buddy, this is so much fun.


(Phil Graham) #16

Could you please put in a sound toggle? I’d like to play it on the bus without annoying everyone?


(Tom Sparrow) #17

Will do, it’s on my list :wink:


(Scott) #18

If @sones makes my proposed change of using begin() and clear() in place of boot() and all the other calls between it and Serial.begin(9600); then you will be able to toggle sound using the “system control” boot up feature:

You hold the B button while powering up, then while still holding B, press UP to enable sound or DOWN to disable sound.

No other changes to the sketch would be necessary to allow mute control.


(Scott) #19

@sones,

The skier can be made to face fully horizontal when moving right but can’t when moving left. Is this intentional? What is the purpose of facing horizontal as opposed to facing diagonal? It would make sense to me if downward speed slowed when facing horizontal, as with real skiing.

It’s a fun game though. Keep up the good work!


(Tom Sparrow) #20

I will change all the suggestions later (hopefully tonight) thanks for all the tips and help