Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Builderboy on October 16, 2010, 05:20:44 am

Title: Physics Sandbox
Post by: Builderboy on October 16, 2010, 05:20:44 am
Alright i have finally finished my sandbox to where it is workable and very very fun to play with :D It has a handy dandy interface that takes up a crapload of space, but is very shiny and fun :) The screenshot runs a bit fast unfortunately, especially the simulation parts, but i cant seem to fix that.  Here are the controls for the sandbox:

Arrow Keys: Move cursor
2nd: Press and Hold in empty space to create a box
       Press on a box to highlight it
Alpha: Press and Drag to highlight an area
Mode: Start Physics Simulation
Del: Delete Selected Boxes
Clear: Exit

And then there are menu functions.  There are 2 menu's, main and selected.  The selected menu only appears when you have one or more object selected.  The menu is activated by pressing one of the F1-F5 keys, and then the menu selection is chosen using the F1-F5 keys

Main Menu:
All: Highlights all objects
Clr: Erases all objects
Glob: Set global forces in the world
Save: Save the current state of the world
Load: Load the most recent saved state

Highlight Menu:
Copy: Create a copy of the current selection onto the cursor.  Press and hold the copy button to get a preview shadow of your copy selection and move your cursor to place.
Push: Press and hold to create a force onto all selected objects.  Release Push button to apply force and enter simulation
Move: Press and hold to move current objects
Game: You lost it
Edit: Edit the Mass objects as a group (1-24) and set whether or not the highlighted objects are static or not
Title: Physics Sandbox
Post by: JosJuice on October 16, 2010, 05:24:29 am
Awesome. I'll try downloading this now... But maybe TI-Connect won't let me send this to my calc. It's been screwing around with me a lot.
Title: Physics Sandbox
Post by: Jonius7 on October 16, 2010, 05:31:18 am
wow, ill try it on my emulator...

This is great!!! really good physics!
Title: Physics Sandbox
Post by: Builderboy on October 16, 2010, 06:08:55 am
Thanks guys :) I've been working hard on this for the past couple days ^^

Also note that there is a bug that limits your objects to under 24, so don't go over that unless you want a RAM clear.  In the bug fixed version you will be able to go up to 47
Title: Physics Sandbox
Post by: matthias1992 on October 16, 2010, 08:08:04 am
Extremely cool and fun to play with, one feature for this that i would like to see added is a 'snap to grid', either for the cursor itself or for the created objects (I think the first one is far easier). Aside from that this is pure awesomeness!
Title: Re: Physics Sandbox
Post by: Builderboy on October 16, 2010, 02:07:45 pm
Hmmm snap to objects i can see, but what would snap to cursor do? And yeah, snap to objects would be really complicated x.x i might just do snap to boundaries, but that might get annoying, i usually turn snap off in all the applications i have.
Title: Re: Physics Sandbox
Post by: meishe91 on October 16, 2010, 05:20:07 pm
This looks really cool :) Can't wait to try this later ;D
Title: Re: Physics Sandbox
Post by: matthias1992 on October 16, 2010, 05:45:48 pm
Hmmm snap to objects i can see, but what would snap to cursor do? And yeah, snap to objects would be really complicated x.x i might just do snap to boundaries, but that might get annoying, i usually turn snap off in all the applications i have.
Not 'snap to cursor' but let the cursor move a fixed amount of pixels, so every time I press right the cursor moves 4pxls to the right. Now it is very hard to make two identical boxes without copying because the cursor is very sensitive...
Just like the cursor in SAD, or like any cursor in basic just make the cursor capable of moving by a fixed constant every keypress. Also it seems you can only have one static object? Or did i do something wrong cuz whenever I selected a bunch of boxes and make em static only the first one I selected becomes truly static in the simulation...
Title: Re: Physics Sandbox
Post by: SirCmpwn on October 16, 2010, 05:48:15 pm
Nice!  Very fast, too.  The Source Engine is a lot slower because of the complexity of map collisions.  This one checks with the edges of the screen - a rectangle.  The Source Engine has to check the sides of an object that could be any shape :P
Title: Re: Physics Sandbox
Post by: AngelFish on October 16, 2010, 06:45:24 pm
Download!

I really wish I didn't have several papers to write so I could play around with this.
Title: Re: Physics Sandbox
Post by: shmibs on October 16, 2010, 07:02:59 pm
Not 'snap to cursor' but let the cursor move a fixed amount of pixels, so every time I press right the cursor moves 4pxls to the right.
user defined cursor jump distances should be easy to implement and very useful.

this is genius, and you are genius, and after studying the source(assuming you give it) i (hopefully) will be genius as well. it just needs Phun's gearify option and all will be well with the world :P.
thanks, builder! you're the best!
Title: Re: Physics Sandbox
Post by: Madskillz on October 16, 2010, 07:35:03 pm
Wow impressive all around. Nice work builder!
Title: Re: Physics Sandbox
Post by: Builderboy on October 16, 2010, 07:37:38 pm
Not 'snap to cursor' but let the cursor move a fixed amount of pixels, so every time I press right the cursor moves 4pxls to the right. Now it is very hard to make two identical boxes without copying because the cursor is very sensitive...
Just like the cursor in SAD, or like any cursor in basic just make the cursor capable of moving by a fixed constant every keypress.

