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

Page : 1 2 3 Prev 4 5 Next 6 7 8 9 10 11 12 13 14
Sat, 15 May 2021, 08:04
Jayenkai
I haven't attempted anything with the right mouse button due to (again) browser issues. What works for one doesn't always work for another, so I decided a long time ago to forego any such functionality.
Sorry.

Hold down Ctrl (or hold down on a pixel for a while) to "grab" a colour. I could probably add a transparent keyboard shortcut. Maybe T for Transparent??

Copy and Paste are definitely on the books, as is moving the sprite with wraparound.
Are Mirror and Flip essential tools? I mean, you could just draw the sprite with a negative scale, for those.. Is it necessary in the editor? If so, then rotate would probably be needed, too. Ugh.. Gonna need more space in the GUI!!!!


I'm actually editing the editor right now, so these are good notes to have. Trying to use it in Portrait mode (on a mobile) is currently horrific!!
I *think* I've got it working ok, now, but I might as well tackle those additions whilst I'm in here.

-=-=-
''Load, Next List!''
Sat, 15 May 2021, 09:00
Dan
Yeah np.

I'm playing with the script a bit, and have discovered some strange kind of a bug:


It took me quite a while to discover why it is not working.
To reproduce the bug enter the code as


Set the cursor after the then, then press tab, two times and the script stops working.
To make it working again, remove the hidden tab chars after the then ...

One tab after the "then" does not matter, it needs to be more than one ...
Sat, 15 May 2021, 09:08
Jayenkai
Wow.. What a REALLY bizarre bug!!

Reason
The parser assumes the "two tabs" means there's code on the end of the line, after Then.

eg
If this then that
Usually when you do that in BASIC, you don't then have an endif after it, and only the code on the line is relevant to the If.
Because of this, it then trips up when it DOES find the endif, and that's what breaks the script.

I'll see about using a trim on that, or something. Shouldn't be too hard to fix.

-=-=-
''Load, Next List!''
Sat, 15 May 2021, 12:44
Dan
Waitkey seems to make the whole game/script wait for a keypress ...
Sat, 15 May 2021, 14:18
Jayenkai
.....?
What do you expect Waitkey to do?
Sat, 15 May 2021, 14:42
Dan
Well, i expect it to pause once, until i press the key.

Atm, the key needs to be pressed all the time.

Test it at the, for e.g., spike dislike game ...



Just like that, and the game is not playable
Sat, 15 May 2021, 14:47
Pakz
Yeah, that command somehow gets into the script cycle?
Sat, 15 May 2021, 14:55
Dan
Yeah, i guess some variable does not get reseted, so the script is always waiting for a keypress.

Anyway it's a bit late atm - here is a GreenSmilies-Demo:

Sat, 15 May 2021, 17:08
Jayenkai
Durrr.. Jay didn't bother to test that in a loop. Silly Jay.
Right, fixed.
And a couple of additions in the Symbol editor. I've not added Flip/Mirror/Rotate yet. I think I need to rethink the layout.. .. Entirely..
*ugh*

Thanks for the bug report.

And thanks for the Scrolly, too

Things I need to work on. The GUI in general, and the Project file/system layout thing. I need to add folders for things like "My Projects", "Examples", "Downloads", "Tests", etc..
My project list is insane, at this point!!

Oh, and Elses don't work right. Probably best to avoid them for the time being.

-=-=-
''Load, Next List!''
Sun, 16 May 2021, 07:53
Jayenkai
Retheme Complete. Hope you like Blues!!

Mmmm, CPC'ish blues everywhere!
If you don't like CPC'ish blues everywhere, let me know, and I'll attempt to make alternative themes, though.. lets me honest, that's not a priority, right now!!

The one major disappointment at the moment is that great big lumbering Project List over on the left.

I'm now considering killing it completely, and replacing it with a more workable set of icons and the like.
In my head, I see an entire Workbench style interface, but that might be going a bit too far!! Either way, having it be a canvas-based interface would be infinitely easier than trying to get CSS and JavaScript to behave, as far as setting up folders and moving icons around is concerned.

Yup.. Plenty more to do, here.
For now, lemme know if you like/dislike the new theme.

-=-=-
''Load, Next List!''
Sun, 16 May 2021, 10:50
Dan
Looks great, almost like the C64 screen with changed colors and borders.
Sun, 16 May 2021, 12:54
Pakz
This would've blown my mind 10 years ago! And I stil think this is Impressive today!

Maybe add those << and >> buttons to show and hide the project folder. I kind of like it. If you get to labels and functions, a window on the right with those shown there would be nice too!

edit: when you get some traffic when you get further in than do not forget a donate link
Sun, 16 May 2021, 13:59
Jayenkai
Labels work great, already!! Haven't attempted functions yet, though, since those require arguments and return values and such, and my head's not quite in the place to do those just yet.

Yeah, a shortcut box for those might be handy. As well as a variable list and stuff like that.
.. I'll admit, though, that the language doesn't actually know what variables you've written down until it comes across something it doesn't already know as a command. It's very freeform, and I'm dreading the point where I should probably start writing error messages..

...
Yes, I'm aware that that point's been and gone already!

But where to put it all?
I've already decided that the left-hand Project List has to go. It's not bad on desktop, but on a phone..


