I know I should be working on my November game, but the prospect of being able to devote more time to Space Wars (As well as finding a real game name for it – Space Warfare Infinite?) has been too tempting! I will get back to my monthly project soon, but in the mean time lets talk updates to Spacewars.
Bloom is all the rage. It’s the main reason to get Unity Pro from what I can tell. That and the profiler. But lighting effects take your game and put it in the pro category – at least with the looks. I’ve been trying a bunch of different post-processing effects, but standard bloom seems to be the best for making space object look interesting and making laser flash and glow. The battle now just seems more alive! The downside is that brighter backgrounds glow too much and look too bright. At the moment I am just letting it slide. I fooled around with the camera render orders and such but could never get the bloom to only effect lasers. So far it doesn’t seem possible for me. (I did see someone wrote a shader that keeps bloom from rendering on something. I might do something like that someday to fix the nebulas and other stuff I don’t want to glow).
I’ve also been futzing with the Ai. I really want to write behaviors and more decision making. The current Ai chooses a random target from a list of enemies and then blindly charges. When in range they start firing. The other behaviors include: if they get hit a couple time in rapid succession, they will find a random waypoint to run off to; if they are attacking for more than a few seconds they will find a new way point to back off and then go back to it; if they get hit by a ship that is not their target a few times, they will switch targets and defend themselves.
Last night I changed a few things that annoyed me. First I added a lead object to each ship so that ai will aim just before the target thus leading their shots. Works well for moving objects.
I want to build a behavior where the Ai does flybys or other maneuvers that make sense. As I step towards that, I removed their ability to stop. It looked super dumb to see ships just floating in space taking shots. I just have them thrust at all times now. I also dropped their rotation speed from 20 to 1 which makes them curve a little more when flying – looks more natural. No more turning to the player in a blink! I also want to add a behavior when they are too close for more than a few seconds, find a nearby waypoint to go to before attacking again — the ai seems to get in close and then circle the target without being able to aim shots. They need to be able to get a new attack vector. The movement makes the game much cooler looking. Everything circling around with trails.
Ai Behaviors I am hoping to put in:
- Rush pass / loop: Ship flies by target attacking as they pass then pulls up and executes loops to do another run on same strike vector
- Flanking loop to hit target from side Circle to get around and behind target Go to waypoint
- Patrol series of waypoints
- Follow / Protect target
- Follow / Copy target (attack its targets) Stand still – cap ships will prob do this alot Kamakazi ramming
- Strafe side – get up to speed then rotate to aim guns at target let inertia carry ship along side target while unloading weapons… (currently not possible in way game handles ship flight… but this might be an effective attack for fighters against a cap ships PDS)
- Preferred targets – weakest, injured, toughest, untouched, ranged, fighter, cap, midrange, auxilery, stationary, slowest, low shields, low armor, high shields, high armor, no ‘type’ gun, specific ship
- Scanning / Sight Range- how far should awareness go? Should be increased by auxiliary scanning ships in fleet.
- Use specialized component – Scanner Jammer, EMP, Cloaking,