A brand new game
for Windows, Linux, Mac, HTML5, 3DS Homebrew and more
every week,
unless exhausted!
About Games Tools Music Pixelart Poetry Home Patreon Suggest Scores JNKPlat Petit Switch
Blog
SpikeTweaks
  14th February, 2020
v0.089 - Rejigged sprite co-ordinate maths!
Trying to add Theme Three to SpikeDislike yesterday, and I had all manner of crazy maths issues.

-=-=-

8x8 grid of sprites of 64x64 pixels each, = a 512x512 spritesheet.
But if you add a little padding (1 pixel around each sprite) it becomes 528x528, and then .. apparently.. all my maths goes awry.
It can find all the sprites on a row just fine, but has some kind of odd issue finding the start of the next row.
Made all the more bizarre when you consider it's the exact same draw routine as Shoebox and Browsercade, and neither of those appear to have this issue.
.. So far!!

In the end, I hardcoded all the important co-ordinates for the different layers (it's only 8 numbers, after all) and now everything seems to flow a little better.

Today's task is to finish off Theme Three (On the Court) which also requires that I add a great big basketball hoop somewhere in all the spritesheets.

Not sure where that's going to end up!

Views 12, Upvotes 0
Daily Blog , Sdcom
Site credits : This was all done by Jayenkai
(c) Jayenkai 2017 and onwards. RSS feed
Blog - SpikeTweaks - AGameAWeek