11th May 2021
Really wasn't expecting that, yesterday.
The day started off with the SmileBASIC launch, after which I decided to look into why Michael Fernie was having issues drawing a background.
The issue was two-fold.
First, the JSE just isn't good at doing nested loops. Even a simple set of 64x64 can chug along at a ludicrously slow pace.
Add to that, the whole issue with the giant Symbol Sheet, and .. well, it's not a good combination.
The Symbol Sheet size has been both reduced and expanded. Now instead of one single 1024x1024 pixel sheet, the thing is stored across 10 smaller 340x340 pixel images.
"Why not split each symbol into its own image?" I hear you cry?
Of course, further testing is still required, and extra optimisation, too. But for the mostpart, the current method is a little better than it previously was.
.. Tilemaps, then?
Most of the slowdown that was happening, then, was being caused by JSE not being able to loop at full speed over a full screen of tiles, in order to handle the entire tilemap.
How best to handle that?
I sat pondering this for about an hour or so, before going ".. Well, guess I need a Tilemap engine.."
I wonder, then, how SmileBASIC manages to keep up. I imagine SmileBASIC is much more streamlined when "compiled" than what I'm managing to do.
Anyhoo, tilemaps are in now, and things are flowing reasonably well.
I think I've got most of the important functions in there. If there's anything specific that you'd like to do with a tilemap, but that isn't already in there, do please let me know.
I now need to code a bunch of mathsy things, to allow for collisions and whatnot.
In fact, I haven't added ANY collision code in JSE, yet, so I think that'll probably be today's challenge.
Or the Arrays.
.. or the For loops..
So much to do!!