New games every week!
Loading an Image Blog
29th October 2017

Notebook


I've added another page from my old Notebook onto the Patreon page, for Subscribers. If you'd like to take a peek at some random GameDev notes and scrawls from about 15 years ago, that's the place to look!!

Developments


Remarkably, loading a png wasn't all that hard.

-=-=-

I found the wonderful "LodePNG" PNG decoder, which opens a .png file, grabs the pixels, and pops them into an Array.
Then drawing that array to the screen was also relatively simple. (Assuming I can get ANYTHING to draw onto the screen.... Emscripten!!)

I'm fairly sure this'll bite me in the arse, later on. It was "too" easy, in terms of C++ so far.
I've yet to test it on iOS or Mac, but I'm pretty sure something's going to break, along the way.
It always does!

Having got one sprite on the screen, I started playing around with sizes and insane numbers of sprites, only to realise that slowdown of the renderer was causing everything else to slow down, too.
Aaah, yes. I'm going to need to add some Threading into the mix.

So, that'll be today's task. Learning all about threading in C++.
This should be fun!!
Views 35, Upvotes 8  
Daily Blog , 2018 Framework
New games every week!
Site credits : All of the above : Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed

Blog - Loading an Image - AGameAWeek