![]() |
New games every week!
☀️- 15 - JSE Functionality
Blog
15th May 2025
Hmmm.. That's not going to work.. Or is it?
-=-=- Yesterday I started looking into the possibility of adding Functions to JSE. This is a basic basic functionality, and I really should've done it right from the start, but wasn't sure quite how to accomplish it. Now, though, I've had a fair amount of time building the language, and I think I can kinda get it working.. But only so far. In my head, a Function is only a Gosub with a returned value, so in JSE it'll probably work more or less like that. Instead of Gosub label, do this, return, it'd just be label(a), b=do this with a, return b That makes sense, right? The problem, though, is when you do things like ... Print MyFunc(a)+":"+MyFunc(b) JSE can't do that, because that's jumping mid-line. c=MyFunc(a);d=MyFunc(b);Print c+":"+d That would work. That's one function per line. In terms of the language that would be parsed as something like... FunctionInput1=a; Gosub MyFunc; Do whatever; Return FunctionReturn; c=FunctionReturn FunctionInput1=b; Gosub MyFunc; Do whatever; Return FunctionReturn; d=FunctionReturn Print c+":"+d Which would most definitely be doable, but having both MyFunc's on the same line, or god forbid having functions within functions.. Yikes!! And that's before we get to adding Arrays into the mix. I think I should probably keep this on hold until my head can fathom a way to do it. I definitely think that the majority of this is the Parser's job. Converting from a simple MyFunc() to a more complicated methodology. But .. Yeah, getting the parser to do that is probably going to be the hardest part of all. .. Instead then. ![]() This functionality isn't uploaded yet, but works exactly as you'd expect it to. Hurray! Lots of new functionality, lately. Mode7 Command![]() As for the Mode7 stuff. I will be defining it properly once I'm happy with how it works, but currently it can't really do much more than a Mario Kart floor! I think I can do better. .. Maybe! Now that I know it's actually achievable at a decent speed, I can faff about with it, and try to optimise it, and make it a little more functional than just a Mario Kart floor. The current form is Mode7 PointX on the BGBuffer, PointY on the BGBuffer, Top line onscreen, Bottom line onscreen, Wrap or not, Stretchiness.. That last value will probably be a "SetMode7POV" command or similar, along with some kind of setting to change the point on the copy-buffer that you're drawing the Mode7 effect to. Currently it's locked to "middle at the bottom" so that everything rotates well in a Mario Kart style, but you wouldn't always want that. Once I'm happy with how it works, and think it can be useful for others, then I'll set it as a final version and do a proper writeup. Ooooh, exciting! A.I. CornerLyrics : By me Sound Imported : Precarious Superhero > Reveal 🔎 : Download | Suno Link Alternative version : Download | Suno Link Sung by Suno ![]() "Cartoon Derek hunts everywhere, but his data doesn't seem to be anywhere" by DrawThings / Flux > Reveal 🔎 Views 686, Upvotes 13
Daily Blog
,
Jse
,
Commands
New games every week!
|