Category Archives: Game Updates

More AI and happenings

I was hoping to be wrapping up the basics of AI and heading into adding another weapon type then working on tactical mode. But there’s still more work to do. Recently I changed over the the save/load system so that it would be compatible with the new AI and it I thought I’d be done with it by now. It is working well for the most part, but when I went to do the same with the trading ship AI I noticed it wasn’t very compatible, so now I’m fighting with it a bit to make it compatible with the AI manager system. Its good stuff all around because this means that the trading ship AI will more modular so that it can be used for other ships – for example ferrying ore from asteroids or cargo pods from destroyed ships. While doing this I was testing the transport ship AI and noticed a few bugs here and there to the gravity drive system, as usual I think I finally have it fixed heh heh…

Speaking of AI I had a really neat moment recently, a drone fighter turned to face its target (while turning off its thruster engines) and then when facing the target the drone hit its afterburner to charge at its opponent. I guess you’d have to be there to appreciate it, but it looked and felt fairly intelligent and dramatic :)

In other news I posted about my project on’s gaming reddit here’s a link I had a good response to it so that made me glad, even got an email with some additional kudos :)

The posting made me realize that its been far too long between iterations, so I have to clean up the current version enough so that its playable and then release it, getting tired of saying: but in the in development build… besides the change log is getting very crowded.

Lotsa happenings – gravity drive

Its funny because the more stuff is happening the less I update this blog. But I have to make a effort, at the very least for myself because I enjoy reading this stuff, its motivational and I go “ooh I remember when I did that… yeah…”

Recent work: re-wrote the “gravity drive” – prior to this gravity drive only functioned via autopilot, this is of course very lame, also the whole gravity drive process was pretty bland – select far away target, press auto pilot button, ship would stop, face target, and then accelerate. Another awesome thing here is that the new code is sooo much simpler than the old, and the old code was mix of AI and acceleration, very lame, it was some off the earliest code I’ve written and it shows.

Now you can manually “engage” gravity drive – first you select a “valid hop” – a large object that allows for the gravity drive to function, meaning that the map turns into sort of islands in the void, enabling for strategic/choke points, meaning much more interesting map design. You can still fly to any spot via the standard engines, but to quickly travel from spot to spot that’s why there’s the gravity drive. So anyway you select a valid hop, then you “initialize” the gravity drive (via keyboard or hud) and now you have to travel at three times the cruise speed to “engage” the gravity drive, at this point you accelerate 20 times the normal factor – until you reach your destination at which point the gravity drive disengages and you rapidly decrease your momentum, if the ship veers off course (you are still allowed any maneuver you want) and you get further away from your hop, then the gravity drive disengages.

The other limitation of the gravity drive is that it only works on the “nearest” hop, so you may have to jump to a hop nearer to your final destination, meaning that that intermediate hop is able to become more strategic.

I think that this new take on “warp” or “hyperspace” mechanic in space sims is pretty neat. There’s a few limitations that add to the game play, and allow for greater strategy (the need to go towards a valid object), but still allows for rapid travel between positions, no need to fly through boring empty space too much. It isn’t the tired “jump” mechanic where a ship disappears and reappears in a different spot instantaneously, while really convenient this is somewhat boring.

In other news: the AI work continues, and is progressing well, the light is at the end of the tunnel. Today I finished up basic target selection and order commands for the combat AI.

Updates – camera system and manual turret control

Camera system:
I started off last week wanting to do something minor – adding roll to the camera when the ship rolled. I ended up doing a major overhaul to the camera system – to be clear I am talking about the aspect of the camera system that reacts to the ship turning with the intent of giving the player a “feel” for movement of the ship. I’m very happy to say that it is much better, some portions are even “release quality.” Other portions are being debated/watched and some portions need tweaking. The movement is now gradual, therefore the “spring back” that would happen when the ship stopped turning has been eliminated – it bothered me from day one. The key was to link the camera system with the physics system. When I first coded the camera system I didn’t have a physics engine in the game yet, so the camera system did its thing based on the ship’s orientation changes, when the ship changed orientations (by turning or whatever) the camera system would react, when the ship stopped turning then the camera would spring back to the “initial position.” I didn’t judge how much the ship was turning, so it was either all or nothing. It worked and looked ok, but was clearly flawed.

