New games every week!
🔀 - 02 - Not Doing What You Want Blog
2nd June 2025
Had another think about Tilemaps again, yesterday.

-=-=-

One of the biggest issues in JSE is that once you go over a certain size of tilemap, things really do get slow when you're trying to fill them up again.
It's mostly down to the speed of the language, and how bad it is at doing nested loops, that it takes so long to fill a big map.

So yesterday I started to look into the possibility of making a Tilemap Editor.

Hurray, I hear the people cheer.
But, no, it's not happening.

JSE's text based, so the tilemap would need to be a string.
I considered reducing the tilemap style down a little, compressing the possible data in my head, minimising what needed to be stored in an output string.
After an hour or so, I'd whittled things down to a 32x32 tilemap would only need to be a string of about 3,500 characters
... Hmmm.
I played mental gymnastics trying to come up with really cool ways to minimise them, but nothing really worked out.

Bah, humbug.

But along the way, I did consider one teensy little idea.
"Tile Styles"
The Tilemap engine includes size, rotation, alpha and colouring.
What if I built a set of pre-made tile styles. So you could do things like ...
PlaceTile(x,y,Image of a tree, Style of a tree)
And the tree style would give the tile a random oversized height, size and offset, so it looks more like how a tree might look on the tilemap.

And that got me thinking..
What if we called that TilePlot..?
And then we could have TileRect for filling areas of the tilemap with tiles, and TileDrawRect for drawing walls..
Except, the TileRect command would be running in Javascript, not line-by-line parsing by JSE. So it'd be much quicker at running, right?!
Hmm..
And then we can have ovals..
And..
... Wibbly wobbly lines that could be used to generate rivers and things?
And..
What about clusters of tiles?
Oooh, now we're onto something..




The new commands are about NOT doing exactly what you want, and by adding the little bit of randomness, (with SeedRnd control!) they should hopefully let you build proc-gen levels much easier.
I also have to figure out how to easily do walls and platforms, but those really shouldn't be too hard, especially from the point I'm already at.
Ooooh, this could be fun.

It's going to need another few days of testing and trying out and optimising (always optimising) before I can properly explain how the heck you're supposed to use these new commands, but ... They're fairly interesting to play around wit, and I think they should help alleviate the lack of a tilemap editor proper.

Cool..

Meanwhile...



Last week's Patreon First game, Rock around the Sun, is now available to play.
Drag lines back to push the rocks around the sun, then hit "GO" to set everything in motion.
Can you outlast the timer?!
Weeee!!!!

You can Play the game in JSE.

A.I. Corner


Lyrics : By me
Sound Imported : Indian Llama
> Reveal 🔎
: Download | Suno Link

Alternative versions
: Download | Suno Link
Sung by Suno


"Cartoon Derek had a great idea about Tilemaps" by DrawThings / Flux

DrawThings has some nice style presets, and today I've discovered the "Game - Bubble Bobble" button!





> Reveal 🔎
Views 66, Upvotes 0  
Daily Blog , Jse , Tilemaps
New games every week!
Site credits : PHP script, Blog posts, Games, Music, Pixelart, Poems and More : Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed 6

Blog - 🔀 - 02 - Not Doing What You Want - AGameAWeek