Well interesting, interesting stuff has been happening, so let's get down to it shall we.
Morning's Wrath Revisions:
So after about a month of effort, about all I've managed to get done is a new /performant/ graphics core. We tested this on some folks and while they liked the speed increases, there were a few things they didn't like, and more importantly they did not feel like the patch was all that important.
So instead of focusing more time (which we technically don't have) on it, we need to cut our losses and say "good attempt, but it's not gonna work". Being an extremely small indie game developer means you must maintain your focus and our focus is the future, Malathedra that is, given that it may be my last game is it critical that I spend all the time I can on it and make it the best I can with the resources I have.
So to anyone looking forward to the Morning's Wrath patch, sorry for getting your hopes up, it doesn't look like it will be surfacing any time soon.
About a week ago, we were facing a crisis, it was an issue we has known about for a while but though we could solve later. It is an issue which is of the utmost importance to anyone making an indie game, ESPECIALLY, an indie graphic adventure.
What I am talking about of course is system requirements, and more specifically graphics hardware requirements.
When malathedra began (then project2) a lot of time was spent researching (waffling) on graphic technology. Would it be 2D? Would it be 3D? 3D and 2D? Fixed Function Pipeline? Programmable Shaders? Heightmapped Terrain? Full 3D Terrain? Etc.
The final combination was chosen, 3D Heightmapped Terrain using Texture Splatting with 2D Characters and Per-Pixel Point Lights. Little thought was given to hardware requirements, at this point I was assuaged by the words of 'the direct3DX FX system can do fixed function too', people seemed confident and that was good enough for me. A lot of time passed, using texture splatting via a single multi-channel splatmap, was not the easiest authoring system in the world, but it seemed to get the job done, generally. But month after month it kept eating at me (when are you going to implement the FFP techniques?) and it began to get annoying trying to find testers who had Shader Model 2.0, required to run the game.
I finally sat down, not long ago, and decided it was time to write the FFP techniques, so that we could run Malathedra on lesser hardware. The moment I started I ran into a huge snafu.
As previously mentioned I used a single texture map, using each of it's 4 channels individually for splat layers, this was very efficient (though hard to author) because it only required one texture unit. However the FFP wasn't going to have any of this, using a specific channel as an alpha source wasn't supported, after some talks with my friend Sirob from #gamedev, we discovered a way it might be possible by bastardizing DOT3, however it would likely run very slowly on lesser hardware, which is where it would be used, plus it wasn't a complete solution, since I could only get the R and B splat channels, not G, which was unacceptable.
So I was faced with a decision, a hard decision, and one that could be pretty devastating in whatever I chose.
Either I had to hardline my stance on shader model 2.0 (maybe 1.4 if I was lucky) or I had to modify the way the engine works to use a different terrain texturing system.
Both choices seemed ill, to hardline it would probably mean cutting off a HUGE swath of my audience; adventure gamers are not up on technology, and you're likely to find many on-board chip-sets and at best 64MB cards, most of which without any shader support, never mind 1.4 or 2.0.
Given that I knew I had to change the system, I was developing something that was using technology far too exotic for what it was, and didn't make very good reasons for it (there is very little save the lighting that makes a case for shaders), in a small market there is no room for alienation.
The problem was not so much developing a new system, but all of the existing content we have, we have a whole first-pass of part1 completed, to throw away all that work would be devastating.
So after some thought, I decided the best idea was to keep it simple. The simplest way of getting a texture on the ground is to simply wrap a texture to it, of course in most games this is prohibitive due to map size, however in Malathedra and the S3Engine alike, it's not, since the areas are meant to be small, in keeping with the 'room' system of most adventure games.
I coded up a quick test using a single 2048x2048 texture map, wrapped onto the terrain, and the results were quite good, some blind tests even said the new was better. this was great because it was simpler to create a single large texture map, which gives you infinite /splat/ layers, doesn't require any special hardware features, scales incredibly well hardware wise, and wouldn't be devastating to existing maps (creating a texture map from the previous splat map template is trivial), in short I was sold.
I revised the engine to work in this manner, and stripped out all the code used for splatting, these changes allowed for increased performance (only one draw prim call per terrain instead of cols*rows draw calls). I was able to write the fixed function techniques, which would switch to vertex lights instead of per pixel lights. Textures are down-sampled accordingly to deal with texture restrictions, and terrain mesh density is scaled down to accommodate as well.
The final result?
On my radeon x800PRO 256MB PCIe Malathedra runs with Shader Model 2.0 high resolution terrain, with 2048x2048 sized terrain maps, with per pixel point lights. (the water sucks, but it will be replaced by the plane system I mention later)
On my 3Dfx Voodoo3 16MB PCI Malathedra runs with emulated Vertex Shader 1.0 and FFP with lower resolution terrain, with 256x256 sized terrain maps, with per vertex lights. (not exceptionally pretty, 16bit mode only with A1R5G5B5, max tex size of 256x256, but it runs, and fast too, not bad for a 7 year old card)
In addition, since we no longer use animated splat textures, we are now using an 'animated plane' system where we can place animated planes anywhere within a scene, of any size and orientation, this works well for water, and will let us do some fun stuff that we couldn't do before :)
Full speed ahead:
These changes have been minimal compared to what they could have been, and now we're moving again, ready to get some significant bite into Part2 of Malathedra. The first step is the work programmer16 is doing to make the map editor adhere to the new map format, and make it easier for us to author maps, since that is the current bottleneck of development.