New games every week!
Draw Image To Buffer Blog
3rd August 2019


Crikey, this took some doing!

-=-=-

The idea was fairly simple. Draw and repeat a tile, onto the main buffer, so that the buffer can then be drawn onto the background for the game.

If you're familiar with the original Clusters of Hex, then the above image should be fairly familiar, although it's not quite the same..

The new version uses 2 simple tiles, and draws them across the size of the 1024x1024 buffer.
There are sprite-recolouring issues, so everything is either Alpha'd or not.. Not a whole lot of variety, I'll admit, but enough to create the illusion.
Later I'll add some shadowing with plain lines, or such, but otherwise it's "enough", I think.

One slight issue is that the tiles aren't being drawn on Firefox, due to (I think) a frame delay between loading and using the images. I'll need to account for that, somehow.
But, yeah.. Seems alright, I reckon!

And because it's generated in-game, it means I don't need a (*checks the original version*) 1Mb image downloaded, just for the background of a game! ... Eeek!!
Views 82, Upvotes 15  
Browsercade
New games every week!
Site credits : All of the above : Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed 78

Blog - Draw Image To Buffer - AGameAWeek