I'm lovin this 3 week deadline. I've been taking it easy and working on stuff and just having fun.
My game will be the theme words swapped like "Space Limited" or "Space LTD". You run / own a generic space company, and maybe eventually will be able to haul stuff around, mine, make stuff, do regional market stuff, combat etc
All I have so far is a very crudely made shuttle that looks slightly phallic. You can steer the ship and the camera and right trigger fires up the engines.
View attachment 493632
It's funny, getting that ship drawing I think took a couple hours. Getting text drawing? About 12 hours
I was going to do really simple physics, just like a basic accel and velocity but I couldn't get anything to come out right so I ended up porting over this rk4 integrator stuff and it is really nice:
Integration Basics | Gaffer On Games
I'm not doing any of the angular momentum stuff, as it just didn't feel right. I have standard videogamey turning with the analog sticks.
My standard lazy euler angles turning didn't work and somehow I remembered having this problem back around 2000 when I was working on a descent style game. Pitch/yaw/roll gets super goofy when you get upside down so you have to use quaternions and use rotation axisesseeses transformed by the quat at the frame of rotation.
The quaternion library in d3dx math is ... sparse at this time. Here's what you get from the docs
View attachment 493634
So I had to write a quaternion vector rotate. I ended up stealing one out of CGLM, the math library I use for linux.
Same kind of problem with alot of math related stuff. No fmod etc. Since I know exactly what the hardware is it is easy to just write what you need in assembly:
GrogLibs for the original XBOX. Contribute to Kharzette/GrogLibsXBOX development by creating an account on GitHub.
github.com
Later I learned that it is entirely a C / C++ problem. Apparently there's some special compiler flag you need to get math library stuff in C. I put one tiny C++ file in the project and now all the math stuff magically works.
I've had almost no problems at all with graphics. This old directx is a joy to work with. Shaders are in assembly but it is a really easy to write assembly and there's no confusion about how data comes in and out. There's even a 2D mode where you can supply pre-projected verts for 2D stuff.
Everything in dx11 is filling out these gigantic structs to tell it what kind of surface you want, or describe what kinds of verts you are feeding it etc. Dx8 doesn't care. Here's a chunk of ram do what you want with it.
Apparently because of the "unified memory" on the xbox you can also just cast a memory chunk into something else, like treat a vertex buffer as a texture etc. I haven't had any use for it yet but that is cool as hell.