Sounds like a good idea :D What i'm going to do is have a "snap" key (probably XTON or something) that will change the cursor look and change it into snap mode.

Also it seems you can only have one static object? Or did i do something wrong cuz whenever I selected a bunch of boxes and make em static only the first one I selected becomes truly static in the simulation...

Hmmmm i just tried it an it worked fine?

Nice!  Very fast, too.  The Source Engine is a lot slower because of the complexity of map collisions.  This one checks with the edges of the screen - a rectangle.  The Source Engine has to check the sides of an object that could be any shape :P

Thanks! :D Speed was definetaly my main goal in Zedd, and according to my calculations, map detection should hardly slow it down at all ^^ Btw did you ever get the Half Life engine demo reuploaded?

this is genius, and you are genius, and after studying the source(assuming you give it) i (hopefully) will be genius as well. it just needs Phun's gearify option and all will be well with the world :P.
thanks, builder! you're the best!

Thanks :] And i most definitely will be giving the source once Zedd and the Sandbox are finished :) Whats the point of a library if i dont give the source ^^ Its for everybody to use and learn from :D

Wow impressive all around. Nice work builder!

Thanks :) Im glad everybody is liking it!
Title: Re: Physics Sandbox
Post by: SirCmpwn on October 16, 2010, 07:41:15 pm
Woops, I'll re-upload.
Title: Re: Physics Sandbox
Post by: DJ Omnimaga on October 17, 2010, 04:23:01 am
Wow that looks great!
Title: Re: Physics Sandbox
Post by: Ranman on October 17, 2010, 04:25:46 am
Now that is pretty darn cool!

Can you define densities for each object? Or... What about changing acceleration due to gravity?
Title: Re: Physics Sandbox
Post by: Builderboy on October 17, 2010, 04:31:01 am
You can define the mass for each object (which directly affects its density) and you can also change the global forces to make gravity weaker or stronger or even go sideways :D
Title: Re: Physics Sandbox
Post by: Ranman on October 17, 2010, 04:33:39 am
That is awesome!
Title: Re: Physics Sandbox
Post by: Ikkerens on October 17, 2010, 07:01:20 am
I still miss one thing, I made this very nice creation that I'm about to collapse, and then... I press clear by accident. Maybe some way to save "drawings" when exiting the program?
Title: Re: Physics Sandbox
Post by: DJ Omnimaga on October 17, 2010, 02:05:17 pm
Mhmm if CLEAR doesn't confirm erasing everything, maybe have CLEAR confirm if you really want to quit? I myself know I would probably get a bit frustrated with that x.x. I always accidentally entire lines of code in BASIC/Axe because I press CLEAR.
Title: Re: Physics Sandbox
Post by: Builderboy on October 17, 2010, 04:11:51 pm
Okay guys a new version is being worked on with a few upgrades :)

World saving that persists across sandbox exit, maybe even different model browsing in future versions
Object bug fix, deleting more than 23 objects at a time will no longer crash the sandbox.  Limit is now 48
Static object has been changed to Lock X and Lock Y, where you can lock each axis separately
Sticky cursor, press a button to go into sticky cursor mode
Title: Re: Physics Sandbox
Post by: ztrumpet on October 17, 2010, 05:33:44 pm
Awesome!  This is wonderful.  Excellent job Builderboy! ;D
Title: Re: Physics Sandbox
Post by: Builderboy on October 17, 2010, 06:10:55 pm
Okay added Axis locking and fixed the bug, implemented autoSave feature, now just to quickly add cursor snap and everything will be golden :)
Title: Re: Physics Sandbox
Post by: AngelFish on October 17, 2010, 07:23:49 pm
I finally got a minute to play with it. All I can say is that I want it on my desktop in full color. :)
Title: Re: Physics Sandbox
Post by: fb39ca4 on October 17, 2010, 08:16:37 pm
Who knows, this may evolve into a dust type game...
Title: Re: Physics Sandbox
Post by: meishe91 on October 17, 2010, 08:21:16 pm
If that's what you're looking for I believe Builder already built one in Java that he has somewhere :P
Title: Re: Physics Sandbox
Post by: SirCmpwn on October 17, 2010, 09:31:52 pm
Epic.  This is really quite good.  Now I wish I'd got my demo properly uploaded :P
Title: Re: Physics Sandbox
Post by: DJ Omnimaga on October 18, 2010, 02:51:30 am
Awesome, builderboy :)
Title: Re: Physics Sandbox
Post by: Yeong on October 18, 2010, 08:41:07 am
Wow! Physics tool!
Is it like mochi thingy?