Many of you were nice enough to try this out before so I thought I’d put progress over in its own thread instead of always clogging up the screenshots thread. I’ve moved the download and done an update with a stats HUD and stuff. It also actually puts objects to sleep when they are inactive versus always processing them all the time.
The new download page is here:
…a bit nicer download speed, too, I guess.
From before…
So, this past week I started rewriting my physics engine from the ground up based on several years of lessons learned. This time I intend to build in ‘zones’ right from the start. Part of this was a redesign to clean a bunch of things up so it’s always exciting when it starts working again. Even kind of more exciting when I find and fix a bunch of bugs that existed in the math for a long time but only now are easy to find because of the better infrastructure.
I’m building this as part of a suite of Mythruna-related infrastructure that I may open source separately at some point. It kind of just depends on how far it goes and if it stays clean enough.
Anyway, not much to see but I do have some screen shots today. These are pictures of my demo app that I use to test things. I can shoot various size ‘bullets’ as well as drop big 1 meter radius bombs. This sequence is after I spammed a bunch of stuff and I’m watching it settle and the temperatures cool down (I use simulated annealing for improved accuracy but that’s another story.) The solid shapes are static. The textures shapes are the bullets and bombs and stuff.
Full discussion starts here:
Also from before:
WASD + mouse moves/looks. Left mouse fires big bullets, right mouse fires little bullets… space bar drops a bomb at the section of ground you are looking at. With no crosshair it’s kind of find to guess.
The settings are currently optimized for stability so it’s possible to get the balls to hang over the edges of the cubes and stuff if you hit them right. I’m also not sure why friction stops the small balls instantly on a rebound. It may be due to some other friction changes I made and it may just be a fact of counter rotation + high friction and low restitution (bounce).
Either way, I will always err on the side of stable versus chaotic. It works better for me and my game. (And hours of playing Skyrim makes me feel much better about my physics engine, anyway.)
To that I will add that F5 toggles the JME HUD. I haven’t setup a key for the new physics stats HUD so it will always be on.
In the new stats HUD:
Total: the total number of objects.
Active: the number of objects that have not cooled and gone to sleep.
Frame load: the percentage of a theoretical 1/60th of a second that the physics step is taking. Low is good. more then 100% means frames are dropping for sure.
Object load: is the average number of ms that a single object costs. This is more for me to compare the performance of the new algorithms I add. Some of them will add a constant per-object-load while decreasing the maximum per object load in the busiest cases. I needed a way to see this and see when I’ve done something really wrong in a way that doesn’t necessarily require me to spam 1000 objects first. (Though note: low object counts get penalized for the non-per-object stuff.)