I'm finally feeling pretty good again after a week of having a cold, but progress was kind of sporadic this week. Friday was great fun though! While I have been working on other parts of the trailer I have been thinking a lot about why combat isn't as exciting as I want it to be. I had a bunch of ideas and that all started to come together Friday afternoon.
The first realization I had is that it looks odd when every attacker is shooting at the exact same point on the target. Previously an attacker just shot at the centre of the target's bounding box. Group attacks looked like an asterisk. I modified weapon aiming so that each attacker aims at a different spot on the target. Since weapons are no longer aiming at the centre of the shield sphere, I needed some new geometry code to calculate the intersection of the weapon with the shield sphere but now on vehicles which have a shield, the weapon effects end at the shield, which looks great.
Next I added a new system to support particle effects at the gun muzzle and at the target. That allows me to do muzzle flashes, smoke plumes and weapon strikes. This is not the type of thing to try to figure out while under the effect of cold medicine.
The next problem was that when a weapon was firing it was either on or off, so lasers, lightning, particle cannons, they all fired continuously and a couple times a second damage would be applied to the target until it exploded. That's ok, but it doesn't really make for a dynamic battlefield tableau. Friday I changed that so when a weapon fires, the weapon effect comes on, you can see the health bar go down as damage is applied, then after a short period the weapon effect turns off until the next time the weapon is due to fire. (The old continuous fire system is still supported for big units with powerful beam weapons.)
Weapon effects also needed an upgrade so the first new one is a lightning effect. I found this great tutorial on how to make lightning in GIMP, and it only took me about 15 minutes to make this cool lightning texture. In the shader I use a random number to swap the texture coordinates of each of the 8 frames left for right and top for bottom to give me a total of 32 different lightning bolts. I used the new particle effect system to add white flashes where the lightning strikes and to add sparks and a laser-dazzle effect to the beam weapon. Next week I'll be trying to add a flamethrower and missiles with smoke trails.
We were unable to retrieve our session cookie from your web browser. If pressing F5 once to reload this page does not get rid of this message, please read this to learn more.
You will not be able to post until you resolve this problem.