Bitmap display issue

(Andrew Crawford) #1

Hey everyone, just getting into my first arduboy program… have been following along with @crait’s tutorial and it has been immensely helpful, however I have come across an issue displaying my bitmaps.

Also, I am using GIMP to draw my sprites then converting them to an xbm format, however the left and right halves of my sprite are displaying reverse (at first the pixels were jumbled so I am using displaySlowXYBitmap and that fixed that).


(Simon) #2

Can you post some sample code and maybe the image as you are expecting it to look?


(Andrew Crawford) #3

Oh yeah, sorry. What are the code tags for this site?


(Pharap) #4

What tool are you using to convert the data to an array for use in your program code?

Oh right, XBM is a text format.

In that case you should know that XBM won’t store the data in the Arduboy’s native format.

There’s a thread with all the available Arduboy-compatible converters here:

And here’s a diagram explaining the native format:


There’s a comprehensive guide to using markdown here.
You can also use BB-code [code][/code] or regular html <code></code>.


(Andrew Crawford) #5

Ahh, okay, thanks, will just go ahead and use an image converter instead, thanks!


(Andrew Crawford) #6

Got the player sprite and background working just fine using one of the image converters, thanks so much!

That being said, leads me to my next question… I am still following along with the tutorial mentioned above (which has been helping considerably), but am playing around with background tiles and was wondering- if you use a smaller bitmap (so it is tiled more often), does this save on memory more than using a larger bitmap (with less tiles), or is it about the same? Or, does a larger bitmap/less tiling mean more ROM, less RAM, but a smaller bitmap/more tiles means less ROM, more RAM? Sorry, just curious to know so im following along, and because im still not very familiar with memory types, just asking so i have a better idea.


(Simon) #7

Sprites are stored in ROM (PROGMEM) and they have no impact on RAM. When rendering the sprite, you are updating a 1Kb buffer of RAM that is reserved for the screen. It is always 1Kb (128 columns X 8 bytes / row = 1024bytes) and never grows or shrinks.

So, small sprites will use less PROGMEM than larger sprites. The screen buffer is the same size for both and there is no impact on RAM.

1 Like

(Andrew Crawford) #8

Oh awesome, thank you!