New game - Boris goes skiing


(Phil Graham) #21

@MLXXXp can’t get it to work. Not even sure which button is A or which is B. I’ve tried both and neither seem to work.


(Scott) #22

It won’t work until my proposed changes are made to the code.

A simple trick to remember which is button A and B is that the A button has the A in ARDUBOY above it and the B button has the B above it :wink:

If you want to make the changes to the code yourself to try it, change:

void setup()
{
  //arduboy.begin();
  arduboy.boot();
  arduboy.flashlight();
  arduboy.blank();
  arduboy.audio.on();
  Serial.begin(9600);

to

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

A,B buttons labeling?
(Tom Sparrow) #23

Sound off/on now working, and Boris doesn’t go horizontal any more.
updated info on read me file.
Thank you @MLXXXp , help much appreciated.


(Mike McRoberts) #24

No you should put the horizontal movement back, just make him slow down as @MLXXXp has suggested. As in the original game.


(Tom Sparrow) #25

I have a problem with Boris disappearing from the screen on left horizontal, this is why I took it out, I will try to figure out why, Iv’e commented the line I edited (line 76)


(Mike McRoberts) #26

Do you mean when it gets to the left-hand side of the screen it keeps going and disappears ?


(Tom Sparrow) #27

Doesn’t mater where Boris is on the screen, if you press left button a few times, he vanishes.


(Mike McRoberts) #28

I can see a potential problem. Boris points left, diagonal left, down, diagonal right and right, meaning there should be 5 separate directions he can point in.

Your code only has 4.


(Tom Sparrow) #29

That sounds like the answer, will take a look later, ta Mike.


(Tom Sparrow) #30

Is good to play on the bus now @phil8715 hold “B” button down, switch on, hold “down” button down, release “B” button, wait 3 seconds, release “down button, sound should be off, to switch sound back on, do all steps again except use " up” button where “down” button was used.


(Phil Graham) #31

I’m sorry I’m not getting it at all. My wife tried and she couldn’t do it either.

I’ll wait till you put in a sound toggle switch.

I’ll just have put on a different game on tomorrow, as I face a long bus ride of over an hour.


(Tom Sparrow) #32

I think this is the standard way of doing the sound from the arduboy2 library, I’m guessing lots of game dev’s from now will use this method.


(Phil Graham) #33

I’ll keep trying to see if I can do it.


(Mike McRoberts) #34

@phil8715 did you update your Boris game to the LATEST code?


(Tom Sparrow) #35

@phil8715 Read about @MLXXXp 's arduboy2 library https://github.com/MLXXXp/Arduboy2 scroll down to the audio mute control heading. I will not be happy if you get bored on the bus tomorrow.


(Phil Graham) #36

I don’t understand all that. All I know is how to put a game on. I won’t be creating any games for it myself as I’m not a programmer.


(Scott) #37

@sones, you are correct. The idea is that by using the begin() function, or at least systemButtons() after boot(), you don’t have to add sound toggle code to your sketch. The library provides the function to do it for you, so you save code space. Also, the setting is saved in EEPROM so it remains in effect for each power on, and even between different games, until you decide to change it.

So @phil8715, sound toggle may never be added to this game, so you’d better figure out how to use the library function

To turn sound off:

  1. Power off the Arduboy.
  • With the power off, press and hold the B button (The rightmost red button.)
  • While still holding the B button down, turn on the Arduboy. Keep holding the B button down.
  • The blue RGB LED should come on. (If you have an Arduboy with the RGB LED installed backwards, the red LED will come on.)
  • While still holding the B button down, press the DOWN button for a second.
  • The RGB LED should flash red and then change back to blue when you release the DOWN button. (If your LED is reversed, it will flash blue and then go back to red.)
  • Release the B button that you have been holding down.
  • The game will then start with the sound off.

To turn sound on:

Follow steps 1 to 4 above. Then, follow steps 5 and 6 except:

For step 5, press the UP button for a second instead of the DOWN button.

For step 6, The RGB LED should flash green and then change back to blue when you release the UP button. (If your LED is reversed, it will go off and then go back to red.)

Follow step 7.

For step 8, The game will then start with the sound on.


[WIP] ArduSHMUP
(Phil Graham) #38

Is the new code an updated version of the game? Or was it the one that Scott put up earlier?


(Tom Sparrow) #39

Iv’e just this second put a new one up, better movement now (5 positions) sound on/off working, all should be well (I have thought this about 5 times though now)


(Tom Sparrow) #40

Still a couple of bugs, will post when done, I released this too early through sheer excitement of my first game, will test more next time.