Page 1 of 1

Virtual Pet thing!

PostPosted: Mon Sep 21, 2015 2:28 am
by MechanicalPen
So, I've started work on a virtual pet/rasing sim game.

In order to have lots of different creatures to play with, I've been thinking about storing each critter's graphics and related stats on the SD card. That means copying the critter into RAM and not using progmem. The math on this is not looking so good.

A 16 pixel by 16 pixel creature, with 16 frames of animation is 16x16x16 = 4096bits = 512 bytes. 16x16 is the bare minimum I would even attempt for this sort of game because cute animations is a big part of the appeal of v-pets. Ideally I'd want 32x32 but 32x32x16 = 16384bits = 2048 bytes. That's the whole of the Gamebuino's memory.

I suppose I could a fraction of the total frames in memory, but I worry about wearing out the SD card and lag from SD card reads (one of my Gamebunio seems to take twice as long to load games from the SD card so I assume read times is based on the SD card manufacturer, which would make testing for such lag an issue)

Would anyone with experience care to share some advice?

Re: Virtual Pet thing!

PostPosted: Tue Sep 29, 2015 11:09 am
by adekto
not compleetly sure on your math there, but you can do a variant on sd video streaming
http://www.instructables.com/id/Streaming-video-from-SD-card-to-Nokia-LCD-with-Ard/

Re: Virtual Pet thing!

PostPosted: Fri Oct 09, 2015 12:02 am
by MechanicalPen
Yes, my math was off by a multiple of 8. So I can fit 8 times as many sprites into RAM at one time than I thought. So, I can get away with just loading them from the SD card once.