A brand new game
for Windows, HTML5, iPhone, Android TV and more,
every week,
unless exhausted!
Blog
LoadImage - Day One


Boy, that took some doing!!

-=-=-

You all remember "bloke" from Clusters of Hex!!

First thing, today, I thought I'd try to do something clever, but the clever thing didn't work out.
I was going to split all the animation frame up, but in the end, OpenGL prefers to work with Spritesheets, so I guess I have to undo everything and rebuild it with those in mind, instead.
D'oh!

Still, that's step one working nicely.
The loader loads a .png image, strips away 255,0,255, and leaves a nice alpha image at the other side.
If I alternatively choose to use images with alpha channels pre-rendered, it'll happily load those, too.

Image loader courtesy of "LodePNG", and the resulting image data is nice and easy to work with, as it's just a big old array of values.
Hopefully those values will then result in sprites on all possible targets, and not stupidly break depending on the system!!

... Unfortunately, the win.exe has shot up from 200kb to 1,620kb.
D'oh!
I've tried hunting for the cause, but I can't seem to figure it out.
Bugger.

Views 15, Upvotes 1, 28th October, 2017
2018 Framework
Site credits : Jayenkai
(c) Jayenkai 2017 and onwards.
Blog - LoadImage - Day One - AGameAWeek