Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Strategy - Tactics Game  (Read 3068 times)
0 Members and 1 Guest are viewing this topic.
Offline rdcarvallo

Senior Member


Projects: 5


2D Java games forever!


« Posted 2008-10-13 15:43:16 »

I'm programming a little tactics game, and I want advice on how to manage the "pieces" on the board

There are two modes:

1) Move all pieces: In this mode, in the player´s turn, he needs to move all the pieces, and then finsih his turn, then the CPU does the same.

2) Piece's time counter: In this mode, each piece has a time counter, and they become usable during the course of the battle, so the player and the CPU make their moves in any time.

Games that use mode 1:
Vandal Hearts
Makai Kingdom, maybe Disgaea, but I haven't played it.

Games that use mode 2:
Final Fantasy Tactics
Suikoden Tactics

I like the mode 2, because it allows more flexibility during the battle.

For any of the modes, a piece's move consists of one movement in the board and one action (attack, magic, items), but I want to add a little twist.

Each piece will have movement and action points, allowing to do more than one action during its move, so a soldier can kill a little monster with a light attack, then move and wound a big moster with the biggest attack allowed with the remaining action points.

Don't know if this could unbalance the game, but I think that it will make it more funny to play.




Offline SwampChicken

Senior Member


Medals: 1



« Reply #1 - Posted 2008-10-14 04:33:53 »

Mode 1 = Turn based strategy.
Mode 2 = Real time strategy.

 Grin
Offline rdcarvallo

Senior Member


Projects: 5


2D Java games forever!


« Reply #2 - Posted 2008-10-14 14:41:20 »

It's not RTS, because always there is only one piece on the board moving...

In realtime you can move many troops at the same time...

It's something like Active Time Battle from RPGs translated at a turn based strategy game.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eli Delventhal
« League of Dukes »

JGO Kernel


Medals: 39
Projects: 12


Game Engineer


« Reply #3 - Posted 2008-10-14 19:07:21 »

I definitely like #2 better. Then again, I'm a big Tactics fan.

See my work:
OTC Software
Offline markus.borbely

Junior Member





« Reply #4 - Posted 2008-10-31 11:36:23 »

#2 is not that common and it will make your game stand out from the others (for good and bad). It will be refreshing but also harder for newcomers.

I would recoment #1. It will be more abstract but probably easier to think out a strategy.
Offline fletchergames

Senior Member





« Reply #5 - Posted 2008-10-31 17:35:54 »

I'm surprised there isn't an option 3:

3) The pieces have a time counter.  When a piece's time counter is full, it's time for that piece to move.  It doesn't make any difference which team is moving; the pieces move in whatever order they move in.

That seems more normal to me.  My idea of a strategy - tactics games is Fallout Tactics, which uses 3 for turn-based mode.

Since the topic is 2 weeks old, it might be too late to have an opinion.
Offline Eli Delventhal
« League of Dukes »

JGO Kernel


Medals: 39
Projects: 12


Game Engineer


« Reply #6 - Posted 2008-10-31 17:47:48 »

I'm surprised there isn't an option 3:

3) The pieces have a time counter.  When a piece's time counter is full, it's time for that piece to move.  It doesn't make any difference which team is moving; the pieces move in whatever order they move in.

That seems more normal to me.  My idea of a strategy - tactics games is Fallout Tactics, which uses 3 for turn-based mode.

Since the topic is 2 weeks old, it might be too late to have an opinion.
Uh, that's exactly what #2 says, no?

See my work:
OTC Software
Offline rdcarvallo

Senior Member


Projects: 5


2D Java games forever!


« Reply #7 - Posted 2008-11-03 21:58:58 »

Uh, that's exactly what #2 says, no?
Right...  3 == 2... and it was used in Final Fantasy Tactics also.

I'm still programming the battle map, things that are done:
*isometric map with sprite pieces
*GUI: information of pieces when the cursor is on them.
*GUI: simple menu: move, attack, end.
*movement: shows the allowed squares.

My biggest problem seems to be the graphics, my wife is designing the people, but i will have to do the spriting.

Maybe I would open a development log in the "games showcase", so I don't lose the mood, and the project doesn't become another thec demo.
Offline markus.borbely

Junior Member





« Reply #8 - Posted 2008-11-04 11:10:53 »

Some more thoughts: I'm not sure exactly how you planned the #2. I have done a similar game. This was how I did it. Each character have a pool of time that is displayed as a bar. Doing actions cost time and the bar got shorter. When the bar was to small to permit more actions, the turn for that character was over. This was bad. Players want to be able to plan ahead. I always got question: "how much time does this cost, how far can I get, how many times can I shoot?". I think the game must be fairly predictable for strategy players to enjoy it. And it must be pretty obvious whats going on. If there are lots of magic in the rules behind the scene, things just get confusing. This is just my opinion, but it is based on a real case.

If number two worked like this I would probably like it:
All characters are placed in a queue. The first in the queue can act and then he is placed last or almost last in the queue. Some characters are faster than others, so sometimes the get to do two things in a row (compared to some others).
All characters have a little number over their heads, to indicate their place in the queue.
When it is your turn with a character, you make your turn. A turn includes some movement and an attack, or a longer movement, or someting else (it's a pretty well known pattern).
All the time, you know who is going to act in what order:
"Ok, first my soldier can enter the room, then the two aliens will act before my heavy gunner can do anything."
Offline Eli Delventhal
« League of Dukes »

JGO Kernel


Medals: 39
Projects: 12


Game Engineer


« Reply #9 - Posted 2008-11-04 19:59:17 »

Uh, markus, I think you're thinking too hard about it.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
public class MyWarrior
{
     private int initiative;
     private int speed;

     public void Attack()
     {
          initiative += speed;
     }

     public void StartNewBattle()
     {
          initiative = speed;
     }
}

public class MyGameLoop
{
     private ArrayList<MyWarrior> warriors;

     public MyWarrior GetNextWarrior()
     {
          int nextGuy = 0;

          for (int i = 1; i < warriors.size(); i++)
          {
               if (warriors.get(i).getInitiative() < warriors.get(nextGuy).getInitiative())
                    nextGuy = i;
          }

          return warriors.get(nextGuy);
     }
}


I trust to can understand from what I'm saying by that. Basically everybody has their own initiative counter, then when they attack they add their speed to the counter (or the speed of their attack, or whatever), and whoever has the lowest number next goes next. That way an attack that can go twice can add 0 to the initiative, or a really powerful attack can add a high number, etc. And the order is dynamic, like if one guy has speed 3 and another has 5, it goes guyA(3, then 6)->guyB(5, then 10)->guyA(6, then 9)->guyA(9, then 12)->guyB... etc. So guyA is particularly fast and therefore gets to attack twice in a row sometimes. If you make the numbers much more precise and/or large, then pretty much everybody will get one turn but faster guys will slowly rise up in the queue, rather than just giving them two attacks.

So it's a really simple way to do it but it's very very flexible.

Oh and to address who gets to go, it helps to have a viewable list that shows who gets to act in what order next. That means you've also got to predict future initiative values, but that's okay.

See my work:
OTC Software
Games published by our own members! Check 'em out!
Try the Free Demo of Revenge of the Titans
Offline markus.borbely

Junior Member





« Reply #10 - Posted 2008-11-05 08:49:01 »

Demonpants, I thought about the queue from a player perspective. But in the code, your way is the right. And your explanation was way better... Smiley
Offline rdcarvallo

Senior Member


Projects: 5


2D Java games forever!


« Reply #11 - Posted 2008-11-05 15:58:14 »

Yes I will use a queue to show the order of the characters.

In each turn the player has movement points measured in squares to move in the board, and action points that are spent on attacking, healing, casting magic, etc.  The player can use his points as he pleases, and can finish his turn early to short his wait in the queue.

I like the implemetation given by Demonpants, I was thinking more in the vein of FFtactics which has counters in each player, (called CT, that goes from 0 to 100) an the speed the counter fills depends on the "AGI"lity of the character.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (76 views)
2013-05-17 21:29:12

alaslipknot (89 views)
2013-05-16 21:24:48

gouessej (119 views)
2013-05-16 00:53:38

gouessej (113 views)
2013-05-16 00:17:58

theagentd (125 views)
2013-05-15 15:01:13

theagentd (112 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (178 views)
2013-05-12 15:36:09

UnluckyDevil (186 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.158 seconds with 20 queries.