It's hardly the most ideal layout!

Having said that, even my third attempt at the SymbolEditor GUI isn't exactly superb.



How the heck are you meant to draw in that grid!?!
Hmmm..

To be honest, there are MUCH better browser scripting languages out there, and a lot of them are a heck of a lot quicker at parsing things than mine is. But that's not really the point, is it?

It's going to be here when you need it, whether that's coding a little game, or simply to illustrate examples of code.
For that purpose... It's already doing its job

-=-=-
''Load, Next List!''
Sun, 16 May 2021, 17:40
Pakz
Here is how pythonista on my iphone looks like. That button on the top left is how you open the project window.





Then on the right top, that same button is used to close it. Same on ipad.

The pythonista editor so far has been the best coding experience on iphone and ipad for me.
Mon, 17 May 2021, 02:06
Jayenkai
Yes, but then I have to do the drag'n'dropping using css based stuff, and .. aaaarrrgghhh!!!!
If, instead, I used the canvas to draw an interface, it'll run a lot smoother than I could achieve in css.
And if I'm using the canvas to do it. I might as well go all out!

-=-=-
''Load, Next List!''
Mon, 17 May 2021, 02:14
Pakz
I'm sure you wil create something interesting!
Mon, 17 May 2021, 11:08
Pakz
I just wanted to do some jse on my iphone se 2020.

Not sure if you stil was working on it and know about
Mon, 17 May 2021, 11:16
Jayenkai
Damnit. Sorry, I keep uploading quick tests, and must've knocked something off.
Might be the viewport.
Can't currently fix, as it's very unstable. Will do ASAP.
Sorry!!
Please be patient!

-=-=-
''Load, Next List!''
Mon, 17 May 2021, 12:20
Jayenkai
Reuploaded..
The project bar is now gone, and in it's place, a thing that looks very much the same, because I've barely started adding the new functionality to it yet!!
Click the new folder button on the top left to open up the Project screen.

Borders are currently missing because of what you saw earlier!! I'm not 100% sure where my maths went wrong, there, but.. Boy, did it!!
Currently trying to fix the borders, before getting back to the Projects stuff.

Oh, and currently the projects view is quirky as hell with touchscreens for reasons I'm not 100% sure of. You need to tap into the code box, then tap the project view, or .. inexplicably it doesn't register touches!!!

-=-=-
''Load, Next List!''
Mon, 17 May 2021, 14:29
Jayenkai
Over on AGameAWeek, Pakz, you suggested it was hard to copy+paste the code. Do you mean copying? Or pasting? Or.. .. Both!?!
What was the problem?
Lemmie know, so I can try and solve the issue.
Ta

-=-=-
''Load, Next List!''
Tue, 18 May 2021, 02:20
Pakz
I was on the iphone se 2020. I wanted to copy that code from Dan. ios updates have improved copying and pasting text but it is not that easy yet.

The selection cursors seem to go outside the text area and I need to aim these so they cover the entire text. It was mentioned in this thread before that a button would be helpful. Also that this was not possible with some browsers. The iphonse se screen is not that large also.

Pasting the code into the jse editor was easier.
Tue, 18 May 2021, 02:29
Jayenkai
The "tap to select" seems to work better on AGameAWeek than it does here. To be fair, the code here is from.. um.. about 2007??! Could probably do with updating it.
Over at AGameAWeek, you "should" be able to tap once to select all, then tap again for the copy requester to pop up.

Since doing the Sound Select stuff, it appears I've got automated copying working great, so I might now try to add that functionality to both AGameAWeek and SoCoder, too. But.. as a separate clickable copy button, not the entire box, since you might not always want to do that.

-=-=-
''Load, Next List!''
Tue, 18 May 2021, 02:42
Pakz
Ah I see now. It blued out the entire page outside the text area but when I press that copy button it only copies the code. I pasted it into jse and there were no elements from outside the codebox there.
Tue, 18 May 2021, 03:05
Pakz
Does jse(javascript) have a scissor command yet? I tried some code yesterday and noticed draw commands get drawn outside the graphics canvas. This with the scroller on the iphone.
Tue, 18 May 2021, 03:12
Jayenkai
I had to turn off the border, temporarily, whilst I redid the maths for it. (Scaling! Gah!!.. Or, in this case, "not" scaling, but limiting to the scaled area! Un-maths!!!!)

You should find it clips everything better, this morning.
(or at least, I bloomin' hope so, anyway!!)

Test it by setting a bright border colour, and see if it does what it should be!
(Border R,G,B)

I'd like to add a proper scissor/clip/window command, but last time I tried doing that in Javascript, I couldn't seem to undo it afterwards!!!
I've learned a lot in the past few years. Perhaps I oughta try again.

-=-=-
''Load, Next List!''
Tue, 18 May 2021, 04:28
Pakz
Ah, border is scissor

Clipping has given me problems before in other languages. Stil not sure how to use them. When I get it working I save it as a example and copy and paste the code out when I need it.

I noticed arrays are in Maybe add that sytem to be able to add maps(rows of data for setup) into them and link that to a tile editor later on using a label id? This has been my go to for data statements replacements.
Page : 1 2 3 Prev 4 5 Next 6 7 8 9 10 11 12 13 14