Jump to content


RPG Battle System


1 reply to this topic

#1 grom

    New Member

  • Members
  • PipPip
  • 10 posts

Posted 12 November 2007 - 03:23 AM

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.

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4782 posts
  • LocationBellevue, WA

Posted 12 November 2007 - 03:35 AM

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.
reedbeta.com - developer blog, OpenGL demos, and other projects





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users