I’ve fleshed out the prototype some more and added the following features:
- Drag bodies to set their position
- Pan the world by dragging the background
- Allow user to set gravity strength and whether the world has air or not
- Fixed some bugs when setting a body to static
- Allow user to resize bodies through the properties panel
- Add multiple game states that are isolated from one another
- User can add constraints to two bodies
TODO & open technical questions:
- Allow for setting the world size through the properties pane
- UI for setting collision handlers
- Actually setting collision handlers
- How do I handle changing game states?
- Mouse event handlers should be quarantined to the state of the app (i.e. creation phase controls vs. mouse controls when game is playing)
- BUG: Entering text into properties text boxes is a little wonky. It works, but in a slightly weird way. Has to do with the fact they are controlled components, and need to update state on change, but sometimes state shoudl be updated without updating the body.