Page 1 of 1

Turn-Based RPG Battle System

Posted: Mon Mar 15, 2010 8:04 pm
by GR33B
Ok, so I'm working on a 2D RPG Engine, and it's practically done. The only thing missing is a Battle System, which is obviously one of the most important and (in my opinion) most challenging aspects of a RPG engine to implement. My problem is that I simply can't think of a good way of going about framing it, and how to keep it in flow. I want it to be turn-based, and have party vs. party support. I already have a GUI system that can handle the selection of attacks/items from the inventory and displaying messages such as "Enemy Magikarp used Splash!", but my main concern is how to keep the flow of things, so that characters aren't all going at once, so that their moving out of formation to attack, then moving back into formation when they've finished, etc. Not to mention an enemy's attack-selection/item-use AI.

Sorry if I'm not being all that clear, I'm just kinda hazy and confused myself so it's hard to communicate what the problem is.

Anyone think they can help?

Re: Turn-Based RPG Battle System

Posted: Mon Mar 15, 2010 9:51 pm
by Live-Dimension
The best way to find out is to play or at least watch other turn-based battle party RPG's and see how they do it (IE, FF anything)

Re: Turn-Based RPG Battle System

Posted: Mon Mar 15, 2010 10:45 pm
by Innerscope
GR33B wrote:Ok, so I'm working on a 2D RPG Engine, and it's practically done. The only thing missing is a Battle System, which is obviously one of the most important and (in my opinion) most challenging aspects of a RPG engine to implement. My problem is that I simply can't think of a good way of going about framing it, and how to keep it in flow. I want it to be turn-based, and have party vs. party support. I already have a GUI system that can handle the selection of attacks/items from the inventory and displaying messages such as "Enemy Magikarp used Splash!", but my main concern is how to keep the flow of things, so that characters aren't all going at once, so that their moving out of formation to attack, then moving back into formation when they've finished, etc. Not to mention an enemy's attack-selection/item-use AI.

Sorry if I'm not being all that clear, I'm just kinda hazy and confused myself so it's hard to communicate what the problem is.

Anyone think they can help?
Hmm tough question. This really is up to you, and like Live-Dimension said playing other RPG's and seeing how they do it will help. I'd suggest making a prototype using paper (battle menus) and using models. (like a chess board or something) Figure out how you want to design it and then play out some scenarios. This will make it easier to translate your design into code, IMO.

Re: Turn-Based RPG Battle System

Posted: Tue Mar 16, 2010 12:52 am
by DaveB
Well the system that I like most so far out of the RPGs I have played is the ATB system (aside from the FFXIII version), if I were you I would just google current RPG turn based battle systems and go from there. There is a project going on called Q-Gears were a group of people are reverse engineering the engine used for making the FF games on the PS1, maybe you could check out that maybe and look at their source code.

Re: Turn-Based RPG Battle System

Posted: Tue Mar 16, 2010 8:40 am
by hurstshifter
GR33B wrote:Ok, so I'm working on a 2D RPG Engine, and it's practically done. The only thing missing is a Battle System, which is obviously one of the most important and (in my opinion) most challenging aspects of a RPG engine to implement. My problem is that I simply can't think of a good way of going about framing it, and how to keep it in flow. I want it to be turn-based, and have party vs. party support. I already have a GUI system that can handle the selection of attacks/items from the inventory and displaying messages such as "Enemy Magikarp used Splash!", but my main concern is how to keep the flow of things, so that characters aren't all going at once, so that their moving out of formation to attack, then moving back into formation when they've finished, etc. Not to mention an enemy's attack-selection/item-use AI.

Sorry if I'm not being all that clear, I'm just kinda hazy and confused myself so it's hard to communicate what the problem is.

Anyone think they can help?
Good discussion topic here. I would say the most important first step would be to figure out what specific type of turn based system you want (ffVI/VII atb style, dragon quest VIII/ffI/suikoden initiative style, etc...). Like some others have stated, get it down on paper. Draw the setup as you envision it, and make decisions on the style. Once that's done you will probably have a slightly better idea of what you need to accomplish and how it can be done. I don't really have much input on how to handle this from a technical standpoint as I've never made an RPG but it seems like you're on the best possible forum for help on that end :)

Re: Turn-Based RPG Battle System

Posted: Tue Mar 16, 2010 7:10 pm
by eatcomics
GR33B wrote:Ok, so I'm working on a 2D RPG Engine, and it's practically done. The only thing missing is a Battle System, which is obviously one of the most important and (in my opinion) most challenging aspects of a RPG engine to implement. My problem is that I simply can't think of a good way of going about framing it, and how to keep it in flow. I want it to be turn-based, and have party vs. party support. I already have a GUI system that can handle the selection of attacks/items from the inventory and displaying messages such as "Enemy Magikarp used Splash!", but my main concern is how to keep the flow of things, so that characters aren't all going at once, so that their moving out of formation to attack, then moving back into formation when they've finished, etc. Not to mention an enemy's attack-selection/item-use AI.

Sorry if I'm not being all that clear, I'm just kinda hazy and confused myself so it's hard to communicate what the problem is.

Anyone think they can help?
What I would do is, at the start of battle check their initiative (or equivalent in your game) the highest goes first, and have a que for who goes when, then have the AI choose what they want to do based on objectives (If their health is low, heal, if their health is high, attack) and that oughtta do er... If that's what you're going for ;)

Re: Turn-Based RPG Battle System

Posted: Tue Mar 16, 2010 7:39 pm
by aamesxdavid
eatcomics wrote:What I would do is, at the start of battle check their initiative (or equivalent in your game) the highest goes first, and have a que for who goes when, then have the AI choose what they want to do based on objectives (If their health is low, heal, if their health is high, attack) and that oughtta do er... If that's what you're going for ;)
This sounds a lot like Lost Odyssey's battle system (I'm sure there are others, but that's the one that comes to mind). Although it doesn't really use an ATB bar (that I recall), it's a nice way to go to avoid multiple characters going at the same time, and avoids possible complications from realtime battle-gauge-filling. I also think it's one of the most extensible systems, because you can have the players manipulate the "initiative" of characters (one character speeding up another, queuing one character up to wait for another in a combined attack, etc.) very easily. And from the player's perspective, it allows for a lot of strategy, because you know in advance the order in which the characters will attack.

As for AI, that's something you can build up slowly, and you'll probably want to work at more after you play your battle system some, and think of more and more battle conditions that appear, and what the computer could do against it.

Re: Turn-Based RPG Battle System

Posted: Wed Mar 17, 2010 9:35 pm
by GR33B
Thanks for the suggestions guys. At school yesterday I wrote some psuedocode and ideas for turn management and what not. Tonight I successfully implemented a rough one-on-one battle system. The engine warps the player and enemy to a pre-defined battle locale, with standard fading transitions for now (maybe some special ones later). The player can go through his inventory and attack list, as well as attack and kill the enemy, but the enemy cannot fight back yet. Once the enemy dies, a dialog appears saying the player has defeated the enemy, then after 1 second it fades out and warps the player back to his original map position and fades back in.

Pretty seamless integration so far, just gotta get some selection AI (going with your suggestion, eatcomics) for the enemy, then try and add more enemies and allies in for a party vs. party battle system. That means I'll have to upgrade my turn-management system from a simple boolean to something that can hold the character team index as well as the specific party member index.

Re: Turn-Based RPG Battle System

Posted: Thu Mar 18, 2010 7:45 pm
by eatcomics
VECTORS! that's probably how you'll want to hold parties...

Re: Turn-Based RPG Battle System

Posted: Thu Mar 18, 2010 8:03 pm
by dandymcgee
eatcomics wrote:VECTORS! that's probably how you'll want to hold parties...
When I read this I immediately thought to myself "what the hell does physics have to do with a party system?". :lol:

Re: Turn-Based RPG Battle System

Posted: Thu Mar 18, 2010 8:17 pm
by eatcomics
yeah :lol:

Re: Turn-Based RPG Battle System

Posted: Thu Mar 18, 2010 8:34 pm
by pritam
Hey Dr33B! Brilliant mustash man, I just love it!