As you may recall from yesterday's blog, my mission was to return to the PC after tea and work on Reloaded, which is precisely what I done. I downloaded the source to the Intel Software Occluder, found it was VS2010 project so installed Visual Studio. It also needed DirectX 11 SDK so I installed that too. Compiled and ran in debug and half the 3D world was missing. Compiled and ran in release and it worked fine.
The Intel Software Occluder was something written back in 2011 which uses a system memory depth buffer and CPU rasterisation techniques to figure out which objects are entirely occluded by the scene. The source code looks straight forward but it is quite involved and will take a lot of reading and picking out techniques to understand the whole thing, but it's a great technique, especially for PC's that have multiple cores.
One drawback I identified early on is that it used DirectX 11 (not surprisingly) and my engine is based on older DirectX 9 commands. My fear is that the technique uses some new fangled depth buffer commands only found in DX11 which means I cannot use it with DX9. A lesser fear is that the technique is still possible, but I would have to convert the DX11 method to a DX9 method, which will take time and would no longer be a drag and drop operation.
And There's More
While I was in the neighbourhood I also decided to set up the new source code folders for the Reloaded project, dropping in the latest version of FPSC V120 and the latest Dark Basic Pro build which can compile the source.
I upgraded my DBP DLL builds to use VS2010 so I don't have to have three different versions of Visual Studio floating about, and did a test compile to make sure I can still build Basic3D.DLL for FPSC. All good.
It looks like I will have another evening free to work on Reloaded tonight, and rather that dip dive into the complex world of CPU depth buffers and DX11 to DX9 conversions, I am taking the easier route of dismantling the build system from the current FPSC source and getting the Test Level button to do something different.
Test Level With A Difference
It won't be an ambitious change as I will only have a few hours, but my goal for the evening is that when you press the green Test Level button, instead of the map editor being terminated and the new game executable launching into build mode. I will simply switch the map editor into a new 'live play' mode which re-uses all the existing assets present in the map editor at that point.
With this in place, theoretically, you should be able to press the button and instantly transport to the start marker in first person view, right inside your map editor world. I used to have such a feature in FPSC way back when called Preview but it was trapped between two worlds and did not really delivery on it's promise. You could say I am going back to Preview and finishing the job.
I will probably use the built-in collision system of DBP to allow level navigation to begin with, just so I can get a feel for the new feature. The ultimate aim is to implement a whole new 'unified' physics system to take care of everything from player movement and collision to exploding walls. That will probably be the world of another day and worth saving!
In terms of internal schedules and deadline, I had planned to have the build system decoupled last Friday and I am already one week behind. By the end of today, I should be back on track (technically), but of course my aim for THIS Friday in the original schedule was to have real-time light mapping going on in the background of the editor. My guess is that it will take a few days to get that into the system, and if I keep plugging away I'll be able to catch up.
Currently being plagued with power cuts and intermittent internet at the moment which is no fun if you are making lots of large uploads and keeping in touch with the world wide web. Hopefully the powers that be will fix it long enough for me to get on with things.