Bitmap display issue

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).

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

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

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:

122aae02ad9e5ec21319b177889378bb2f73c03a

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

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

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.

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

Oh awesome, thank you!