Devlog #7: follow-cam, presets, and main character energy
this update came from a simple problem:
GraSim kept making cool moments, and then they kept leaving.
a neutron star would start tearing through a debris cloud. a black hole would drift into the mess. a star would get launched out of a supernova. and i’d be manually panning after it like the universe hired me as a camera operator.
so now GraSim has body selection and follow-cam.
you can click near a body to select it. selected bodies get a ring, a label, and a brighter marker on the minimap. press l, and the camera follows that body smoothly.
if the selected body gets eaten, merged, exploded, or otherwise removed from existence, follow mode turns itself off. middle-drag cancels follow-cam. esc clears selection.
this sounds small, but it changes the feel a lot. before, you watched the sim from outside. now you can pick one object and let it become the main character.
i also added quick presets:
-
4: binary collapse -
5: neutron star feeding -
6: black hole debris field -
7: orbit art cloud
these are not levels. still not a game thingy. they are just fast ways to start good disasters.
the neutron star preset auto-selects and follows the neutron star, so you can immediately watch it do crimes. the black hole preset does the same for the black hole. the orbit art preset turns collisions off and starts a cleaner trail-painting setup, because sometimes the goal is not destruction. sometimes the goal is making gravity learn cursive.
the minimap from last update is more useful now too. it highlights the selected body, while the main view shows a selection ring and label. the hud also says what you are selected/tracking.
so the ui and camera finally work together:
- minimap says where the system is
- follow-cam says who matters right now
i also added a GitHub Pages workflow.
now pushing to main can install Emscripten, build raylib for web, compile GraSim into docs/gravity.js, upload docs/, and deploy through GitHub Pages. less “did i remember to rebuild wasm?” energy.
under the hood, i added small tested helpers for:
- body type labels
- selected body validity
- follow-camera centering
- click-selection radius
this update did not add new physics. it made the existing physics easier to follow.
which is good, because GraSim already has enough nonsense. now you can actually keep the camera on the nonsense.
thanks for reading :)
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.