Fleet combat hex system first prototype

This week I’ve been working on the fleet combat system for Predestination. When all of the core mechanics are implemented, we’ll be releasing this as our first beta test to get some feedback and improve it. Fleet combat is an important part of a 4X game, and it will have to be iterated on extensively to make it as awesome as possible. Our goal is to create tactical turn-based combat system that’s more like a game of chess than an RTS. We’ve already tested the movement and combat mechanics with a pen-and-paper prototype, and this week I started putting it all in code.

It doesn’t look very pretty yet, but I want to show you what I’ve got so far. I’ve finished the hex grid system and ships can be placed on the grid and rotated to face any of the adjacent hexagons. All ships involved in the combat roll initiative and then take their turns in order. For moving ships, I developed an efficient recursive algorithm that determines the shortest route to a hexagon based on the three simple rules below:

  • Moving into any of the three forward squares costs 1 move point
  • Turning by 60 degrees costs 1 move point.
  • Two ships cannot occupy the same square

The result produced the exact pattern that my prototype design predicted:

With everything in code, I finally got to see what direction the ship would be facing when it got to each square and I wasn’t happy with the results. Since you can move into any of the three squares in front, the ship often didn’t need to turn to face the direction it was moving, so it appeared to be sliding sideways. I fixed this by changing the movement rules slightly to the rules below:

  • Moving into the square directly ahead costs 1 movement point
  • Turning by 60 degrees costs 1 movement point
  • Two ships cannot occupy the same square
  • Every ship gets 1 free 60 degree turn per round.

This produced the exact same movement costs and pattern, but now the ship always turns to face the direction it’s moving in. I’m very happy with the results, and the free 60 degree turn adds an interesting mechanic, as modifying the number of free turns per round changes the movement pattern significantly. Two free turns makes moving sideways as easy as moving forward, three makes a ship able to move the same speed in all directions, and no free turns produces the pattern below:

One of the core elements of Predestination is designing your own ships and making tactical tradeoffs in the design process. You might want long range on your guns, but to get it you have to sacrifice damage or the weapons might take an extra round to recharge. Once you’ve researched the appropriate technology, you’ll be able to do the same with your movement speed and movement pattern. You’ll be able to make tactical tradeoffs by modifying your thrusters to get additional free turns every round. That will make your ship more maneuverable, but as a tradeoff you might lose some speed or have to fit power-hungry thrusters that will reduce the energy available for weapons and defensive modules.

 Ships blocking each other

Since two ships can’t occupy the same square, you can actually block off a ship’s movement by putting other ships in the way, forcing them to take a longer path around. This is something I might make into a big tactical element, perhaps by letting small ships pass through the squares of larger ones. Technologies that let ships phase through each other or teleport instead of moving could also be fun. Below is an example of a ship with its movement blocked off:


Updates to follow:

The next things I’ll be adding are:

  • A translucent ghost ship on the square with the mouse over it indicating the direction the ship will be facing if you move to that square. Currently this is done with an arrow, but a ghost ship would be more intuitive and obvious.
  • A line showing the route from the current ship to the target square.
  • Left click moves the ship to the selected square (with movement animations), right click turns toward that square.
  • End turn button to move to the next ship.

After that I’ll get stuck into developing the combat system, and I’ll put up a post on that next week to keep you up to date with how it all works. The current design uses a module hotbar and lets you activate weapons and other modules at any point during your turn, but I’ll go into further detail once I’ve started implementing it and can see that it works. We also plan to have environmental effects like asteroids, gas clouds etc, which I’ll go into more detail on in a later post.

As always, if you have any thoughts, suggestions, ideas, or other feedback, please do leave a comment. I do really appreciate getting feedback on ideas, and I think it’s a vital part of the design process. Thanks for reading :D.

About Brendan Drain

Director @ Brain and Nerd
Bookmark the permalink.

Sounds very interesting. Remembers me of the combat system in MoO II. Will the size of the battlefield adjust to the number of ships participating? Or will it always stay the same size?


Either the battlefield size will adjust based on number of ships or the size will be big enough that medium sized fleets will have no problems with blocking each other but massive ones will. That's something I'll have to look into later once the combat system is done.


Yeah, like they said it looks great. And I'm exited for the beta.

Doug Cooper
Doug Cooper

Just found out about this game and it looks incredible. I think the combat system you've come up with here is great. Space combat that's going to require real tactics. Flanking moves and multi-directional attacks; a system where speed and maneuverability will mean something. Kind of like the old "Mechwarrior" game. You could use tactics like using very fast small mechs and literally run around large mechs picking them apart a little at a time, but one shot and your dead. Very much looking forward to seeing what you do in the future. Thanks.


very impressive. thank you for your work. awaiting beta testing.