New games every week!
JSE - Graphics Width,Height,3 Blog
2nd August 2021
You can now add a 3 parameter to the graphics command to make everything pixel-scaled, instead of being maths-scaled.

-=-=-

With apologies for the mild flicker when switching between modes, there's a new scaling setting for the Graphics command.
Previously I math'd all of the values to scale things up from their intended resolution, to their fullscreen resolution, and as lovely and smooth as that left things, it's not exactly ideal if you want a truer, retroer screen effect.

I've now added a pixel-based scaler that works by simply drawing everything at its true size, then scaling the whole canvas via css instead.
It works well enough, though there are still a few quirky places where browsers/systems can't handle the "No antialias please" request, and things end up blurry again..
Grrr!

There are also, still, quirks with pixel precision and the browser doing AA'ing where it shouldn't be, but that's Javascript for you. Javascript's default drawing commands seem insistent on being as "awesome" as it can, by breaking all my lovely clean pixels!!

I mean, I *could* sit and write my own screen rendering code. But.. Who's going to do that?!
Nah, not me.
Not today.
No no no..

As it is, it should at least work well enough for a certain 64x64 LowRes Jam, if you wanted to join in with that.

// Lo-Res Test // by Jayenkai // Created 2021/8/2 Symbol 0,"0__I_C!IICd.CIICdNNdCIICdNNdCIICd.CIIC!I_"; Border 30,30,80 Repeat e=((Floor(Mills()/1500) Mod 2)*2)+1 Graphics 64,64,e CLS;ResetDraw AntiAlias Off For x=0 to 128 InkRot x*8,1,0.5 Line x,0,x-64,64 Next SetCol 255,255,255 SetFontSize 8 Text 4,5,"Scale "+e,0 SetRot 45 DrawImg 24,32,0 SetRot 0 Triangle 48,48,32,32 Oval 48,20,16,16,64 Flip Forever

Views 93, Upvotes 15  
Daily Blog , Jse , Scaling
New games every week!
Site credits : PHP script, Blog posts, Games, Music, Pixelart, Poems and More : Jayenkai
(c) Jayenkai 2023 and onwards, RSS feed 83

Blog - JSE - Graphics Width,Height,3 - AGameAWeek