New games every week!
Player Thoughts - JSE - Missing Commands?
30th April 2021  
Michael Fernie has been playing around with the JSE language, and has spotted something slightly awry with the documentation.

-=-=-

I also think you are missing the command InkRot in the command list document. I didn't see it in there.


During my years of "kinda" standardising my coding methods, I've created all manner of quick/familiar commands.
InkRot is one of these.
In most of the languages I use, I code a quick and simple InkRot function to convert H/S/L values into RGB, then set the RGB colour to that, because that particular language doesn't have any kind of SetHue/SetHSV/otherwise in its syntax.

Because I keep on using InkRot, and that's the first thing that comes out of my fingers whilst typing, I've opted to add it into the language as an alternative.
SetHue, SetHSV, SetHSVA and InkRot all correspond to the exact same function.
I haven't added these alternatives to the command list, yet. .. perhaps I should.

Other alternatives include SetWidth, SetThick, SetLineThickness, SetLineWidth, because every language I use seems to have one or the other, and it's confusing as heck trying to keep up with them all, so I threw them all in!!

SetColour can be spelled/spelt as SetColor, or even just SetCol, and there's also SetRGB and SetRGBA to go alongside the HSV/A versions.

SetAntiAlias can be just SetAA or even just AA if you want it to be.

Flip and Frame are both the same.

There's tons of these. They'll probably trip people up, though, so.. yeah, it might be a good idea to catalogue them all!!

Adding keyboard input commands would be useful.


Indeed it would.
Today I made a start on the Gamepad functionality. It's not 100% complete yet, but the example below should give a little clue as to how easy it oughta be.

Graphics 512,512,1 Repeat CLS Oval 256+((Gamepad(ButtonRight)-GamePad(ButtonLeft))*240),256+((Gamepad(ButtonDown)-Gamepad(ButtonUp))*240),64,64,32 Flip Forever
Open JSE


I need to finish off getting it fully featured, then writeup the whole thing.. As well as all the necessary testing.. But should be more or less functional, I reckon.

I think 'If/Then/Else' commands should be next and then the 'For/Next Loop' commands.


Yes, definitely.
I've been thinking about For a lot, today, and how in reality, it's just a fancy form of Repeat/While..
I might go that route.. Taking the parameters of a For statement, and wrapping them inside a standard Repeat.
I already have Repeats working, albeit simply with a "forever" and not a proper Until.. but I don't see why that wouldn't work.
The difficult part is getting the If command to work.. And the Until..
Comparison code already works, but getting the script engine to understand them within the context of an If/Until could be a whole other kettle of fish!
And/or can of worms, whichever you prefer. Both are valid syntax

Views 50, Upvotes 1
Jse , Player Thoughts
New games every week!
Site credits : Jayenkai, one crazy fool who has far too much time on his hands.
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - Player Thoughts - JSE - Missing Commands? - AGameAWeek