By using the physics engine as the driving force for the camera I use the actual turning force of the ship and give that to the camera to re-act to, this is a much better source of data and allows me to do the more fine tuned camera system.

Turret control:
This week I started on adding in a “turret camera” and allowing the player to manually control a turret. So far so good, the basics are in – the player can switch to turret view, seeing the turret and the turret’s cross hairs up close and personal. The player can also control the turret, still more tweaks and I have to add in a turret hud for controlling its parameters. Its AI – point defense (attack torpedoes), offense (attack a ship equal or larger than the turret’s parent – prioritize the parent’s target), defense (attack ships that are smaller than the turret’s parent). Allowing the player to set targets and priorities for individual turrets very easily.

The cool thing about controlling the turret via the mouse is that I implemented a “look to turn” method, what happens is this: the player points their view on where they want the turret to turn, the mouse movement and the turret movement are independent meaning that the slow turret isn’t slowing down the nimble mouse. A idea from Slaor triggered me to then have the camera orbit the turret always keeping it in sight, a great addition to the system – making it nearly perfect, all that’s left is to change the camera’s Y (up/down) position as a response to the turret’s pitch.

The funny thing about manually controlling a turret is that (to me) it is a fun, but useless feature. The turret AI – I think – probably does a better job than the player could at aiming at targets, but this does give the player more options and a fun aspect of controlling the ship that they are in. Plus some ships may not have forward guns (carriers, troop transports, etc) but do have turrets, so the player can set the ship to crew control and jump into a turret to still fire off some rounds. Even in ships that have primary weapons – manual turret control allows for the player to have the fun of controlling a more nimble weapons platform when in a big clumsy destroyer. Basically its fun :) The targeting aspect is serious business however, it will allow the player to give individual turrets individual targets, so a large cruiser could attack multiple ships at the same time… a sight to behold and one I’m eagerly awaiting.

Happenings – Iteration 11

Iteration 10 came and went so the project is officially in alpha state :) This means that more focus will be taken towards improvement and polish than adding game elements. The previous iterations had a fairly narrow focus (adding in the command ship, adding in base captures, adding research etc), iteration 11 has no such focus instead its aim is to generally improve the gameplay. This past week turrets have been given the ability to pivot (no longer will projectiles exit a turret at an angle that the barrel is not facing), multi barreled weapons have been put in place, muzzle flashes added, and other such enhancements.

For example right now I’m working on torpedos. Torpedos are a type of a missile, except that unlike standard missiles these obey the laws of the physics engine (inertia and momentum) and can be destroyed, however they pack a much more powerful punch and have greater range. Right now however torpedos are strangely wobbling in the general direction of their target… but not quite ready for battle.

Its a lot of fun doing this kind of work because visually many things are happening. Much more to come!

Battle editor – video

Here’s a demo video of the new battle editor. Still many things to do: add “scenery objects” like asteroids, select different environments for example: asteroid fields, debris fields, nebulas etc. Add support to link stations to bases. Add ability to specify targets for ships in battle editor prior to starting battle. Add support for modders to add objectives, triggers, etc. Add support for modders to specify custom battle tunes :)


Instant action mode is going well. The game now reads XML files for ships, stations and soon asteroid bases. These aren’t used yet to generate ships, but soon will (that’s the easy part once the loading is complete). The “Battle Editor” can add ships and stations to the play area and clicking play pushes those objects into “game mode.”

A lot of polishing still left to do, error checking like making sure there’s at least one playable ship and making sure objects aren’t colliding with each other before beginning the battle. Setting factions, duplicating groups of objects (for quick and easy you versus them scenarios and for quickly adding ships). Saving and loading of previously created scenarios. Things like that :)

Already this is reminding me of when I was in grade school recess, I would play with little plastic toy soldiers and even pull up weeds and plant them into the sandbox battlefield to create trees and terrain.

Iter 10 etc.

The goal for iter 10 is to add the begining of instant action mode. First stage is to create a “battle editor” allowing the player to create custom battles. The player will add objects – ships, stations, etc to the game field, designate their sides (enemy, friend, etc), positions etc and then press play and battle it out. Initially all units that are in game will be unlocked, but later on the player will unlock units via the main “story” game or pre-created battle scenarios.

