A little Christmas Dev

Well it’s Christmas and it’s been a busy day, but I did manage to find a free hour to throw some code at Devember.

Today’s update brings the beginnings of image preloading so that game prototypes can use actual graphics. Usually at this stage I just do crude rendering, but some things require more detailed or easily recognizable place holders than simple vector graphics sometimes allow for.

I have a simple utility function (well, functions) that allow you to register images to be preloaded, and then kick off the preload. This is fairly simplistic and seems to work just fine. In integrating it with the engine I thought it best if it was transparent so that all you have to do is say in a Scene constructor that you want to preload an image, and then when you invokeĀ Stage.run() it does the preload for you before starting the game loop.

In this area I have some weird bug; the images preload but the dots in the sample “game” that the engine packs with don’t bounce around like they should. I’m not 100% sure why exactly this is the case, but I ran out of debugging time before the arbitrary time limit I set for this.

Now it’s time to get to bed; Christmas may be over, but the usual weekend chores go ever onward.