Restarting on a new engine... crazy I know!
February 27, 2019, at 06:26 PM (1 comments)
Title: Restarting on a new engine... crazy I know! Author: mgarcia Date: 2019-02-27 18:26 +1100 Tags: 2019, 3DS, PC, Pics, GameDev, Blog Comments: Open
Image of cubes, one triangle has alpha transparency on, the other does not.
Click to view original image: 53kb
I was doing some research on C/C++ optimization and came across a great PDF, I found the audio of the presentation on the GDC Vault and I put them together in a video.
1 comments on "Restarting on a new engine... crazy I know!"
- mgarcia: 2019-02-27 18:26 +1100 Yeah, it sucks to go back to nothing.. but had to be done.
Targeting the original Nintendo 3DS with 3D requires a pretty lean engine.
And while my old "engine" could do a lot, it wasn't going to run well.
I wasn't sure I could do it and it was depressing me out a bit.
But it worked out a lot easier then I thought, I guess the longer you do it, the better you get at things... anyway.. now instead of having a huge mess of a code base held together with code glue, I have a very tiny code base that's better structured and more manageable.
What I did was:
* Reduce the maths functions to the bear essentials (muls, add, sub, dot product, etc), removed highlevel abstractions like a camera, replaced with just 2 vector (direction and angle) and a matrix.
* Unroll the multply loops with prefetching.
* Removed RGBA, instead it's using XYZA UV, the W is used is alpha (transparency) in the shader.
* Structs are simpler and better aligned, separated out hot and cold data, see video above.
So far the inputs and rendering is working on SDL, next step is 3DS!
math is life, life is math!
Comments are open.