How to stop a camera from clipping into models; without using raycasts (because my engine doesn't have easy an easy generic ray cast system).
My firsts idea was to just slap a collision shape around a camera, but this has some issues.
By surrounding the camera with an OBB (oriented bounding box), we …
An algorithm created to make AI not fly into things (it's not boids).
The high level idea is to create avoidance spheres.
When an ai agent enters a sphere, it avoids the center.
The deeper the agent goes, the more avoidance it has applied to it.
The avoidance removes a portion of its desired direction …
Adding hand-made collision to the large ships so that fighters cannot fly through them.
I tweaked the model editor so it can load in models to define collision shapes.
There now is an XRay mode that lets you see wireframe of the ship with colored rendering of collision shapes.
To debug collision in th…
I've created a starfield environment to give the game some life.
no longer do you have to fly around in pitch black, getting lost in the void.
now there are stars, planets, and a local sun.
the fighters are now lit via the local star's direction vector from the origin.
the planets are also lit f…
I created a camera system in c++ from scratch to control fighter ships.
fast fastest iteration, I created a tool to tweak parameter in real time, using ImGui.
this let me find the "feel" I was imagining for the ship, without needing to recompile code
being able to pilot the ships let me test fighting …
Using the behavior tree system I created (Previous Update), I have created an AI brain that lets fighter ships dog fight one another.
I've created several sub trees.
there are subtrees to evade.
subtrees to dogfight.
I ran into some performance issues during rapid state transitions in the behavior tree…
I created a behavior tree system that is defined completely within c++.
AI entities have a brain which spins up a behavior tree.
The nodes in the behavior tree are heap allocated, which I believe does have some noticeable performance cost.
The reason for this was to easily use virtual methods a…
I created a particle system that uses instance rendering to efficiently draw thousands of particles with very little overhead.
I had a nondeterminism bug that renderdoc helped me solve.
If I recall correctly, the nondeterminism ultimately came from a delegate subscription happening in different order…
DevBlog 7 - Stress Testing Projectile Performance In My Spatial Hash Based World Partitioning System
I've set up firing an a lot of projectiles to push performance to its limits.
To assist with this I created various debug tools, such as a projectile tweaker.
Projectiles are configured via a json file and can be serialized to the disk, and referenced by other configs (such as a fighter ship config).
Time dilation allows me to speed up or slow down the passage of time. The way this is implemented is rather simple. The frame's global delta time is multiplied by a time dilation factor. As I prepared my space ship models for collision, I needed a way to test if it was working. Unfortun…