Zooming Graphics for "Bash Buddies"!

We need an in game Character Editor for customization :smile:

Posting in epic thread before it’s an epic thread.

So … @Atomic can we see your code? enlighten us !

I remember some of the old Dragonball Z games did the same, if you were far enough apart the character was little more than a dot, seemed to work pretty well for them. Not sure how well it would cope with 4 players, but i guess you could have it zoom in to the closest alive player.

Sorry for the delay, I got super busy the past week and didn’t have any time to work on it.


Here is the zooming demo, all tidied up.


That is incredible, Atomic! The members of this community blow my mind all the time! I definitely wouldn’t mind making a larger version of Robo to include him. :smile:

1 Like

Hey Atomic,

To ensure your example is easy to find and stays around a while I put your code in a Gist. I gave credit to your nome de plume ‘Atomic’. Let me know if you would like this changed or taken down.

The code and last video have also been included in the latest blog post.


If that’s right that is pretty amazing. The scaling method being used here is simple and straightforward - and to boot it’s using drawPixel (a sure recipe for slowness). That’s just to say there is still a ton of room for optimization here. The smaller the sprite gets the faster it could be… right now the entire sprite is still drawn pixel by pixel, even if all the pixels are been smashed into a single pixel.

Of course one could argue the rendering a 1x1 or 2x2 could possibly be reduced to a simple single drawPixel or drawRect (2x2) operation without even considering the content of the sprite.

Very cool though.


That demo is impressive, great work!

1 Like

Hahaha, Love the Nyan cats!

Is it just me or does drawScaledBitmap rotate the Bitmap 90°?
Yep it definitely does.

It expects the data to be encoded differently because it’s x/y looping is reversed. It’d be an easy enough fix to fix the looping if you’re using graphics that are cut to work with any of the “normal” rendering methods.

1 Like