123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|119|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> JSE -> JSE Tweaks - 2022

Mon, 16 May 2022, 16:11
Jayenkai

JSE Tweaks - 2022


Overhauled the GUI for JSE, today. (all frickin' day that took me!!)

The main GUI and the "Image" editor GUI are now streamlined and work via sub-menus, instead of having all the buttons sprawled all over the screen all at once.
This means that everything now fits a little better onto Pakz's iPhone, something that he's been banging on at me, all week, to fix.

It's also given me the opportunity to write more descriptions for the buttons, so the new "zip export doohickey" button now says "Download HTML5 Project" which I think is a much more apt title.

The new ImageEditor overhaul isn't quite done yet.
I need to move the default position of the image across a bit, as it's currently misaligned to allow for a none-existent sidebar!
I also haven't added the "Shift sprite" buttons back (I'm hoping a "drag" tool might work better)
I intend to add Circle/Rect, and Flip/Mirror tools, too, (Am I missing anything else?!) but .. Another day for those!!

But, yeah, hopefully it should feel 3% more functional now.

Let me know what you think, and absolutely do complain if you preferred the old one.

You can GotoJSE here!

-=-=-
''Load, Next List!''
Mon, 16 May 2022, 23:50
Pakz
A drag tool? Is that with a selection area? You could maybe add a rotate selection? And undo!

I had not noticed the missing move buttons. I do use these.
Tue, 17 May 2022, 01:07
Jayenkai
Drag is the move buttons. Instead of four separate buttons, have it as a tool, and drag the sprite around.
Flip/mirror/rotate are kinda redundant. I'll probably leave those out. If you need "this sprite but flipped" it's better to simply draw it flipped, rather than waste a sprite slot. Same with rotate.
But we'll see if I can be arsed to do all the maths to rotate

-=-=-
''Load, Next List!''
Tue, 17 May 2022, 09:53
Jayenkai
The "Import Spritesheet" button is working, though I had to do all manner of quirky stuff to get that working. Let me know if it doesn't work for you!!!
(Choose a spritesheet of 32x32 sprites, and it "should" convert them in a neat enough way.)

Flip and Mirror are in.
Drag works, too.
All of these are "Tools", like the pen or the fill, so for example you can select Drag mode, switch between different sprites, then try to align them all.

Rotate isn't currently in... Math brain is currently arguing with itself!!

-=-=-
''Load, Next List!''
Tue, 17 May 2022, 10:17
AndyH
Flip and mirror are handy to have, so welcome that. I often draw a character facing one direction because it was easier to draw then later decide it needs to face the other way to avoid programmatically flip it every time...but that may be more an issue for other dev environments than jse, as it is not confined to any particular requirement.

... Still, much appreciated.

-=-=-
Andy H
8-bit games at www.hewco.uk
Cartoons at awful.ovine.net
Ovine at ovine.net
Wed, 18 May 2022, 16:49
Jayenkai
Last night, Pakz let me know of some code that will lock up the browser.

At first I was convinced it was the fault of an Out Of Bounds issue, but after much (MUCH!) investigation, it seems it's all the fault of the else command.
So, until further notice, try not to else!



and so on..
Sorry 'bout the bugs

-=-=-
''Load, Next List!''
Thu, 19 May 2022, 06:24
Jayenkai
Spent about 3 hours staring at the If/Else/Endif code... Trying desperately to figure out where the bug was.
Over and over, test after test, more and more..
Nothing.
Nada..

...
"Wait, what if it WAS just an out of bounds error?"

So, I retested the possibility of that, and .. yeah, that's what it was.
Fixed in about 5 minutes.

v.3ggg is now available if you refresh (You can see what version's running if you open the FPS/Debug display.)
Ugh..
I do definitely have to fix something, somewhere, though. I think the minus function might be buggering things up.
Hmmm..

-=-=-
''Load, Next List!''
Thu, 19 May 2022, 06:38
Jayenkai
Now, on to Pakz's code.

You have..


There's 5 boxes.. (Well, there's 6, there's box 0 up to box 5, but no box number 6.)

Further down, there's a "for i" loop, which originally went 0 to 4.
The i becomes that value, as it's counting the loops, so the first loop around i is 0, the next i is 1 and so on up to 4.



This bit says "If i is less than 4, then check the next 'targ' box.. But ... if i is 4, then instead check 0." That way, we're looping constantly.
0 looks ahead to 1, 1 looks ahead to 2, 2 to 3, 3 to 4, then 4 doesn't look at 5, and instead looks back to 0.

When you changed the for-loop to be i=0 to 6, you missed a couple of important things.

First, you haven't upped the number of boxes, so once the code reaches anything above box 5, it fails.. It's an "out of bounds" issue, because you're looking beyond the range of the boxes.. .. essentially IRL, you're staring at the table, instead of a nice box on top of the table!

Second, the loop is incomplete. it's still going 0-1,1-2,2-3,3-4,4-0, but then is also going 5-6 and 6-7..
You need to change the "if i==4" to be "if i==6"
That's when it should lookup 0, rather than "The next box"

One useful tip would be to have a "LengthOfLoop" value, and use that value instead of hardcoding the number 4 or 6 at this point.
(You can also use that value when creating the dim, so you have enough items)


And one final little thing, the bit where you define the targx() and targy() values still only goes up to point 4. You'll need to add a couple more points for it to target, or .. it won't know where it's supposed to be going!!

Hope all that makes sense.
Good luck!!

-=-=-
''Load, Next List!''
Thu, 19 May 2022, 09:42
Pakz
I can not even remember what I was doing. Suddenly everything froze It is working now though.

@jay Your racing game description of a while ago was the inspiration.
Sun, 04 Sep 2022, 05:23
Jayenkai
  --v

I was trying to code a little basic 3D thing, earlier, and ended up coding a ton of maths to get it working..
"Hmmmm", says I.. "If these were commands, it'd be quicker.."

So, I threw together a couple of commands.

Rotate3D(x,y,z,rotx,roty,rotz) will take variables x,y,z and (assuming they're centred around 0,0,0) will rotate them by the given angles.
NOTE : This is a destructive command, in that x,y and z will now contain different values than those you originally fed it.
It also won't work with array values, though I might be able to get that working later.. Right now, it's too damn confusing to get that to work

Isometric3D(x,y,z,2dx,2dy)
NOTE : Again destructive, where 2dx and 2dy will be replaced with the 2D representation of the 3D co-ordinates.
And, again, won't work with arrays!

All in all, these aren't really all that useful, are they!?!
Aw well.. Summing tew dew!


(You might need to refresh to update to v.3ggl .. It says in the FPS display which version you're running.)

-=-=-
''Load, Next List!''