Sprite sets

Développement

erico

il y a 7 ans

What is the best way to assemble sprites?
I mean, I´m used to horizontal/vertical lines as I choose and  the usual purple for transparency.

Sorunome

NEW il y a 7 ans

I'm sorry, i don't quite get what you are asking :(

Aurélien Rodot

NEW il y a 7 ans

For animated sprites, stack them vertically.

For static sprites, you can either keep them separate (recommended) or stack them vertically.

Not sure if that answers the question?

erico

NEW il y a 7 ans

Yes, that is pretty close to what I meant.
For example, with glbasic, I tend to have them at bmp888 stacked sideways and vertically.
I read them in code from left to right, top to down and I leave the "alpha" painted on the usual pink color.

So, for the Gamebuino Meta, stacking vertically is the way.
What is the best image format? What about alpha? Should I index the colors myself?
Here an example image of how I usually stack them:
(ops, can´t upload a file, is there any restriction or just a bug?)

Sorunome

il y a 7 ans

The answer to your question totally depends on if you want to load your sprites from SD (slow) or from flash (fast)

Sorunome

NEW il y a 7 ans

erico erico

The answer to your question totally depends on if you want to load your sprites from SD (slow) or from flash (fast)

erico

NEW il y a 7 ans

I see, the reason for the question is that I´d like to update the mock creation with the proper assets on a ready to use format, so if maybe there is a standard way to present it, I´d do it that way so the user don´t have to bother converting and whatnot.

Sorunome

il y a 7 ans

Ah, so not for actually making a game already. Yeah, just vertically stack the stuff

Sorunome

NEW il y a 7 ans

erico erico

Ah, so not for actually making a game already. Yeah, just vertically stack the stuff

erico

NEW il y a 7 ans

And the alpha? Maybe I will just use png then.

Aurélien Rodot

NEW il y a 7 ans

For alpha, the default is pure magenta (255, 255, 0).

The Gamebuino can read RGB 888 (24-bit) BMP uncompressed files so it would be the way to go.

To sum up:

  • Animated sprites: stack vertically
  • Individual sprites: individual images
  • Transparent color (default) : magenta (255, 255, 0)
  • Image format: BMP 24-bit

Sorunome

NEW il y a 7 ans

Actually you can just use 32-bit BMPs and if the alpha channel is at least 50% alpha it'll make it transparent, else ignore the alpha channel. Upon loading the color used for transparency is automatically determined.

As for individual sprites, as long as they reside in flash  it is very nice to have them stacked vertically, non-progressing frame-looping and before drawing just call myimage.setFrame(<number>) so you have that sprite. Uses a bit less ram