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

Fixing minor graphical things

It’s the weekend, so rather than working on gamey stuff I’m making the battles look better :D. I’ve been improving the way the big ships explode so the drifting hulks fade in better, and the subsidiary explosions now blast in various directions. Turrets now smoothly track their targets, and there are various other small tweaks like highlight flares when bullet weapons fire.
My last niggly annoyance of the day is bullets, by which I mean laser pulses.
I draw all the bullets in one go, to make it extra fast, which is fine, but to do this I have to draw them AFTER I’ve drawn all the ships.
The thing is, the bullets are quite big, and when they ’emerge’ from a gun turret, they obscure it for the first frame. Ideally, I’d draw the bullet above the ship but below the turret so it would emerge naturally.
I think I’ll code a real horrid hack, which is to mark bullets as ‘n00bs’ for the first few pixels of their existence, and draw the n00bs separate from the main bullets.
That way I keep generally drawing them fast, but I also don’t get any anomalies when you hit pause and catch that 1 in sixty-off chance of seeing the frame where it looks wrong…

This is why game code looks like spaghetti. All those hacks are there for a reason I tell you!

2 thoughts on Fixing minor graphical things

  1. A typical non-hack way to handle that is to let your particle system do what it wants to do. You have those little glows on the muzzles already, add another particle to them which is an initial blaster bolt that quickly emerges advances a bit and then disappears. You launch your blaster bolt a few frames into the muzzle flash, and the fake bolt on the flash will give you the emergence you want.

    That’s how you can handle it an a way that (if you have an art team) the art team can achieve the effect without adding code.

    Anyway, your system looks very pretty, thought I would mention that :)

Comments are currently closed.