New games every week!
🤡-17- Further Optimising Blog
17th April 2025
Yep, I've gotten stuck in the JSE code again. Aargh!!!

-=-=-

Honestly, I love doing this!
Mum's been freaking out that I'm "doing too much", but nips and tucks and tweaks to the engine is fun to do.
I'm in my element!

Yesterday I uploaded v.3gih, which appears to be a teensy bit more optimised.
The engine now does a short spurt of pre-optimising when it's loaded, forcing the browser to do several hundred quick spurts of drawing, multiplying, string access and more. Then it stops and has a breather before letting you start any code.

This all happens over the space of about 20 frames, so "shouldn't" impact the player's experience in the slightest, though I'll be stress testing the impact it has on many more setups before calling it a day.



This is Optimisationalism 5 running (barely) on a Samsung Galaxy Tab A 10 2018 (name things better, Samsung!)

v3gig wouldn't get beyond the initial few Text Drawing tests before crashing out, so though v3gih doesn't "feel" like it's that much faster, the fact that I've now got the thing managing a complete suite of tests on this age-old rubbish tech, is a fair improvement.
Optimising is fun!!

What else have I tweaked?
The Random-Number function has been streamlined a teensy bit, though not as much as I'd like. This is because I'm using my own random number generator, mostly because I like to use pseudo-random numbers when generating levels and such, so that everyone sees the same things.

Browsers, of course, have their own pseudo number generators, but I can't 100% rely on every browser on every system being the same output for the same seed, which is why I wrote my own.
.. Sure is slow, though!

Here's a bit of code that I've been experimenting with, yesterday.

// Optimise For Loop // by Jayenkai // Created 2024/2/10 // GotoJSE.com/KjXtDqv9.BAS Graphics 512,512,1 s=Mills() mcSquared=1 for x=0 to 100 for y=0 to 100 for z=0 to 100 // e=mcSquared // e=mcSquared+1+(1,2) // e=mcSquared+Sin(1)+Sin(1,2) // e=mcSquared+Rnd(1)+Rnd(1,2) next next cls;LoadingBar x,"Trying","Twirl";flip next ResetDraw;CLS;Print Mills()-s;Flip


There's 4 commented lines in the middle of the for's. You can uncomment them one-by-one to see how each one impacts the time that the code takes to run.
... And you'll find that the Rnd command really does suck the life out of the engine.

So I think I need to try and focus on that for a while. Get it as fast as I can get it working, but.. importantly.. not breaking the resulting pseudo-random numbers, or that'll result in all kinds of breaks, all over the place.
Eeek!

Right then.. I should probably write Monday's game before I get back to any more optimising.
I'll go do that!

... Maybe

A.I. Corner


Lyrics : By me
Sound Imported : Fanatically Gratifying
> Reveal 🔎
: Download | Suno Link
Sung by Suno


"Cartoon Derek running super fast through a cyberspace landscape" by DrawThings / Flux

> Reveal 🔎
Views 134, Upvotes 2  
Daily Blog , Jse , Optimising
New games every week!
Site credits : This was all done by Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed 105

Blog - 🤡-17- Further Optimising - AGameAWeek