I’ve decided to do a series of Youtube Let’s Plays of games that I enjoy playing that I also draw inspiration from. I plan to show off some of the game’s features and discuss the things I am working on in Space Warfare: Infinite. So, first up is a game I’ve been playing a lot of – Angels Fall First. This game has been in development for awhile, and I’ve always been inspired by their Space, Air, and Ground combat. They cover both space sim combat and first person shooter combat. You feel like you are in a big war every time you play. I love the feel of the game when you touch down in a warzone and I think the ship models and locations are pretty cool. I definitely look to some of their fighter models for inspiration. I also love being able to run around inside the big ships.
Over the last few weeks I’ve been trying to limit my programming time to focus on 3D modeling. I find switching between Unity and Blender to be difficult, so just working on making stuff in Blender has helped my productivity in creating new art assets for the game.
Sketching and modeling in Blender.
I have a list of space ships that need to be made and I’ve been working through it. I am almost ‘done’ one faction’s main ships. I still need to model a new fighter–and I might do a 3D cockpit while I am at it. Keep in mind nothing is really done. Everything is WIP. I’ve haven’t quite gotten my skills yet for painting textures and generating bump maps so there is still more work to be done. Also, as time goes on, these early models might need to be redone if I get better.
A new battlecruiser – 1 kilometer of destruction.
Above is the battlecruiser. Its basically the battleship class of the space fleet. For some reason I can’t use battleship. The ISC ships are going to be more boxy like current military ships and tanks. The other faction will have more sloped / angular plates on their ships.
Huge carrier ship capable of launching fighters and corvettes from those two bays in the front.
This is the carrier ship. It will have some point defense turrets on it, but other than that it will rely on its fleet and fighter squadrons to defend it. The carrier is also big enough to launch corvettes which will be used as anti-fighter type ships.
The corvette. A ‘small’ ship.
The corvette is the latest model I’ve made. Its meant to take on small missions and has weapons geared more towards fighter management or hit and runs on capital ships. The ship is fast but would probably get eaten up if it tried to go head to head with ships of the line.
The Destroyer-class. This ship is 500m long. Its got around 8 turrets mean for engaging other cap ships and point defense. It has a deck mounted rail gun and an internal beam weapon.
The Destroyer will be the workhorse of the fleet. The cruiser is a force to be reckoned with but these destroyers will pack a punch. A couple destroyers can take out a cruiser pretty fast.
Very early space station.
After these, I plan to remake the fighter and then start on the enemy faction. I also have dreadnoughts on my list as well. They’d probably be 2km. Additionally, I started messing with Space Stations.
Here is a video where I talk about the ships and compare their sizes…
This last week I’ve been polishing up the current build and sending it out to some testers to try it out. Also, on Tuesday I will be on the Space Game Junkie Podcast at about 10PM EST. Check it out! I’ve been a fan of the show and have really used them as a resource for inspiration and ideas.
Some of the major additions have been getting the Battle Editor up and running and adding an Instant Action mode which currently house some missions as well as a place to load player created battles. The game will also eventually include Dynamic Campaigns with a story line of the unfolding war as well as branching mission paths depending on the completion/failure of objectives.
After that I’m going to work on a Free Play mode where the player can visit the many star systems of the game to trade, take missions, fight and explore. I am hoping to figure out a way for the Battle Editor to add content to all three game modes – Players should be able to build their own campaigns and scripted missions, as well as make Instant Action battles and build missions / locations for the Free Play mode.
I recorded a video of playing the Capital Ship battle in Instant Action as well as a patrol mission.
Beyond the menu system, the battle editor saving and loading systems, and a lot of testing, I also added some other features. juskelis – maker of Starfire – offered to do a little alpha testing and had me make some tweaks to the roll of the ship as well offer the ability to invert the mouse. I also added warning messages for when power is low, armor is critical and when you take hull damage. I think it helps give the player some awareness about how much trouble they are in. Someday the console in the cockpit will spark etc.
Another thing I tweaked – the player can now swap through all the ships in their fleet and control them. Before it was designated ones, but after all the refactoring, the switching ships works for anything now. It could also work for turrets, but I disabled that for now as I don’t have a control interface for turrets yet-they are run by AI. I want to add more control eventually since it’ll be more fun to have it when flying the cap ships.
As for next steps, I guess I’d like to hear what Space Game Junkies think I should add and just keep plugging away. The power management system is still just a fraction complete – I want to add reactor components to ships and hook up the energy draws to them to balance ships. Then I want to create a custom load out screen so the player can select their weaponry. Particularly for the Instant missions as well as to be used on some campaign missions. After that, I really want to add a Frigate, Corvette and Battleship to the ship list. I have some ideas for some sick battles. I want to work in formations for all ship types as well. Currently ships don’t play nice when you have them form up. So I want to work on that. Oh and add more AI stuff since thats not complete yet either – maneuvers are their, but currently enemies just pick from them randomly. I want them to make some interesting choices.
Sometimes it feels like not much has happened in the last week or two, but actually if I reflect back, Space Warfare: Infinite has made some pretty good progress.
One of the key features of the ultimate vision of the game is in. It needs to be refined and tested, but the core functionality is there. (Meaning you can do it, but sometimes the game breaks…) You can now switch between ships in your fleet! You can be flying along fighting in your tiny fighter and then press a key and swap to a big capital ship destroyer. Fire off a few beam blasts and jump into another ship. The ship you left will keep flying and fighting as the AI takes over.
The ultimate idea is that you can choose to effect the outcome of the battle in all different capacities and see the battle from all different perspectives. Eventually you will be able to give some basic tactics at the beginning of the battle to each ship in your fleet and then during the fight you can issue commands – currently just in the Comm menu– but probably eventually in a little more RTS-ish like a holographic command screen on a command ship.
Capital Ship Control!
Another thing that wasn’t possible a week ago was capital ships doing anything other than sitting in one place and firing from their turrets. While that was cool, its not very practical for a giant flying behemoth covered in guns to sit in one place while fighter ships dance circles around its turrets. So now the AI is hooked up — cap ship specific AI maneuvers are still a work in progress — so the capital ships will fly around and slowly chasing things and try to hit them with the ‘big dumb guns’ on their bow while their turrets focus on whatever catches their attention.
Capital ships helped add a new feature to ships and AI – the idea of types and classes. Now AI can look for enemies in their own class size and choose to only attack those. What this means is that if a I set a big capital ship like a Destroyer to only attack other ‘Large’ class ships, it will not try to chase fighters and instead will try to aim its big guns at other big less nimble targets. The turrets currently run on their own AI so they do whatever they’ve been set to do. Fighter turrets look for fighters, anti-cap turrets aim at big ships, point defense targets incoming missiles. Eventually AI and the player will be able to command turrets to attack selected targets or get all turrets to focus fire. This will truly be the way to take down the bigger ships faster. The big ships have an absurd amount of armour and hull strength, but don’t actually last long when hit with powerful guns. Fighter cannons take more rounds than most fighters have and thats with every round hitting only one side of the armor.
Cameras and Controls
So not only do Capital Ships fly on their own, but now the player can control one too. At the moment this means you can fly it around, roll it so the turrets have a good angle to pick up targets, point it in a direction and fire a giant plasma cannon or a beam weapon from the front. Eventually more controls will come — like commanding all the turrets, launching fighters from carriers, commanding other ships from a bridge, launching nukes, managing shields and power.
Additionally, the capital ship controls made the need for new cameras to be added. Trying to fly a kilometer long skyscraper through a combat situation from a first-person or even a third-person perspective is somewhat difficult. A middle mouse button orbital camera was added so that you could get views from various angles around the ship as well as zoom out to see what is around. I’ve also added an FPS mouse look that puts you in the middle of your ship / or your cockpit on the fighter and allows you to look around and behind you. I am mapping these to the F1-12 keys like in Privateer and Wing Commander games. I have a bunch of directions plus the orbit and mouse look setup in there. The functionality is there, but I am still working to make it better.
I also upgraded to Unity 5 because I keep looking at the graphics advances, the new physics engine, and the frame rate boosts and just needed to make the jump. I thought the move would fix a turret issue I had where my turrets were spinning my ships – but I think the way I finally fixed it probably worked in Unity 4.6 as well. My problem involved wanted to have turrets (and other future stuff) be able to take their own damage and be targeted and destroyed. The turrets move but are children of another big damageable rigidbody thing as well. But I needed a collider and a rigidbody on the turrets so that hits would register on them. Every time I did this the turret or turrets would spin the ship, fly off the ship into space, stay on the ship but turn on their sides. Anyway, rumor has it you didn’t need a rigidbody on a collider in Unity 5, but that doesn’t seem to be true. I understand that now moving a static collider doesn’t result in a penalty, but I guess it wasn’t the same as my problem. Anyway, I figured out that if I turned my colliders into triggers on the turrets, they’d stop messing with my ships, stay in place and take damage. I don’t know if this is best practice but it works! I need to make sure other triggers are not included on the collision layer mask for projectiles, but other than that it works!
So while Unity 5 didn’t really solve my issue, it did speed up the game. I seem to be able to get more stuff going on the screen than before while still getting a decent FPS.
One downside was most of my scripts lost their inspector set variables and the UI doesn’t know where any of its components are. I’ve been slowly fixing it all, but things are a little scrappier at the moment. A few above screenshots have white boxes where UI is supposed to be, that was the most noticeable Unity 5 upgrade effect! It slowed work on other stuff down for sure. I am hoping tho that now that I am up and running with Unity 5, I can make use of the new shader and its better use of threading to keep the game fast and furious.
Part of last week and into the weekend has seen a lot of time devoted to reworking the AI. I also wanted to add some new visual elements and while I did not get around to modelling a bunch of capital ships, I did model a launch tube for the player to fly out of.
The launch tube is really just a mock up. It will get modeled in Blender someday in a more fleshed out way, but I wanted to add a more cinematic feel to the game play. It works! I have a whole idea for the first mission of the game and it will involve a FPS style run through the ship to the launch bay and then getting shot out into space. I won’t spoil too much, but lets just say my influences are books like The Lost Fleet, Old Man’s War, Armor and Starship Troopers. They all give a similar feel of a first battle against a superior force. I think it will be a rewarding intro if I can pull it off.
I’ve been reworking the AI from a Switch/Case (I know, terrible) to a class based approach like the one on the Unify Wiki and the one described in Unity 4.x AI Programming — but with my own twist.
I am starting with what they explain, but I am working on making it more modular so that I don’t have to write an base AIScript for every pilot style. I want to be able to drop behaviors and maneuvers onto a ship and have it fly a certain way. I am getting there. I’ve built a maneuver component that has the ship fly a pattern, the pattern is imported into the AI State at runtime. It’s still not exactly where I want, but it’s starting to work pretty well.
Once I perfect the way the pilots pull in the patterns, I will also be building in better decision making for the AI. I’ll build in which patterns are best for different situations offensive and defensive. Additionally I will be adding in cooperative moves and player commands to get assistance from wingmen. I’ve also got plans to start making AI adhere to the same targeting situations at the players so the player can lose an enemy etc.
After the dogfighting is passable, I will start working on getting the capital ships moving. They need to move differently than the fighters and small craft, but currently they just sit there and hope their turrets have something to aim at. It will be real cool when those things start to move.
Still working on capital ship weaponry and it’s fun! I’m actually doing a lot of clean up under the hood since my general programming process is get something working that I can play with on the screen as fast as possible and worry about making the code better later. I am in a make the code better phase because capital ships are far more involved than fighters and they are forcing me to break out some of the systems I just hard coded into my fighter scripts so that after I am done, I’ll be able to iterate more ships, turrets, weapons, other objects faster.
Capital ship with one beam weapon lays waste to a fighter wing…
One example of this current decoupling is beam weapons – a totally different style of ‘projectile’ that still works with the components I built. The main turret I made last weekend just fires off regular cannon projectiles which are the same things that the fighters shoot. It’s been my standard projectile along with missiles for a long time. Standard cannon projectiles do 1 damage to the hull (armor and shields haven’t been implemented yet…) and missiles do a bunch more. The beam weapons are set to 1000. They cut through anything and can destroy multiple ships in one hit. I’ll probably dial it back but its fun to watch the thing just vaporize fighters like gnats. I envision this level strength weapon to be a capital ship attack weapon so the turret will probably track slower and generally just target other big ships. I might also make a short range faster tracking anti-fighter beam to punish players who get to close. The beam weapon definitely makes a cap ship something to fear.
On the technical side – I used a line renderer with a collider for the beam and I hacked together a lense flare and light at the origin of the beam. I might add another lense flare type thing to places it hits stuff so that it looks like a weld torch. Might be a cool effect that is different from the regular sparks and stuff of other weapon collisions.
I spent the weekend putting together a capital ship and its turrets. Its still a work in progress, but it is fun to have to play around with.
I built the capital ship model using Pro Builder. I’m still a true amatuer at modelling, but I am working on it. The ship is a carrier-type with a big fighter bay on the side. It’s about a kilometer in length, but you can only really tell if you put a 3rd person character on it and walked around. It seems like the trick is to put bunches of detail panels and sloped surfaces on it so it doesn’t look like a flying cube. I am using games
like Freespace 2 as a reference since the ships were boxy but people still liked them. Once I get some nice models together, I will explore real texturing. The current carrier isn’t going to be in the finished game – at least not the model in its current form. The main goal was to get something giant to fly around and fight against that had a killer amount of turrets. Ta -da !
Having the cap ship, tho, gives me lots of directions to go. It’s be cool to have the player fly out of a fighter bay tunnel at the start of a battle. I have an idea for smaller gun boats that would be a much smaller cap ship with a big gun and a pd. They’s have less armor, but would be a bit more maneuverable than big stuff. They’d be used in groups to attack big
ger Battleships by attacking from different angles and things to overwhelm defenses. Going one-on-one with a battleship would be a big problem since a big gun might take it out in one hit, but a group could score a bunch of hits while a big gun can only focus fire on one target.
I want to get AI together that will allow the cap ship to maneuver. Once that happens, a second capital ship so that they can fight each other. The current one would have to have AI that would make it find an average waypoint in the middle of the action so it can get in there and mix it up with fighters. Or, it will need AI that can chart a course along the side of another cap to do a flyby. If all caps follow the current gun load out a dive and attack would be a good strategy since a caps guns are on top mostly, so getting under the enemy will offer a passing attack while not getting exposed to the bigger guns on top.
Also there will be at least one cap ship with a giant trench in the middle leading to some sort of highly explosive power core. It will be the only cap ship that a fighter might be able to take out on their own.
The turrets rotate and look up and down to target enemies. Currently they are sort of Point Defense guns, but I am also going to add anti-capital ship guns, beam weapons and missiles. The model for the turret is really for a big anti-cap gun.
My basic thoughts are that all guns on a cap ship should be on a turret since the ship can maneuver as simply as a fighter. Big anti-cap ship guns will rotate slowest, but pack a big punch. Currently, if a fighter is unlucky enough to get hit by a anti-cap projectile its instant explosion. Big guns will prioritize other big ships that aren’t zipping around. Point Defense (PD) guns will track and take out fighters and missiles that get too close. Currently each turret has its own targeting AI. I hope to also add a targeting list function for some guns like PD and high-fire rate missile launchers so that they can move briskly between many targets. In a combat mission against Capital Ships, the main goal of fighters is to take out the PDs and other guns to make way for missiles to take out the ship. I am thinking some classes of cap ship will have strong enough armor that standard cannons on fighters won’t do any damage at all.