Simple animated Sprite and game saving

Libraries, utilities, bootloaders...

Simple animated Sprite and game saving

Postby Risike » Mon Sep 14, 2015 5:37 pm

Hi,

After my presentation, I post 2 little questions:

- I'v read on the website main page, that we can display an animated bitmap with one line of code. I've alreadu used gb.display.drawBitmap, but this function can only write a not animated bitmap. So, I've missed something? Or I must write my own animated sprite library?

- I'v read on the wiki, that we can write on the SD card. It seems to be a good way to save games data. But I've already seen, that the Gamebuino manage to write the EEPROM on the SD card. What it means? Is it a way to save high scores for example?

Thank.
Risike
 
Posts: 24
Joined: Mon Sep 14, 2015 5:25 pm

Re: Simple animated Sprite and game saving

Postby Risike » Mon Sep 28, 2015 8:14 am

I've asked this question 2 weeks ago. I've studying some code and I've found replies :
- Impossible, we must write our own animated sprite functions. Done for me !
- Found by reading the Super Crate Buino code. Easy to do.
Risike
 
Posts: 24
Joined: Mon Sep 14, 2015 5:25 pm

Re: Simple animated Sprite and game saving

Postby adekto » Tue Sep 29, 2015 2:55 pm

i do animation by having al the sprites for tha animation in an array so i just give where the sprite has to go anime[framenumber] and increment that wen needed

its not one line but u can do it in 3

i do the same for a tile map

Code: Select all
byte frame;

//in update
gb.display.drawBitmap(x,y,sprite[frame])
frame = frame + 1;
if(frame == 8) frame = 0;
User avatar
adekto
 
Posts: 448
Joined: Tue Feb 25, 2014 9:47 pm
Location: belgium

Re: Simple animated Sprite and game saving

Postby Risike » Tue Sep 29, 2015 3:48 pm

I've made a library to have all my sprites on the same "board" of sprites in a single bmp file. I don't like to have 50 bmp files to use 50 sprites.
And i've made another one to draw scrolled maps which use tiles in the "board" of tiles in a single bmp file.
The most difficult is done, now I can create ARPG and plateformer games easily ^^
Risike
 
Posts: 24
Joined: Mon Sep 14, 2015 5:25 pm


Return to Software Development

Who is online

Users browsing this forum: No registered users and 16 guests

cron