Here's a very early preview of a little physics sandbox I've been working on. This was inspired by Alexar's Box2d Helper.
This will not work fully with Love 0.10.1, you'll need the development version.
ctrl+z,x,c,v do what you expect, for the most part.
ctrl+d deletes the selected object.
ctrl+g toggles the grid.
ctrl+b or ctrl+click a shape to select the body instead of the fixture. When a body is selected, drawing more shapes will attach them to that body rather than creating a new body.
Hold alt when drawing a shape to snap to grid. Hold shift to draw around a point.
Hold ctrl when drawing a joint to collide connected bodies.
Roll mouse wheel to zoom, press it to pan.
Right click to finish drawing chains and polygons.
Known issues:
All joints available except mouse and gear. There's no "world body" yet so some joints are not really useful, like wheel. Keyboard commands not mac-friendly. Undo stack not constrained, but I haven't run out of memory yet
There is also at least one thing that can't be serialized properly at the moment (reference angle for some joints, #1194). This affects the undo stack and save/load behavior. Thanks to bartbes and slime, many similar issues (#1175, #1176, #1179, and #1191) have now been addressed; I'm looking forward to seeing these in the next Love release.
If you find an issue that wasn't mentioned above, please let me know. Also, any suggestions for improving user input are welcome.
Lovely Physics Sandbox
Re: Lovely Physics Sandbox
Looks quite promising! Great job.
Two questions:
- What will the license be?
- What functions are not available without a more recent LÖVE?
Two questions:
- What will the license be?
- What functions are not available without a more recent LÖVE?
Re: Lovely Physics Sandbox
Thanks! I fixed a few bugs after I posted that, I'll probably put it on github soon but I want to get some more features in first. Also I probably have a few more tickets for the issue tracker regarding ghost vertices on edge and chain shapes and I might want to see how that shakes out first.
Probably MIT, do whatever you want with itpgimeno wrote:- What will the license be?
See #1175, #1176, and #1179. Basically undo/redo will break if you use certain joints.- What functions are not available without a more recent LÖVE?
Re: Lovely Physics Sandbox
Heads up: I get this error when I try to change the density of a body using the slider
Re: Lovely Physics Sandbox
Yeah, that's what I get for refactoring at the last minute. You can change body to fixture:getBody() on that line if you want. Deleting a dynamic body while moving it will also error. Will put a new version up soon with chains, egdes and polygons and fixes for those 2 bugs. Thanks for reporting it
Re: Lovely Physics Sandbox
Updated with the stuff mentioned in previous post. Polygons might not work like you expect. There's no fancy automatic "composite" polygons with lm.triangulate or anything, these are just straight love.physics polygon shapes (convex, max 8 points).
Re: Lovely Physics Sandbox
Updated, download in top post. World saving and loading is now supported. Added a new plugin system and two example plugins. The example plugins aren't super useful, but should give you an idea of how to write your own if you want to. Plugins and saved worlds are in the appdata directory, of course (appdata path is dumped to console on startup for convenience).
Code is getting a bit messy now, next update will probably be a partial refactor, and add scriptable scenes and some cool plugins.
If anyone does happen to write any plugins, give me a heads up and I'll look at including them (that way if I break them with future changes, you won't have to worry about fixing them yourself). See airstruck/ape for an overview of how plugins work.
Code is getting a bit messy now, next update will probably be a partial refactor, and add scriptable scenes and some cool plugins.
If anyone does happen to write any plugins, give me a heads up and I'll look at including them (that way if I break them with future changes, you won't have to worry about fixing them yourself). See airstruck/ape for an overview of how plugins work.
- AntonioModer
- Party member
- Posts: 202
- Joined: Fri Jun 15, 2012 5:31 pm
- Location: Belarus
- Contact:
Re: Lovely Physics Sandbox
Good GUI, good editor, keep going airstruck !!!
Better to move this topic in the sub-forum "Libraries and Tools".
Better to move this topic in the sub-forum "Libraries and Tools".
Re: Lovely Physics Sandbox
Thanks!AntonioModer wrote:Good GUI, good editor, keep going airstruck !!!
I'm waiting to see what happens with #1194 before next release, this is really critical for "soft" weld joints and for revolute joints with limits. My working copy depends on that "reference angle" being exposed. I've submitted a patch, but part of the implementation is a little weird. Wasn't sure what direction to go in to make it better, just waiting for feedback there (see comments on that ticket). As soon as that's addressed I'll probably update this.
When I posted this, I thought of it more as a "creation," just a thing to play around with to learn how love.physics works and try stuff out without writing a bunch of code. I suppose it's going more in the direction of a "tool" now though.Better to move this topic in the sub-forum "Libraries and Tools".
Who is online
Users browsing this forum: Google [Bot] and 3 guests