Beam Weapons and Epic Battles

Beam weapons are now fully-implemented (the previous implementation was just a hacky prototype). A nice detail of my current weapon implementation is that turrets on ships actually rotate to track their target. It's pretty cool seeing those massive turrets on capital ships swivel towards an enemy ship, then rip them apart with a huge beam of energy.

I'm doing some stress tests with loads of ships in a free-for-all just to see where the bottlenecks in the engine are located. Not surprisingly, almost all of the time is spent in the code for pulse and beam weapons, performing the necessary scene raycasts in order to make collision work. I've already accelerated this a lot with a spatial hashing structure, enabling fast raymarching for short rays (pulses and beams qualify for this). Then, there's a world space AABB test and, finally, OPCODE does its thing with those AABB-trees.

Apparently I've done a pretty good job of optimizing so far, because I can handle about 50 ships in an all-out, epic war before my fps drops below 60. Still, I'd like to push that number to at least 100. I'm not going to settle for limiting the number of ships that can be in an engagement in this game - if you've got the cash to hire a hundred wingmen, you should be able to use them!

Coming Together

The past few weeks have been a flurry of small changes, incremental improvements, and endless tweaking to hone the look of the game. Everything's starting to come together! With a decent ship algorithm, a good metal shader, and some decent procedural textures, things are starting to look pretty nice.

I honestly never thought it would end up looking this good. I guess I got carried away...then again, that's why I'm in graphics. It's just far too fun and gratifying, trying to make everything look as good as possible. Still, at a certain point, I am going to seriously shift my focus back to gameplay. For now, though, I need to impress for Kickstarter!

Metal and Ambient Occlusion

I've spent a LOT of time on the look of metal lately. Finally, I've managed to make ships look like they're made of metal!!! This is the first time I've ever had any success with metal BRDFs (even in my offline rendering experiments). I think the main key that I was missing is that the distribution really needs to be exponential rather than power-based to look convincing, otherwise the surface looks like plastic. Another key is to modulate the specular amplitude in some interesting way (just modulating it with albedo looks great).

On top of good metal shaders, I now have new-and-improved SSAO in the engine. Together, the metal and AO are making my ships look better than ever before! In addition, I think I'm finally getting closer to a good procedural ship algorithm. It's taken forever, and I'm not there yet...but I'm getting closer.

Here's a cool shot that I took tonight. This has a bit of post-process on it for dramatic effect; I wanted to use it as a wallpaper. Still, you can get a nice sense of the metallic surface.