Close

Added scaling

A project log for HTML5 Retro Game Engine(s)

A Side project where I try and build various scriptable retro game engines in the browser.

timescaleTimescale 04/17/2020 at 15:540 Comments

I was pretty happy with my 3 transform rotate function, but in the adventure engine I had a feature that I had not implemented on this platform. The reason being that this grew from a testbed for platformers where I discovered that using an image map to directly use for the graphic assets resulted in a massive performance loss.

Due to this, I stripped out some functionality of the drawing routines. This included the re-sampling function that also handled animations as these are generally part of the same asset.

In this case, the number of graphic assets on screen are not as much as the platformer or the top down strategy engine, so I wanted to put back in the resampling and frame selection function in such a way that it would neatly work with the 3 transform rotation.

Turns out, this was really easy. Almost a plug in addition to the engine. Of course it scales on one fixed corner, which has to be addressed, but in general it works really well. So, here is the demo!

Discussions