I’m using Bullet if any one is interested on reading about it. Bullet is quite a famous physics engine, you may have seen it more than you realize.
Below is a picture of the debug wireframe mesh that shows the physics layout in the world. For good measure is a cube sitting on the ground. The spotlight shadows need bit more work as you can see, it looks like there’s 3 spotlights, but there’s actually only one.
How it’s applied to the engine
Physics can be quite a tough thing for the end developer to get right. That’s why I’ve abstracted all the hard stuff to the internals of the engine. The developer only has to worry about what kind of constraints, forces and collision shapes they want.
The engine handles tricky stuff like minimum and maximum time steps and also keeps track of all the collision shapes and rigidbodies that have been created. Which allows the engine to handle memory automatically.
All positional variables use 64bit double precision numbers. This means you can have huge worlds without having to worry glitchyness.
This is good news for our open-world target.
The only trouble I’ve had using Bullet Physics is sometimes it’s hard to figure out what’s causing a problem due to it being a native library. When things do go wrong, they don’t exactly give me a useful means of debugging, meaning I usually have to search for clues on the internet.
The most annoying bug I’ve had so far seems to actually be a bug currently in BulletSharp. If I send in my own inertia values it causes an AccessViolation. An AccessViolation is when the program tries to read some memory outside of where it’s supposed to. I think it may be something to do with the fact I’m using the 64bit version.
Also this week I’ve worked on adding external editor support to the editor. For now, this mostly means opening script files with a text editor of choice. Mine being Notepad++. However since Notepad++ doesn’t support intellisense, I eventually want to add support for using Visual Studio.
Over the next week I’ll be focusing on adding scripting to the engine. It’s not really scripting. It’s more like loading a .Net DLL and using reflection to examine objects and start loading them as demanded by the scene.
I’m still deciding if I should make it import the DLL directly, or compile it on demand.