PDA

View Full Version : RPG Battle System


grom
11-11-2007, 08:23 PM
Trying to code a battle system similar to that in Crono Trigger, which has the following properties:
* Each party member has an attack meter
* Each enemy also has an attack meter
* Can only issue commands when a party member has full attack meter
* The attack meter fills up according to that characters attack speed
* Ability to pause all attack meters (eg. when selecting an item or target)

What is the best way to handle all this? I was thinking of using threads but with threads not sure how I could pause all meters or notify UI/battle engine when attack meter is full.

Reedbeta
11-11-2007, 08:35 PM
Just update all the attack meters in your update routine, where you handle input and do all the other per-frame updating of game state. But don't update them if you're in the selection mode.