Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (534)
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 3396 times)
0 Members and 1 Guest are viewing this topic.
Offline rdcarvallo

Senior Member


Projects: 5
Exp: 15 years


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
« 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
Exp: 15 years


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

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


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

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


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
Exp: 15 years


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

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


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!
Legends of Yore - The Casual Retro Roguelike
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
Exp: 15 years


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.

 

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

The first screenshot will be displayed as a thumbnail.

pw (35 views)
2014-07-24 01:59:36

Riven (33 views)
2014-07-23 21:16:32

Riven (21 views)
2014-07-23 21:07:15

Riven (24 views)
2014-07-23 20:56:16

ctomni231 (55 views)
2014-07-18 06:55:21

Zero Volt (47 views)
2014-07-17 23:47:54

danieldean (38 views)
2014-07-17 23:41:23

MustardPeter (43 views)
2014-07-16 23:30:00

Cero (59 views)
2014-07-16 00:42:17

Riven (56 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!