The battle editor will serve a variety of purpouses, sure it is there for fun and another neat game mode, allownig the player some quick action. But there are some very practical uses concerning the development of this project. It will allow for testing art assets, tweaking game balance (how many fighters can take out a corvette?), observing/testing the AI and creating videos to post on YouTube :)

Its going well so far, a lot of the work has been completed, luckily I’m able to re-use a lot of the code already. The battle editor closely resembles tactical mode, there’s a free floating camera, the player is able to position units (same code as positioning stations), collision checks need to be performed (stripped down physics engine code) so that units don’t overlap causing unintended consequences.

I’ve reached the stage where I need to populate lists of objects for the player to add to the battle. I’ve decided to make the switch from hard coded (in the executable) asset lists and their paramaters to having the game read text files. Thus making the objects accessible to the player, I’ve been meaning to do this for a while and this will be the first step. The objects will be read into the game from xml files (easily openable in notepad or other editors), allowing for modding. Eventually a modding tool will be finalized meaning that editing the files will be done via this graphical tool rather than notepad or some other text editor. I’ve started creating this tool in a seperate (from the main game) project file, intending to one day release it as open source. I’m starting to think this over, and am now leaning towards making this part of the game itself – meaning that at least for some time it wouldn’t be open source. I’m still debating this, the pros of combining the project would be simplicity and speed for me – not having to have the same code in two different places (characteristics of objects – reading – editing – saving of files). Another pro is that the player wouldn’t have to look very far for the modding tool. The con is of course the open source nature, still I don’t know how many people would find this editor useful, it would be very specific to my project. I guess I can always seperate it out later on once the code is completed.

Iter 9 released!

Iter 9 features the addition of the “research” system. Your basic click here then wait a bit and now you can build a new class of ship or station. Pretty boring (nothing very new or innovative about this), but it accomplishes several important things.

Delayed gratification: yep I’m withholding things for your own good and enjoyment, so appreciate that corvette and enjoy that new frigate when you can build it. You’ll plan it out in your head… first I’ll research a defense station so that it will protect the shipyard that I will research next… etc… etc… dreaming of things to come :)

Game pacing: you can’t build a destroyer right from the start. I know you can’t so if I send one against you I’ll know it will be a bit of a challenge.

But in actuality it is busy work! To extend the life of the game and give me greater control over the experience. So I hope that in future iterations I’ll make this more intersting. Right now research comes at the cost of your crew not producing ore, energy and/or food. Plus the player has to pick and chose which research item to research first. But in the future I hope to add more interesting mechanics for example: blow up a bunch of frigates to be able to research your own, or better yet capture one (via the Command ship) and make it dock with your station – then take it apart to learn its secrests. Basically making things more interesting.

Plans for iter 10: instant action system – very excited about this – it will give me the chance to test game performance (you’ll be able to create custom battles of any size). Via staging battles I’ll be able to tweak ships, balance game play and you’ll be able to quickly jump into combat for some fast action.


Currently working on the research portion of the game. The player will be limited to what ships and stations can be built at the beginning, you’ve seen it all over. Gives the player something to do and choices to make (should I build ships for offense? or stations for defense?) It also gives me the chance to control difficulty (knowing what forces the player will have at the beginning) and game pace (don’t have to worry about the player having destroyers for a bit, so don’t have to send destroyers against the player).

Currently the corvette type ships are pretty useless compared to the frigates, one of the most noticeable thing is that they die way too fast in comparison. So if the player can’t build frigates yet, corvettes have to be the initial bulk of the fleet, giving them a chance to be utilized and then properly slotted into the fleet in the future (the player has a chance to appreciate their potential). Once I put in the instant action mode (scheduled for iter 10) I’ll have a chance to do game balancing, see how frigates stack up against other frigates, and how corvettes do against frigates. This will give me a chance to make sure each ship is useful.

New missiles incoming and some tweaks to the trails

Here’s a small video of some neat stuff. Before missiles were single colored ugly models (my work). Now they are sleek looking and textured (artist – Edocsil). Players may not take much notice of them (in light of all the other things going on), but to me they are amazing! The missile trails also got a tweak, before they were yellow turning to orange, now they are a bit “smokier” they start off white and end up mostly translutent to give the visual effect of fading smoke.

Also in the video is the new “rock” frigate (also modeled and textured by Edocsil). I love how bizzare it is, I don’t know if any other game has such a strange looking (but cool!) vessel.