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

Page : 1 2 3 4 5 6 7 8 9 10 11 12 Prev 13 14 Next
Fri, 07 Jan 2022, 02:50
Jayenkai
Okey-dokey. Will do.
First I need to create my own dialogue box, though.
Currently the system dialogue box that pops up when deleting a project takes over the audio on iOS devices, muting the engine completely.
It's frustrating as hell!!

(The upload button now only appears after you've edited the code. If it isn't popping up, stick a random space in there!!)

-=-=-
''Load, Next List!''
Fri, 07 Jan 2022, 07:18
Jayenkai
New Requesters have now been implemented, looking authentically 80's in their retro stylings.
Let me know if the requesters are broken in any way.

Additionally, I've switched out the Debug window from a plain div to a text area, so you can copy+paste from it a little easier.

-=-=-
''Load, Next List!''
Fri, 07 Jan 2022, 08:05
Dan
Looks great !
Fri, 07 Jan 2022, 15:35
Afr0
Can you use this to make MMOs?
Just curious, not really trying to branch out to other MMOs than the one I’m working on.

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Fri, 07 Jan 2022, 16:02
Jayenkai
Everything's self contained and there are no ways to link up to other systems/servers, so.. no, not really.
Plus, with it being browser based, it's piss easy to cheat the thing. Open up the dev console, type in a few random variable tweaks, and you're done.
I'm not sure if browser-based stuff could ever be truly secure, unless it's server based with the browser being merely a "window" to view what the server says is happening.

-=-=-
''Load, Next List!''
Sun, 29 May 2022, 08:57
Dan
Looks like the CollideRectToRect is not checking the coordinates in the way (starting point x,y + width + height) but in the centered square position ?!

  --v

As you can see in this example, the mouse it triggering the cyan rectangle, instead of the green one.
Sun, 29 May 2022, 09:06
Jayenkai
Aaah, good call. I tend to use the middle for a lot of my stuff, but you're right, in that instance.. That's "wrong"

If I add a "centered" parameter, now, it'll break it more in anything written before the change.
I could also really do with renaming all the collision methods. I hate how they're so darn long, name wise.

Any thoughts/suggestions?

-=-=-
''Load, Next List!''
Sun, 29 May 2022, 09:38
Dan
Uhm

in blitzbasic, you can add a function parameter with default value center=1

then you could write the function like


In that way you need only to write the collision detection with correct values for the non centered version.

Or add a new function ?
Maybe something like CollideRectToRectCoords
Sun, 29 May 2022, 10:09
Jayenkai
Hmmm..
What if it were more...

Collide(Rect(x,y,w,h,1),Rect(x,y,w,h,1))
And then that handles ovals, lines, rects, points ...

That'd work better, right?
I might have to have a nosey and see if that's even a doable thing.. the parser might rip out the Rect before the collide reaches it..
Hmmm...

-=-=-
''Load, Next List!''
Sun, 29 May 2022, 17:04
Jayenkai
*idea ferments*

Ok, if this works, I think it'll be neat, but.. it'll likely take a few days to get working.
I'll get back to you asap

-=-=-
''Load, Next List!''
Mon, 30 May 2022, 08:41
Jayenkai
OK, I think this is a viable way to go.
Once done, it "should" work as easily as....



