Skip to content
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

Build a pluggable debugger for physics #110

Open
w0rm opened this issue May 21, 2021 · 0 comments
Open

Build a pluggable debugger for physics #110

w0rm opened this issue May 21, 2021 · 0 comments

Comments

@w0rm
Copy link
Owner

w0rm commented May 21, 2021

The idea is to implement a debugger that could hook into any Elm program, grab a snapshot of elm-physics world, and open up a 3D visualiser for it in a new window, where everything is inspectable, clickable, etc. And where you can save the snapshot and examine it later.

  1. Maybe a wrapper around the Elm compiler with a special debug-physics mode that would post-process JavaScript to expose things for the physical debugger, that would be pointed at the JavaScript objects from the game using the same Elm types?
  2. Or maybe a json encoder/decoder for the physics World, so that the game could encode it, and debugger decode it — slower but could be useful for other use-cases

Because the debugger needs to expose internals, that otherwise might not be available through the public API, its code could be colocated with Elm physics code but have a different elm.json file.

https://m.youtube.com/watch?v=1RphLzpQiJY was the inspiration for this idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant