Turn based strategy game

Hey,

I’m new to the forums and also Unity really. I have done a little bit of work in it, such as the FPS tutorial, but I really wanted to do a turn-based strategy game.

It would be set in space with 3D models but on a 2D plane (as I’m assuming that would be a lot easier to program than movement in 3 dimensions (Sins of a Solar Empire instead of Homeworld basically)).

I have a few questions regarding certain aspects of the design;

  1. How would I set it so that a ship has to move a certain distance before it can change it’s orientation? (Facing is very important).
  2. How would I make it so only certain weapons can fire based upon the direction of the ship?
  3. Would it make it easier to use a grid based system projected onto a flat plane for movement or actual measurements?

Thanks in advance.

G’day INinja132,

I’m also slowly working towards a TBS game in Unity (land-based warfare however, but essentially the same thing), and I might be able to answer some of your questions.

  1. ‘Turning circles’ (are they really required in space?) would be coded into your ‘rotation’ code - instead of merely ‘rotating’ your model, you would rotate and change position accordingly. What interface the user goes through to do this is up to you - think of Chess games on computer, how the ‘horse’ piece works. In these games the player is (usually) presented every possible movement choice for this piece when it is selected. This is pretty simple, but the logic is relevant.

  2. The TBS I’m trying to make deals with ‘regiments’, so this is also something I’ve put some thought into. When you have your ‘selected unit’ variable set, and you then click on an enemy ship (presumably to fire upon it, as I doubt your game favors peaceful resolutions!), it can check where in physical space it is in relation to your unit - north, south, east or west of it by comparing the Z axis position and X axis position. From there, it can compare this to a variable you might create to keep track of which way your unit is facing - when you rotate it, you change this of course. This, again, is only one way you might accomplish this.

  3. I’m using a grid, made of a multidimensional array of gameobjects (the tiles themselves), but there are a few ways you could do this. Both require work, although personally I suspect actual measurements might be easier. It would essentially be like building ‘click to move there’ gameplay, for which there are scripts floating around, except with a ‘fuel’ (or ‘timeUnit’) variable that is decreased with movement. This is reset at turn’s beginning.

I hope this is of help to you - I’m pretty new to Unity myself. Let me know how you go, I’d like to keep tabs on other TBS projects.

Thanks a lot man, this is really useful stuff.

I think my main issue is going to be getting all of the foundation work in place and running properly rather than these specific things, but I suppose we’ll see. And yeah turning circles are needed as certain weapons can only fire port or starboard ^^.