Or at least, that's the plan.
Currently* unrotated rectangles (my rectangle drawing code isn't rotating!?!) and plot/point objects are colliding and nothing more. But the groundwork's in, and the rest should swiftly follow.

*Note : On my version on my Mac, not on the version online yet!

-=-=-
''Load, Next List!''
Mon, 30 May 2022, 13:53
Jayenkai
Gosh, I'm pulling my hair out doing all this collision detection stuff!!!

So far today I've got a point colliding with Rect, Oval, Triangle, Line, Plot, and Image.

... mostly..
Rects don't rotate? I could've sworn Rects rotated. Guess not. Need to recode those.
Ovals collide as long as they're circles and not ovals!
Lines and Pixels collide, but .. .. you know.. they're tiny!
Images only collide as squares, so if you stretch one it doesn't collide correctly.
.. Really, the only thing that collides with a pixel correctly is the Triangle. And, god only knows why!!!

This'll probably take all week to get right.
I have to collide other shapes with those shapes, next, instead of just pixels, and I'm dreading doing Rotated Rectangle vs Rotated Rectangle maths!!!
Aaaah!


*again, test not uploaded yet!

-=-=-
''Load, Next List!''
Tue, 31 May 2022, 03:26
AndyH
good luck!
Tue, 31 May 2022, 04:10
Pakz
I bought this book on 2d collision detection once and tried to convert every method to monkey-x.

The book is by Thomas Schwarlz. (10 dollars ebook)

My github repo for monkey-x has a a part of these working. Not sure if I got rotating rects collision working. I had to convert from c++, which I had no experience with then.
Tue, 31 May 2022, 12:53
Jayenkai
FYI : Haven't done anything on this, today. My head was screaming at me to make a game instead of doing all the maths!
Maybe tomorrow..!?

-=-=-
''Load, Next List!''
Wed, 01 Jun 2022, 06:52
Pakz
I have a small problem. I tried to edit on the ipad using a bluetooth keyboard. There is no compile button, or even top bar when the keyboard is connected.
Wed, 01 Jun 2022, 08:55
Jayenkai
There isn't?
That seems.. odd..
Why would it change?
I'll stick my keyboard on charge and try it out later.

Ctrl+R or Ctrl+F5 should run, but that depends on whether iOS lets you do either of those.

-=-=-
''Load, Next List!''
Wed, 01 Jun 2022, 09:07
Pakz
I just tested. You can reproduce by first using the onscreen keyboard. Then activate the text screen. It goes into a topbar less mode. Then activate the external keyboard. This switches into a different mode and then there is no top bar and compile buttons.
Wed, 01 Jun 2022, 11:38
Jayenkai

Aye, I think it's this extra bottom bar they've added on. (I'm going to assume you see this, too..?)

The "screen" has been given extra padding at the bottom by the browser, to allow that new bar to appear without it permanently covering up anything important.
The unforeseen consequence of this is that the extra padding at the bottom makes the top bump up above the top of the screen.

You "should" be able to drag the very right hand side of the screen down a little bit. If you try to grab the right side of the text entry box, you should be able to drag the screen back down a bit.

I *could* force a "Top:0px" but I'm worried that might then end up chopping off the bottom, too. So.. um.. I think it might be better to "not" try to fix this. Just in case.

Of course, if you can't scroll it, then I'll definitely need to fix it, so let me know if you can.

Also, yes, Ctrl+R should work for Run/Stop, (does on mine!!) but you'll still have the top of the screen missing if you can't scroll it, and once it's running, it's hard to fix it.
.... Grrr..

-=-=-
''Load, Next List!''
Wed, 01 Jun 2022, 11:44
Pakz
Yes. If I scroll at the most right. I can get that top bar out.I think that wil work.

I have another bug though. Again with dimensions I think.

The debug window gives me out of bounds here. If you put the lx and ly into a regular variable there is no out of bounds.

  --v

Wed, 01 Jun 2022, 11:49
Jayenkai
Oooh, that's a definite parsing error..
It's holding onto the second parameter from that cars(i,1), so is assuming ly(0,1) for some reason.
(You can tell, if you change it to cars(i,2) then the error message increases that value, too.

OK, I'll have a look into that.

-=-=-
''Load, Next List!''
Wed, 01 Jun 2022, 16:14
Jayenkai
OK, tweaked+reuploaded..
Once again, this is a parser tweak, so although I don't believe I've broken anything too important, be sure to let me know if I inadvertently did.
v3.ggj

-=-=-
''Load, Next List!''
Fri, 03 Jun 2022, 03:51
Jayenkai
New Collision Progress.
To make it easier to get all the other methodology done, I rewrote most of what I wrote the other day, so that it's a little more reusable.
Gosh, what a mess this code is!!!
I'm trying to get things as optimised as I can, which isn't all that easy given there's tons of shapes and trigonometry to do, but ..
It's definitely getting better.
The "Symbol to Point" collision is now much better than it previously was.

Having to multiply values by 0.725 is a bit odd, though. Not sure why I'm having to use that number!
Baffling myself with my own code.

Might be done by Monday.
I hope..
Because all of this maths has given me a right bugger of a migraine.

-=-=-
''Load, Next List!''
Fri, 03 Jun 2022, 04:56
Pakz
I'm currently having a problem with the loadfile feature.

When I save my game state and reload it from memory. It resumes correctly. But then I use loadfile it does not.

I was trying to create a clean minimal file. But I'm still working on that. Maybe @jay you know it by just knowing what the problem is? Maybe a file size issue? Floating points and what not.

The loadfile (enabled or disabled) is in the .loadstate gosub at the bottom. The .savestate is above that. In the game press ' a'. To store the state. And ' b'. To restore the state.

  --v

Edit : I made a smaller version: edit2 : never mind. I errored on this one. Still investigating.

  --v

Fri, 03 Jun 2022, 05:27
Jayenkai
  --v

First test.
I was worried it might be a "Too much data in the save file" issue, so did a quick "lots of data being saved" test.
This isn't showing any issues with the save file, so ...
Seems like it's something else in your code.

I'll keep investigating.

-=-=-
''Load, Next List!''
Fri, 03 Jun 2022, 05:35
Pakz
The thing is. That as soon as I enable the loadfile. Things stop working. Saving and restoring wihthout it seems to work.
Page : 1 2 3 4 5 6 7 8 9 10 11 12 Prev 13 14 Next