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

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

Are constants in yet Jay?
Posted : Thursday, 10 June 2021, 01:33
Jayenkai
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
Jayenkai
  --v


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

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

Pop The Lock



Screenshots
 
  --v

-=-=-

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

v1.1

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
Jayenkai
  --v

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.

Strings

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.

Arrays


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.

Numbers


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.

  --v

..
I think that's everything!!

-=-=-
''Load, Next List!''
Posted : Saturday, 12 June 2021, 18:15
therevillsgames
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
Jayenkai
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..
Hmm..

Inconsistency!!

Which do you feel is better?

-=-=-
''Load, Next List!''
Posted : Saturday, 12 June 2021, 18:38
Jayenkai
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
therevillsgames
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
Jayenkai
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
therevillsgames

Posted : Tuesday, 15 June 2021, 03:24
Pakz
@jay

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
Jayenkai
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
Jayenkai
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
Pakz
I have b3d installed. I do not think I will start on a php adventure.
Posted : Thursday, 17 June 2021, 02:52
Jayenkai
  --v

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
rockford
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
Jayenkai
Probably didn't download the temp mod file early enough.
I need to look into caching things again..

-=-=-
''Load, Next List!''
Posted : Tuesday, 22 June 2021, 04:58
Jayenkai
I've added a new bunch of sounds to the SFX library, based on those SONNISS sample packs I found the other day.
You should be able to hear them in the SFX gallery thing, assuming it updates properly!
JSE is here, as always

-=-=-
''Load, Next List!''
Posted : Tuesday, 22 June 2021, 09:25
Pakz
Have you thought of archiving this project on a service like github? Seems like something like this would be really something to archive for the world.
Posted : Tuesday, 22 June 2021, 09:42
Jayenkai
Do I ever?
Posted : Wednesday, 23 June 2021, 04:44

 
Jayenkai
Created : 23 June 2021
Edited : 23 June 2021
System : Cross Platform
Language : JSE

Squishy Balls

Squish the balls and round them up

Screenshots
 
  --v

Squish the balls, and push them towards the centre spot, as fast as you can.

 
Posted : Thursday, 24 June 2021, 04:45
Jayenkai
  --v

Spent the past couple of hours trying to work this issue out..
Decided to see what happens in Blitz3D+Max under the same circumstances.




vs



.. Doesn't work on either. At all..

I think I'm going to let that particular bug slide, then.

-=-=-
''Load, Next List!''
Posted : Saturday, 26 June 2021, 07:35
Jayenkai

Today's Fixings


First Bracket


I *think* this bug is no longer an issue. It might be, but it shouldn't.
I added a layer number to all tokens, and if anything drops below a certain threshold, the whole lot gets bumped up and has brackets wrapped around it.
It appears to be working well enough.
As with all these kinds of "underground" tweaks, apologies if something you've coded goes awry. If it has, let me know what and I'll try to repair it.

  --v

All now display 0, which is what they should. Previously it would display 0, 3 and 0

Missing Brackets


I *think* I've got bracketless command-returns working properly.
Everything I can think to test it seems to be working ok, but do let me know if your particular code-style is causing issues. If they are, let me know what you're trying to do, and how, and I'll see if I can figure out a way to get it to work with your particular coding style.

  --v

This now works like it should. I think..!

Minus


I've "fixed" a lot more instances of negative numbers, via the method of doing the check a second time!
Again, tested what I can, but if you still see anything wrong, be sure to let me know.

  --v

This used to be much more broken!!


This still doesn't work, though, and displays 5, not minus 5.

-=-=-
''Load, Next List!''
Posted : Saturday, 26 June 2021, 07:57
Jayenkai

Todo List

Super Important


(Note : This assumes I did today's fixes properly, and they didn't bugger anything else up!)

1. The Minus big still exists. It's definitely getting better, but it also definitely still exists.
.. I also might've made it worse in some scenarios, and I'm relying on others to spot the bugs!!

2. And/Or are sometimes a bit glitchy. Use brackets where necessary.

3. NOT does NOT work. It tries to, but it's rubbish!

Slightly Important


1. The Array Shuffle and Sort commands only work with Single-Dim arrays. I should really make them work with Multi-Dims, too, but .. good lord, the maths involved!!!

2. Tilemap Collisions need added in. Not sure of the best way to handle those. I'd need to assign each tile a shape, I think, and whether it's solid or not..? Not sure..

3. nth, or Ordinals. I can't seem to find a Javascript Locale-based way to do these, and it's ever-so-slightly annoying me!!

4. Notifications/Requesters/etc would be nice to have as a standard feature.

-=-=-

That's all I have left on my important-checklist, though Optimisation would also be kinda handy.
I also need to figure out if I can do Syntax Highlighting. I've tried several methods, each one with its own unique selection of fail-points. For now "I'm" ok without it, but I'm around 95% sure that other folk aren't!!

But.. Yeah, it's definitely getting into the "good" side of broken, now

Feel free to attempt to write a game, and I'll stick it onto the "Play" disk!

-=-=-
''Load, Next List!''
Posted : Sunday, 27 June 2021, 03:32
Dan
Just for the info:



It does work in blitz3d when you use it as a variable ...
Page : 1 2 3 4 5 6 Prev 7 8 Next 9 10 11