Start to code
From Gamebuino Wiki
Revision as of 2016-11-27T16:06:07 by Studiocraftapps (talk | contribs) (Create the starting page section)
Starting page
When you start creating your game, you should have included these file:
#include <SPI.h>
(To communicate with the Gamebuino's screen)
#include <Gamebuino.h>
(To get the pre made library)
Gamebuino gb
(To create a Gamebuino object named gb)
Then, you'll need to initialize the Gamebuino object in the setup function using this:
gb.begin();
and display the menu using the gb.titleScreen function:
gb.titleScreen(F("The name of your game"));
For now, your code should look like this:
#include <SPI.h> #include <Gamebuino.h> Gamebuino gb; void setup () { gb.begin(); gb.titleScreen(F("My game")); }
Customize the title screen
The function gb.titleScreen
display only a title, to display a picture, create a 8x8px up to 64*30px PNG/JPG/etc. file and uplode it on the Bitmap encoder in the Download,
If you want to edit it later, take the binary with multi-line (Wrap output line = true) or if you want it in one simple line choose hexadecimal with a single line (Wrap output line = false)