Game Design, Programming and running a one-man games business…

Better Smoke Clouds

Sooo…

On my list of stuff I think looks not good enough, for me to improve when I am ahead of schdule and ‘treating myself’, is the black smoke clouds left behind when ships explode (mainly cruisers). They always looked a bit poor, and were just a handful of big sprites that rotated and faded in and out.

I’ve spent a good few hours investigating techniques and ideas and ended up with this:

Looks better in motion. Despite a lot of reading about fluid dynamics and mega-particles and other stuff, I ended up just using spinning sprites again, but this time with tons of refinements, in terms of different sizes, generation delays, greater sprite contrasts, and using sine waves to control spin speed degradation, sprite size growth and also now have 2 distinct groups of them in different size distributions.

I also experimented splitting them into layers so ships could fly through the smoke, underneath half of it, but it looked a bit wishy washy so I junked it. There is some extra fillrate involved in doing this, but I don’t think GSB is maxxing out many video cards right now, and this does look better to my eye.

Also, retreating now works 100% in the campaign game. Just need to have a visual retreat countdown timer and some tutorial hints for it now.

Unhappy with lighting stuff

I did some campaign stuff today, but also tried to finish off my weekend stencil buffer fun, had a brief flirtation with shadows, and got loads of stuff working, but was not happy. Basically my plan was to be able to take an image and draw it so it only appears on the ships. This would work for light sources, as well as shadows.

It worked! using pixel shader version 3, mind, but that would be togglable. The downside is, it looked crap, mainly because the ships are just sprites, and shadows therefore just splat over them rather than ‘rolling’ and it looked fake, and maybe worse than none. The lighting glows stuff looks better, but still bad. Using normal maps for the ships is theoretically possible, but insane amounts of grief, especially because it wouldn’t work on the turrets without re-doing them all. Bah.

Here is how it looks, if you can even tell. There is a brighter light glow around the laser bullets, as they move over the ships.

It sucks, and I am determined to get the game looking better than this. Also looking at other potential effect improvements…

Todays Bugs

I found a bug today, after it was reported by a few GSB modders. I had done some cunning optimisation for my file handling months ago, where my Ini File loader code kept a file open during it’s lifetime in case another section from the same file got read soon afterwards.

It turns out that the C Runtime barfs if you try to open more than 512 files, under all circumstances. This is fine until you mod an extra 300 modules into GSB, then it just dies. So… problem fixed. Ideally my ini file code should be able to handle this better entirely, but thats for another time,

The second ‘bug’ is still underway, (point defence modules appear to not respond to damage, but in the debugger, they clearly do…) but its pointed me to a third one, that was also reported…

When a point defence beam shoots a missile, it may not work. The missile may be unharmed. In this instance the missile is still ‘claimed’ by the PD module until it dies, so no other PD module will have a second go at it.

I could fix this trivially, it’s just an oversight*. But would that make PD too powerful? It’s already prety good, albeit some of it’s thunder has been stolen by the Swarms Smart Bomb. It’s only going to kick in where you have a few incoming missiles and multiple PD modules. But that second chance to fire could save you from that vital pesky megaton missile, or Order nuclear bomb…

Thoughts?

*easily explained though. The neutron power surge generated by the point defence beam temporarily blinds the targeting mechanism of other PD modules from homing in on the positronic flux decoupler on the same missiles.


Edit: actually the PD bug is now fixed, making them fire much slower as a result, so I’ll fix the multiple-attemptsĀ  bug to compensate. it also turns out that the fire-Interval for guidance scramblers is misleading and not applicable, which explains its strangely high effectiveness, so that will be nerfed slightly too…

‘Fluff’ ships

Something I got coded today on the campaign game is purely visual fluff. I have a map with different planets scattered over it, and they are linekd by wormholes that only connect certain pairs of planets, so you can’t just hop all over the place.

To make it clear that those wormhoels are, in fact, wormholes, I’ve added a bunch of ships flying back and forth along their length. The impression I’m after is similar to a few scenes from Revenge Of the Sith, where you see obvious ‘space higheways’ above coruscant with lines of ships heading back and forth. I loved that :D.

Obviously, for the purposes of the campaign game, they are implied to be personal ships or merchant ships. The space navies are your department, these ships are just background fluff.

It took me about an hour to two hours to get it right. Just drawing a bunch of sprites going between two points is easy, but they had to work within the zooming and panning interface, and also have to scale with processor speed for smooth movement. Then they need variations in speed, and have different source images (in a texture atlas). Also, they need to fade out at extreme low zooms, so you don’t waste time drawing stuff that’s tiny. lastly, they need to be batched together as an optimisation so that there aren’t a bunch of texture swaps. It’s all those fiddly bits that take the time. Plus I need probably another 30 mins to put together decent tiny ship sprites for use as final graphics. Should be easy and fun :D

In other news, Democracy 2 is still just TEN DOLLARS, because due to pretty unusual circumstances, the UK STILL has no government, and I proudly boasted it would be 50% off until a prime minister met the Queen.

bah.

BTW, the competition to win that spaceship runs out tonight. I’ll pick a winner tomorrow, so enter now, if you haven’t already done so.

Surely not more stats?

I’m afraid so:

I’ve added filtering by module type too, with the pie charts that show the damage done. This isn’t also filterable by ship, so it isn’t totally uber, but sod it, this is a game, not excel, it has to end somewhere :D

What this new view lets you do, is (for example) select just your frigate plasma torpedoes and see that actually 95% of their shots missed, whereas only 35% of the cruisers torps missed. That might be a good thing to know…

Hopefully tomorrow I can spend a lot of time tweaking the UI for this, and testing it extensively. At some point I need to declare the stats upgrade done, so I can concentrate on play balancing for a few days. Then after that it’s back to the long discussed and hugely involved online thingy.