-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a Nape physics Body editor #4
Comments
This would be an amazing contribution! 👍 Slightly related I guess: HaxeFlixel/flixel#961 |
Just put up a very quick and dirty proof-of-concept app: https://github.com/andrey-p/nape-physics-editor I'll work on this until it becomes a bit more acceptable (add the ability to move vertices, change materials, interaction filters etc) and I'll add it as a fork of this repo. |
This is so very cool, I've tried testing it with openfl but I got: |
Shoulda mentioned, it currently only works with cpp / neko targets. I'll make the Flash target work next I think, the systools library that deals with file dialogs doesn't work very well on my system. |
Looking promising, but still very basic. |
Oh yeah, I won't even try and pretend it was anything but basic. :) I'll work on it a bit more, will probably pop into IRC if there's any new and exciting features. Also, thanks for the pull request, much appreciated! |
Can't this be used with the debugger? I have a dream of a world in which the debugger behaves like a in-game editor... |
@sruloart Not sure what you mean. |
Just reflecting out loud. I'm thinking of a Unity like in-game editor for a while now and this is a very important part: you run your game in debug-mode, but you can choose every object you have on screen and add a Physics body to it like you would on Unity. This is where the editor comes in, to automate the process of creating and saving the physics bodies for your sprites so you can load them in your game. I've learned by now that big ideas should come with a viable way of accomplishing them, so I'm not getting into particularities just yet...(If you want to read a completely theoretical rambling keep reading). Rambling begins here
Rambling was terminated due to excess amount of day dreaming |
I was evaluating PhysicsEditor to use for the game I'm working on, but the Haxe output is a mammoth class that you need to edit manually to fit with HaxeFlixel. (Not to mention it doesn't work on Linux so I'm having to run it through Wine.)
I'm thinking it'll be straightforward to make a Nape physics body editor similar to PhysicsEditor, specifically aimed for use with HaxeFlixel and Nape. There is already a Nape example which demonstrates creating a body from a sprite.
Then you could serialise all the shape data in a JSON format (Physics Editor sort of does that if you export for Lime + Corona (JSON) but it doesn't quite fit with the way Nape works) and store it in your assets folder.
This is something I'd probably end up building for myself anyway so I'd be more than happy to contribute.
The text was updated successfully, but these errors were encountered: