New games every week!
JSE - Initial Test
28th April 2021  
You can try out my scripting language in your browser, right now!!


After a whole day of poking and prodding, I *think* I've managed to wrangle the parsing to work roughly in a way that isn't erroneous.
Or at least, none of my simple tests are breaking it, and everything now runs like it's supposed to.

What I Haven't Done, Yet

1. BODMAS. Just can't bring myself to tackle it, yet!
2. Variables. I *think* I have a decent plan for these, but .. We'll see, once I attempt it, whether it works or not.
3. Functions/Labels. Again, this is something I have in mind, but I'm expecting this to be a little more complicated than I'm thinking..
4. Pretty much any program flow stuff. If's, For's, While's, etc. Most, if not all of those, require the variables that I've not yet added.
5. Most of the sprite editor, and barely any other functionality!!

What You Can Do

Write maths that involves Mills(), Sin(), Cos(), Tan(), Pyth()
Get it to Print the results in different colours and sizes.
Print your name! Wowie!!
Draw shapes and lines.
CLS and Flip
Repeat Forever!!

Known Issues

The "viewport" isn't set, so ends up scaling really stupidly on iOS.
The symbol editor isn't working on touchscreens.

What I'd Like You To Do

Code how you expect to be able to code something, and then tell me if it worked or didn't.
Maths other than BODMAS should work, but if anything doesn't, please send me the code you're trying to get to work, and I'll look into figuring out what's up.

Where to Try It

You can Try JSE here, in your browser. You'll also want The Command List.
Do please let me know how you get on.

// Original Test // by Jayenkai // Created : 2021-02-21 Graphics 512,512,1 Repeat CLS // Border SetCol 255,255,255; Rect 0,0,ScreenWidth(),ScreenHeight() SetColor 0,0,0; Rect 16,16,ScreenWidth()-32,ScreenHeight()-32; // Spaceman SetColour 255,128,0; FillRect 100,100,200,300 SetCol(0,128,255); Rect(150,150,200,100); SetCol(0,0,0); Oval( 256 , 280 , 32 , 32 ); // Main Text Tests SetCol(0,128,255); SetFontSize(12); Text 32,32,"This, is an 'example' of some text."; SetFontSize(12); Text 480,480,'This (too) is merely an "example", being made up of text.',2; SetFontSize(20); Text(20,450,100,0); SetFontSize(12); Text(60,450,Sin(45),0); SetFontSize(12); Text(200,450,Mills(),0); SetFontSize(12); Text(300,450,(Sin(Mills())),0); // Shapes SetCol(0,128,255,1); Rect( ((ScreenWidth()*0.5) + ((ScreenWidth()*0.5) * Sin(Mills() / 16))),((ScreenHeight()/2) + ((ScreenHeight()/2) * Sin(Mills() / 10))),Rand(30,34),Rand(30,34),1); SetCol(100,255,100,0.6); Oval( ((ScreenWidth()*0.5) + ((ScreenWidth()*0.5) * Sin((Mills()-100) / 16))),((ScreenHeight()/2) + ((ScreenHeight()/2) * Sin((Mills()-100) / 10))),32,32,16); SetCol(255,100,100,0.3); Tri( ((ScreenWidth()*0.5) + ((ScreenWidth()*0.5) * Sin((Mills()-200) / 16))),((ScreenHeight()/2) + ((ScreenHeight()/2) * Sin((Mills()-200) / 10))),32,32); // Comparison Tests SetCol(255,255,255,1); SetFontSize(10); Text 62,280,"32 vs 32",1; Text 60,300,"<",2; Text(64,300,32 < 32,0); Text 60,310,">",2; Text(64,310,32 > 32,0); Text 60,320,"<=",2; Text(64,320,32 <= 32,0); Text 60,330,">=",2; Text(64,330,32 >= 32,0); SetCol(255,0,0); Text 60,340,"=",2; Text(64,340,32 = 32,0); SetCol(255,255,255); Text 60,350,"==",2; Text(64,350,32 == 32,0); Text 60,360,"!=",2; Text(64,360,32 != 32,0); Text 60,370,"<>",2; Text(64,370,32 <> 32,0); SetCol(255,0,0); Rect(0,0,32,32,1); Rect(ScreenWidth(),ScreenHeight(),32,32,1); Rect(0,ScreenHeight(),32,32,1); Rect(ScreenWidth(),0,32,32,1); Flip Forever
Open JSE

Views 136, Upvotes 1
Daily Blog , Jse
New games every week!
Site credits : This was all done by Jayenkai
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - JSE - Initial Test - AGameAWeek