Space Warfare: Infinite April Developer Log

April has been a busy month!  I’ve been putting in a lot of hours bringing the game back to demo level with the new graphics and the new code spurred on by some good pressure due to awesome interview with Fists of Heaven and a video chat with  ThatCooperFellow. In retrospect, the whole year has been rather busy if I think back on it…. here are some things I’ve been up to…

Lasers, missiles, explosions!

Lasers, missiles, explosions!

Since last year, I’ve:

  • rewritten a lot of the ship components – making the engines and maneuvering more realistic and customizable to work on all different ships,
  • made more complex AI with goal setting and steering,
  • implemented some moving origin capabilities to make the battlefields more expansive and allow for some seamless travel – still WIP,
  • created the beginnings of a procedural galaxy generator that builds different galaxies and nebula and plots planet locations as well as assigning star types, planet types-based on distance from the star etc- and other details,screen_7.920277
  • created some new nebula types that can be randomized and colorized for more variation
  • created and found some procedural substance textures for planets that work with Unity5 lighting and can be randomized for variation through the galaxy generator
  • built a few new HDR space skyboxes
  • made new cap ship models that should lend themselves to part swapping to make more type variations (more to come),
  • new beam weapons and missiles,
  • more complex turret AI that takes orders from its main ship AI to focus fire, target certain types or even fire at any targets of opportunity,
  • more complex explosions that have multiple stages for bigger ships (still wip but already looking pretty cool)
  • implemented a new radar and target tracking system connected it to the AI
  • targeting now seamless allows for targeting whole ships or component pieces
  • targeting all based on factions and classes instead of unity tags – more complex relationships and more advanced decision making for AI
  • there is a new mission / battle editor that I worked on over the summer too – something I need to start revisiting soon.screen_46.13708

Here is a recent video of some of the dogfighting action (hoping to get a cap ship video up soon too!)

Space Warfare: Infinite – Dev Log – All about Scanners and Target Damage

This past week I’ve been working on unifying the ship code and it is just about done. Now the player and AI ship code is shared completely with added scripts for the extra player functions like input and UI things.


The shared code means that now enemies can use all the components like different weapons and specials. This means more varied ships (of course I need new ship models) with different fighting styles. I also want to redesign the AI to incorporate the ability to switch to different weapons for different situations or employ countermeasures to stop missiles. I am getting close to feeling pretty good about the player systems (by no means done) to go back to focusing on AI and mission scripting so those are going to be the next big push. That and some interchangeable component based cap ship models since they will be needed if I am going to create any type of campaign that is worthy of the game title. According to my giant list of To Do’s on Trello, I am 23% done (with the list…) but included in the list are a functioning Battle Editor, ‘complex AI’ and an energy management system. So yeah, almost done!


I’ve also been revamping the ‘radar’ system – I am calling it a scanner now in game.

The scanners will have some nice game play effects. An asteroid or debris field will make the Visual Scanner pretty tough to track enemies while it should be fine in open space. Chaff could be launched to further distort a Visual Scanner. The EM and Heat scanners can come into play in more dense areas, but stealth ships or ships trying to be stealthy might try to mask their EM or Heat by running cold or creating anomalies. A ship might jam an EM scanner with lots of waves. Of course the most lowly fighter probably won’t have the advanced scanners unless the player upgrades. The Smart scanner is the magic radar that tells you what everything is and ignores unimportant stuff.


I envision Scanner / ECM ships like the Raptors in Battlestar Galactica doing scans and blocking them. Possibly being in a wing with one would give you a scanner buff while you were close by allowing you access to scanners beyond visual that you couldn’t get alone. Additionally, some stealth ships may need to be targeted manually. Currently ship targets can be cycled through with the E key (Next Enemy Target) or C key (Closest Enemy). If a target is undetectable by scanners, you should have to get it in your crosshairs and then manually target it with the R key (Right in Front of Me Target Key). After manually targeted, the stealth ship will be added to the list of targets to cycle through… I also imagine some stealth missions where the player tries to get some surveillance by drifting undetected. Could be awesome.


Target Cam / Info

I’ve also added a target camera and changed the UI in that area. The stock Unity sample assets box just isn’t really meshing what I need to display there. I sort of like the angled-ness of the boxes, but they are a little limiting with what I want to display. For now I may opt for a flat UI until I build cockpits or other assets UI assets that make everything look cool. I’m more programmer than artist and my dreams for the game sort of extend beyond the art I can create for it at the moment. In the meantime, I am going to build all the cool functionality and drop the art on it when I can.


Don’t worry, it’s not really 2FPS!

Targeted Damage, Armor and Hull Damage 

You might also notice the little rectangle with a grey outline and a red inside. There is also one next to the crosshair. These are currently the armor and hull status system. Ships can now be damaged on the sides, the front and the back. If any one side’s armor goes down to zero, the hull is exposed on that side. Too much hull damage = boom! This adds some strategy to fights, you can make sure to favor one side if its damaged and keep it away from the enemy. If you lost all the armor in the front of the ship, you won’t want to play chicken with the enemy on a straight joust. Eventually some of the ship components like guns and radars will also have models stuck to the outside of the ship model. These will also be able to take damage. You can get your scanners knocked out or your engines.


Space Warfare: Infinite – Dev Log: New UI Stuff and Mission Scripting

It’s hard to remember exactly what I’ve added from update to update and I hope to make more regular blog posts to keep track. Over the last week I’ve been doing more under the hood work as well as some random visual stuff to go along.


Point Defense Turrets

One major addition is point defense turrets (unique 3D model pending – for everything in the game really) that targets missiles and does a pretty ok job destroying them. The idea is that big slow moving nuke missiles fired off during capital ship battles will get knocked out of the sky — unless some ace fighter pilots can get in there and save take out those turrets! (We’ve got to justify fighter craft existence in some way right?) The code for my turret targeting had to be modified so that they could be choose to target something other than ships. This will probably come in handy one day when we want stuff to shoot bases or asteroids or cargo.

On a side note – My test model of a cap ship is a basic wall of turrets and no energy limits or management has been implemented yet, but I am sure in the future ships will not be impossible walls of laser cannons. I have some thoughts on how that would work in the future. I figure I will make ships in a component type way where you need segments to hold various things like power cores, munition bays, barracks etc. The segments will be physical chunks of the capital ship increasing the size and mass. Bigger can be heavy on fire power, but they are going to have blind spots and attack vectors that small fighters can exploit.


The turrets shooting the purple lasers are Point Defense turret. That explosion was once a slow moving nuke.


As you can see from the above picture, I am also working on adding some elements that will allow me to start messing around with story elements and missions.  Without comms, it’s tough to present any story or mission. The communications box will just pop in and then disappear so it’s not always interfering with view. Additionally, I am working on a Freespace 2 style ‘command’ scheme both to communicate with your fleet members and to answer back to other folks who contact you over the comm. At the moment my # keys are used for weapon equips and other usable systems, but I am going to have a comm key that enables a ‘comm’ mode for using numbered menus.

Missions! Scenarios! 

Once comms were in, I needed something to control sending comms messages. I’ll be using XML files to build missions or scenarios that will load and play out when you enter a sector or trigger something. I am thinking of them as missions and scenarios, because the story arcs will be framed more as missions, but if you are free roam and not following the main story, the game might load up various scenarios unfolding in the system you jump to so there is always something to do. So far its not too complex – we can spawn new ships and tell the player stuff. of spawn new ships – I thought just randomly dropping ships in wasn’t cool so I gave them a warp in effect. Most fighters would probably warp in while inside a carrier, but this will do for now. I am looking forward to having a whole fleet warp in in front of a player.


UI has also been worked on. The left side info box has been cleaned up a little and now works with the weapon select feature. Shows you what weapons are equipped and how much ammo they have left. Additionally the center reticul now has the energy bar, the hull hp bar and an armor bar. I also tried dropping a model of your targeted ship in the enemy info box, but I couldn’t get it to feel just right and then my game crashed. I may end up taking screenshots of the different ship models and just make sprites for them in the UI. Behind the scenes I also have a working sector map that updates positions in real time. I plan to convert it one day to something usable like another way to give orders – certainly it will be one of the ways to do that as a Captain on a cap ship.



Hull, Armor, Shields 

Armor was another thing I’ve added. It’s minor at the moment, but eventually it will play a big role in balance. There will be different classes of armor plate and corresponding classes of ordinance. A Class 1 projectile will lose about 25% of its expected damage against a Class 2 armor. Class 3 would reduce it to 50% and a Class 5 would basically just shrug it off with no damage. Super armored battleships might not even worry about attacks from fighters or lower class weapons. A bomber or heavy fighter with a higher armor class would have a real advantage in a dogfight against ill outfitted pirates. As for shields, I am not planning on having them on smaller ships. If you’ve been following my game dev tales, you know that I like explosions. Shield technology severely hinders the explosions:minutes ratio. Fighters and their brethren must blow up a lot. Also, I get bored when a dog fight against one enemy takes forever. Why build a high-tech spacefaring fighter jet that can’t take down its prey quickly? All fights should be quick and dangerous so shields are out for the small fries. Fly a capital ship and you can manage shields to your hearts content.


Space Wars Update: Radar, random enemy spawning, sounds

I can check some boxes off this weekend, but a major sidetrack meant not as many changes as I would have liked…

Here is the link to the latest Space Wars…

I spent most of the weekend trying to figure out why adding more then 5 enemies slowed the frame rate to 20 FPS. Turns out I had cameras attached to all the enemy prefabs which I guess eats up lots of resources. So, keep your cameras to a minimum and don’t just attach them to random things. Early on I was using it so watch from the enemy perspective to see what they do, but I can always just add one when I need it.

Removing the cameras fixed everything, but not before I attempted to rewrite the movement scripts without using the physics engine because I thought that was what was slowing things down–I’ve heard too many physics bodies interacting could be a problem. Nope. So now the game can run at least 30 enemies. It’s a little messy because the AI can’t navigate around things really.

Screen Shot 2013-11-24 at 10.24.46 PM

I’ve added a pretty good radar system that tells you where enemies are. The system beeps when a new enemy comes into range. It shows red dots for enemies that are above you (using world coords) and orange if they are below. Yellow if they are about your level. It sort of helps to know someone is right on top of you before they hit you with projectiles.

I made it so enemies respawn in random amounts in random ranges around the world. If they get stuck you might have to hunt for them. Destroy them all and new ones respawn and the game keeps score. AI also picks points to head to before coming straight at the enemy thus sort of coming from all sides–seems to work ok but the AI is really just a place holder for real AI.

Right clicking yields a work-in-progress missile, right now its just as powerful as the guns and it seems less accurate. Longer range though so you can miss more from farther away.

Oh and I added some sounds. Guns make noise, the explosions make some noise, missiles make a noise, radar beeps – tho not loud enough really. Also I added some music for fun.