Re: Newb at game making Sprite and game map developing
Posted: Wed Jul 06, 2016 3:02 am
Edited ::: no relevant information
http://legacy.gamebuino.com/forum/
Duhjoker wrote:Am I getting close?
Const byte tile map [] progmem ={ 16,11,
0,0,0,0,0,0,0,0,0,0
2,0,0,0,0,77,77,77, //small example of code generated from the tile map editor
77,2,0,0,0,0,0,0,0,
//imports the SPI library (needed to communicate with Gamebuino's screen)
#include <SPI.h>
//imports the Gamebuino library
#include <Gamebuino.h>
//creates a Gamebuino object named gb
Gamebuino gb;
const byte tilemap[] PROGMEM={16,11
0,0,0,0,0,0,0,77,77,0,0,0,0,0,0,0,
0,0,0,0,6,0,5,77,77,0,0,0,0,0,0,0,
0,0,0,5,77,77,77,77,77,0,0,0,0,0,0,0,
0,0,5,77,77,77,77,77,77,0,0,0,0,0,0,0,
0,5,77,77,77,77,77,77,77,4,0,0,0,0,0,0,
77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,77,
77,77,77,77,77,77,77,77,77,77,77,77,77,77,1,1,
1,2,77,77,77,77,77,77,77,77,77,77,77,1,1,
0,0,77,77,77,77,77,77,77,77,77,77,77,77,0,0,
0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,};
// the setup routine runs once when Gamebuino starts up
void setup(){
// initialize the Gamebuino object
gb.begin();
}
// the loop routine runs over and over again forever
void loop(){
//updates the gamebuino (the display, the sound, the auto backlight... everything)
//returns true when it's time to render a new frame (20 times/second)
if(gb.update()){
gb.display.drawBitmap(10,10,terrain_rock_master);
}
}
const byte *spritesheet[]={
rock_terrain_master,rockterrain_mountaintop,rock_terrain_valley_SE,rock_terrain_valley_SW,rock_terrain_valley_NE,rock_terrain_valley_NW,port_master,turtle_rock,bush};