Turn based game help.

I’m trying to make a game that has you commanding a group of soldiers in a turn based environment. The ability to fight, move, and use items is based on a system of action points(AP). This is similar to the games X-com and Silent Storm.

But my issue is that there is no documents on doing this at all. Maybe I’ve just been searching in the wrong places. If anyone can find some examples, preferable in Javascript but I’m not being too picky right now, it would greatly be appreciated.

Just to be clear on what I’m looking for is a way to assign action points to a character and have them replenished at the beginning of your turn.

Each character would have to have a AP value, then you select the character during the game and use up to those AP to achieve something. Turn based is incredibly simple because the AI is not required to run constantly. You are probably going to have to start from scratch though. I haven’t seen any stuff on a turn based game around.

In the end, you are going to have to deal with many factors to get this done correctly. AI, Auto pathing, AI combat tactics just to name a few. You would have to devise a way to get your characters to move, how to follow a path, or a patrol. Lots of little things.

That’s exactly the way I was looking at it. And there is nothing on it I’ve been looking for even just a starting point for about 2 months now. I know very little about scripting but I’ve been working on it.

By all means, share and ask questions. You dont have to post very much code at all to ask how to do things. We could even point you into simpler methods as well.

//player character in the first slot’s action points.
var pc1ap : int = 5;
//when the character moves I want the score to drop 1 action point.
function OnTransitionCharacter(Transition : Movement) {
score -= 5;
}
//manages the guitext that displays the action points
function Update() {
guiText.text = "AP: "+score;
}

This is basically what I had in mind. I basically modded a script that adds points for every enemy destroyed. I’m probably way off but it’s a somewhat of a start.

I have no more inout than ORK rpg scripts are totally turn-based but then again not free :slight_smile:

Thats the thing I have no real cash for a jumping off point. That and what I’m going for is a more of a squad tactics deal like you would find in Jagged Alliance 2.