-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|438|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> JSE -> JSE - Jay's Scripting Engine

Page : 1 2 3 4 5 6 Prev 7
Posted : Wednesday, 09 June 2021, 23:33
My EYEs, my poor eyes! So many magic numbers it hurts

Are constants in yet Jay?
Posted : Thursday, 10 June 2021, 01:33
Bah, you kids and your failure to memorise basic numbering systems.

I'll look into it.
The Preprocessor system includes Defines, so it shouldn't be "too" hard to make a const to flick through and replace things.
Will experiment and let you know.

''Load, Next List!''
Posted : Thursday, 10 June 2021, 04:05

''Load, Next List!''
Posted : Thursday, 10 June 2021, 13:11

Created : 10 June 2021
Edited : 17 June 2021
System : Cross Platform
Language : JSE

Pop The Lock



Our first None-Jay game!
Michael Fernie has submitted a nice little game about clicking and timing and reflexes!
Can YOU Pop the Lock?!!

Latest Update


Changed the color of the the target.
Added a triangle to it to make it stand out more.
Fixed all the text scaling issues.
Sweep movement is a slower and ramps up slower.
Sound Tracker changes the song every level 3rd level instead of every level.
Changed a few color choices to make them stand out more like the dial numbers.
Bumped up the version number to 1.1 and changed the date.

Posted : Saturday, 12 June 2021, 15:22

New Command Day!!

There's now a SetFontSize_Fit(String, Width, Height) command, which will return and set the font-size to an approximate font size to fit the text snuggly within the rectangular area.
You might want to check the font size being returned, and .. if it's "too" small, reformat the string to be a couple of lines or something.

Other new commands.


TextWidth(String) and TextHeight(String) return the width and height in pixels for the string using the current font size, and taking Width and Height into account.

Trim(String) returns a trimmed version of the string, removing spaces from either side.
Shuffle(String) returns a version of the string with all the characters shuffled into a random order.
Reverse(String) returns the string with all the characters backwards.
Sort(String,Order) returns all the characters in ASCII order, where 0 = low to high, or 1 = high to low.


ShuffleArray(Array), ReverseArray(Array) and SortArray(Array) work the same as their string versions.
Note that, currently, these only work for Single-Dimension arrays. I need to wrap my head around the best way to do this for multi-dim arrays!! Complicated stuff!!

EmptyArray(Array, Value=0) Resets every value in the array to 0. You can also specify a value and have that be used, instead.


SHL and SHR (or << and >>) perform bitshifting functionality, moving binary bits left or right by the required amounts.

SmoothTo(a,b) is used to smoothly move value B towards A.
An optional third parameter defines the smoothness, and a fourth value is the minimal distance they can be apart, before A=B.
Essentially, this is my favourite function A=A-((A-B)/C), wrapped into a command.


I think that's everything!!

''Load, Next List!''
Posted : Saturday, 12 June 2021, 18:15
Why the underscore Jay? SetFontSize_Fit and not SetFontSizeFit?

[strikeout]Are you able to do calculations with constants within a command?[/strikeout] - doh I didnt use the dollar sign... $CONST

If I wrap the x, y for Rect in brackets it doesnt draw:

Posted : Saturday, 12 June 2021, 18:33
Be sure to include the $ in the variable name, otherwise you're just using a regular variable, not the Const

As for the function name, in my head it sounded like it needed the gap..
I'm still not sure that the right wording.. Maybe FitText would've been better, but then that should also draw the text?!
I dunno..
But SetFontSize felt like one thing, and then "Fit" felt like a separate bit on the end, so I felt the underscore was needed...
I've also done that with MouseIn vs MouseIn_Circle..

... but then I haven't done that with all the different Collide functions..


Which do you feel is better?

''Load, Next List!''
Posted : Saturday, 12 June 2021, 18:38
The Bracket issue is one of the current pitfalls of the language.

What's happening is it's reading the command as ...

"Rect ($Width/2)
.. and then some other stuff that the user decided to randomly type onto the end of the command for some reason"

It's what I'm calling "the first bracket issue", and it happens EVERYWHERE!!

I'm still trying to figure out how to parse it without forcing you to put brackets everywhere.
.. and .. boy, is it hard!!!

''Load, Next List!''
Posted : Saturday, 12 June 2021, 19:01
With the command names, 99% of your commands are in PascalCase so for consistency all of them should be.

I think this "little" project is brilliant and I can see myself firing up JSE just to quickly try things without opening up an IDE and compiling.
Posted : Saturday, 12 June 2021, 19:07
Ok, I'll fix it up in the morning.
The language copes happily with alternative spellings and such, so I'll just add in underscore-less versions as defaults.
As for "Case".. it's all case insensitive. FeELFreEtogOcRAZy!!

''Load, Next List!''
Posted : Saturday, 12 June 2021, 19:31

Posted : Tuesday, 15 June 2021, 03:24

If I would want to modify a textfile(sort a list) Would that be possible with your language/editor?

edit: maybe read/write to the clipboard?
Posted : Tuesday, 15 June 2021, 03:32
I can't get reading from the clipboard/paste to work well on iOS, and it seems every MacOS Safari update is bringing it more and more in line with iOS's stringent rules.
I could possibly add file-access commands, but whether I can get a "Select a file from your desktop" to work inside Javascript, from the canvas, without using a HTML File Input box.. I'm not hopeful.

File Output is more plausible, but without the input, seems rather redundant.

There are better suited things for this. Might I suggest installing php onto your system? That's what I've been using for scripty tasks, since my switch to MacOS.

''Load, Next List!''
Posted : Tuesday, 15 June 2021, 03:38
Having said that, this was in one of the emails from Michael Fernie, the other day.

Even still JSE is great. I even used it the other day to output a formatted report for my hotel expenses. I just took this jumble of data in this strange format. Pasted it into strings and then wrote a JSE program to parse it and then Print it out. I copied the output screen in debug and put the data into my report. Done.

If you use the DebugLog command (be sure to turn DebugMode on first), you can output to there, and it'll show up in the Developer-Bar console log.
Again, though, this only works on desktop, not mobile.
Doing file-y things in Javascript is a right pain in the arse!!

''Load, Next List!''
Posted : Tuesday, 15 June 2021, 03:40
I have b3d installed. I do not think I will start on a php adventure.
Posted : Thursday, 17 June 2021, 02:52

Spent the past couple of days working on improvements to the JMTrackr Music Player engine.
The editor now has eight bars instead of four, so .. um.. \o/yeay\o/
The basic play routine has also been tweaked a fair bit, and the results are now much more pleasing to the ear, but I think I could probably still do a few more tweaks.
I'll be fiddling about with new instrument options, today, I think.

Meanwhile, above is a nice collection of choons that you might want to use in projects.

''Load, Next List!''
Posted : Thursday, 17 June 2021, 03:25
It didn't play for me the first time I clicked "Jellyfish" ; nothing happened (well, it said it was playing Jellyfish at XXX, but it wasn't. I also couldn't click on any other song. I exited and re-ran it and it all worked fine. Latest FF browser. Dunno.

It's pretty neat though
Posted : Thursday, 17 June 2021, 05:23
Probably didn't download the temp mod file early enough.
I need to look into caching things again..

''Load, Next List!''
Page : 1 2 3 4 5 6 Prev 7