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!)

New Let’s Play Video – Space Warfare: Infinite Plays Angels Fall First

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.

Angels Fall First came out on Steam Early Access Oct 1. You can grab it here: http://store.steampowered.com/app/367270/

They also have a website at http://www.affuniverse.com/

Dev Log: Space Warfare: Infinite – New Game Modes, Gameplay Video for Capital Ship Battle and Patrol

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.

screen_231.5574

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.

screen_165.9012

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.

Screen Shot 2015-03-15 at 9.25.52 PM

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.

screen_200.2657

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.

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.

screen_20.81269

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.

screen_207.0476

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

Comms! 

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.

http---makeagif.com--media-1-12-2015-prnLZoSpeaking 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

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.

screen_13.27957

 

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 Warfare: Infinite – Screenshots gallery galore

Here are some of the latest screenshots of Space Warfare: Infinite! Still WIP and still in pre-alpha, but it’s also still a lot of fun!

Dev Log: Space Warfare Infinite – New AI tricks, missiles for everyone! and Unity3D Bloom findings

screen_78.26921Over the past week I’ve been having a lot of fun with Space Wars, while also researching and reading about AI. (I also got a little sidetracked by trying to perfect the bloom image effect….)

AI

AI can make a game like Space Warfare pretty exciting. I plan on having some multiplayer aspects once I get the major systems together, but the focus of the game is really a single player experience at this point. Since that is the case, cool AI pilots who behave in interesting manners is important. My actual AI code at this point needs to be refactored because it is a big mess, but the things its doing already even without a really nice organized OO state machine are pretty fun. I plan in the future to build out more of a Playmaker-esque state machine for these guys but it’ll take some focus. Because of the behaviors of the AI, the game is becoming pretty fun to watch. It has the enemies turn and loop and barrel roll to escape or ambush each other.

Current states include Chase, Attack, Reposition / Flee. Within those states the ships are able to barrel roll in reaction to being hit as well as change target focus. My idea is that I want to have some base states like Attack and then have a bunch of maneuvers that can be employed by the pilots depending on their style/personality/status. I am looking into multiple temporary short range ‘waypoints’ to create maneuvers so that AI can do looks or spiral at another ship instead of go in a straight line.

Some of my research to me to the above really cool video from Star Citizen (disclaimer: I am one man, Star Citizen will always be cooler than my game…). It hints how they are thinking about AI and displays some quick shots of the Ai engine. I can’t afford to hire that Ai company but I like some of their approaches. One of the things they really focus on is collision avoidance which made me think – oh man I don’t have anything to collide with yet other than really small ships better get to work on that! Unity’s Nav Mesh seems out because its a 2D plane and not a big open space. I’m heading towards a raycasting set up for individual ships. I forsee it being a little costly so I might have to add some collision radius objects that trigger the raycast steering only when necessary. One video that seems to explain the basics is here: http://vimeo.com/9304844. Sadly the author seems to have disappeared from the internet and never continued the series.

Missiles

I’ve also implemented missiles into the game. They are basically have perfect tracting to the only way to not get hit is to accelerate long enough that they can’t catch up or have them hit or get hit by something. I am working on a few countermeasures like a ‘chaff’ like drop and perhaps flares. I know chaff is for radar, but I might make it a dual purpose item in this game. It just drops a bunch of chunks of metal behind the ship that can clog an enemy radar with blips or set off a guided missile if a chunk collides with it. The other balancing option I will add is the length of time the guidance system works. This will give the player the ability to outrun then dodge a missile over a range if the guidance cuts out early, but is still a threat if the ship remains on the same course.

When I have add the ability to upgrade, ships could by better missiles with longer range guidance systems to make them harder to shake. As it stands now, unless your opponent launches a missile from too far away, the likely outcome is an explosion. Its so likely that for the above video I needed to disable missiles just to show you the Ai fighting without immediately creaming each other with missiles. Also I wouldn’t be able to stay in one place and film for my that 10 seconds before getting hit myself.

