Sunday 5 February 2023

Physics Debugger in my Home Game Engine

It may not look much, but this is a huge step forward in my home game engine development.  This is a physics visualization tool I've written, to show me the shapes I register with my physics simulation, it communicates with the game client one frame behind the client, and lets me zoom a camera around the world to see whether shapes line up and to take a snapshot of the physics/collisions being resolved this frame.

The whole physics system is pretty much a bag of spatial checks at the moment, for instance I ray cast from a given point to the four corners of a cube to test whether the point is within, that's pretty compute-intensive.

But at least now I can see there is only one such cube (the purple/pink) one in the scene.

I can also clearly see the ground mesh (the yellow/red triangles).

Infinity is just the blue.


Also, this rendering of the physics world is using yet another renderer I've put together, again integrating ImGui as my defacto GUI in such circumstances.

I need to do a lot of work on this, but it's just a fun project.

And recently having a bit of run, something you can tinker with, something which just makes you think and relax is perhaps key to improving ones skills.

Before I started this whole home game engine (despite working on games at work) I had no idea how to put a renderer together; even as badly as I have; and certainly no idea about a physics engine, now I have the rough knowledge of both.

My home project backing up my experience at work, and also the home project lets me try things I might not otherwise do at work, like totally break things... Oh no wait, I break things all the time....

No comments:

Post a Comment