Missiles are a powerful weapon. But I always feel they are underpowered in games. Perhaps I should make it a little more random – 10% chance of surviving a missile? Perhaps its time to add shields!? Also individual parts of ships might mean less instant kills if its not a direct hit.

Bloom

On the Bloom front… well the game is shiny now! Look at the before and after!

 

screen_306.4306

Before…

screen_11.3738

After…

Things I’ve learned so far… some Unity image effects may be added after every camera is rendered. This means that no matter what camera you add an effect to, everything is gonna get the effect. The bloom happened on all my cameras no matter what my order was or culling set ups were. I’ve tried it all…. If someone out there reads this and finds out a way to make my findings untrue, I would love to see the solution! Comment, twitter, email me!

The main problem I’ve had is that the really nice Space for Unity scenes were getting over exposed and washed out so that you couldn’t enjoy the scenery. Since the main thing I wanted blooming were the trails and lasers, I ended up really brightening the particle materials they were using and then turning up the ‘threshold’ setting on bloom so that everything doesn’t wash out. It sort of works. I like more glowing than less so I am happy where I am with the look. Sometimes I feel like almost Bloom alone makes the Unity Pro license worth it — just the cool factor.

New Ship Mesh, New Version Uploaded of Space Wars

New ship meshes, missiles, distant planets, space jump gates to nowhere! I uploaded a new version.

Updates:

  • New mesh designs for the enemy fighters. I think that look pretty cool. Not too original but I am excited to get the hang of it. Really this mesh is probably the mesh of the player ship or at least human style fighters. Alien races will have more interesting looks.
  • Targeted Missiles: Center mouse or left cmd key (left alt on PC? not sure) to lock on. And then Right click or option button since I just realized that it wont work in a browser game… mash some keys to see what does what i suppose – to launch missile
  • Capital Ship: Its just a place holder experiment. It has turrets that can be destroyed. The rest of the ship cannot. Will be working on a 3D mesh for cap ships and turrets so we can get rid of giant rectangles.
  • Distant Planet background: Now the planets are set in a 3D sky box of sorts using a camera trick. Unlike normal sky boxes, you can actually move closer to the planets — when you get close enough it  will one day ask if you want to land… not yet. I think you end up flying through the planet at the moment, but it will take longer than most attention spans to do this.
  • Jump Gate: Spinning blueish particle thing. I am working on this concept, probably will oneday look more like a nebula cloud or something. Anyway now it jumps you to another scene in which I think controls are messed up and everything is broken – yay!

Anyway, not a huge amount of progress really. The AI still stinks and there isn’t really a game or mission or anything but turrets and bad guys that attack and the satisfying feeling of watching the enemy explode when they get hit by a missile is nice.

Todo Shortlist:

  1. AI Choosing Targets Script – move away from just focusing on the player will allow NPC friendlies and we can set up real battles.
  2. Friendly ships, non-combatants (helpless space miners being chased by pirates?)
  3. AI Behaviors – Patrol points, search and destroy, defend, attack, flee, tactical moves, etc. Expect a few of these soon.
  4. Working jumps to other sectors. Will just take some time to figure out how to make it work.
  5. Ship meshes – more and probably more component based so we can build and modify them in game. Front middle and back portions that you can swap. Cap ships will probably be built out of lots of middles parts. Also had some ship model ideas:
    – Porcupine Class – two top mounted missile launch boxes with semi-guided missiles – fires like 6 from each box
    – ECM Class – creates interference over a set radius that shows up on radar like additional ships – masking actual ship locations
    – Capital Ship with Launch Bay for Fighters
  6. More weapons –
    – Energy weapons that are strong but get weaker over distance
    – Classes of projectile weapons – light, medium, heavy, capital
    – Different Missile Types:
    – Dumbfire – they fire straight at what you point them at – good for slow moving / stationary targets
    – Targeted – initial lock-on followed by dumbfire behavior
    – Seeking – lock on that must reacquire target after a certain turn radius – can get confused by counter measures
    – Guided – lock on and chases target – most accurate

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.