- 0
[XP] HP Bars during Combat - Whats the best way to do it?
Asked by
Heretic86
-
Recently Browsing 0 members
No registered users viewing this page.
Asked by
Heretic86
No registered users viewing this page.
By best, I mean most efficient non laggy way to do it.
So I have this script I am trying to modify, and thinking to myself it needs a total rewrite because of the lag it generates. The script appears to be updating the graphics it generates every frame, which I know is totally unnecessary and is exactly what is causing the extreme lag. If you wanna take a look at the source, its the ATB Script in my Caterpillar Demo. You'll have to get rid of the following Window Bars script as well cuz some of those things are redefined in that window (need to clean up some of the code, workin on it...). The LAG occurs while the Interpreter is running, which, in plain english means that if you go to your Database, Troops, and set up some battle events, like the enemy casts a spell, there is some horrible lag.
Script Source: http://www.775.net/~...ds/rmxp/cat.php Script says ATB
What it looks like it is doing is creating one custom window that has all 4 actors HP bars displayed in it. Is it better to keep it this way, or should each actor get their own HP Bar Window so that each only updates as necessary?
What I am thinking is that I can assign non displayed properties so I can update when it needs to update (@hp_displayed != actor.hp) and save from trying to redraw each and every frame.
I am also not sure of the difference between Update and Refresh as far as the methods that are normally called, or when or how I should define those methods.
So, my question is, would it be better to have One window displayed, then update each HP bar in that window, or give each actor their own unique window specific to them.
Any suggestions?
edit: Forgot to tell you the line number. Go to Line 1412 in the ATB script...
Edited by Heretic86Share this post
Link to post
Share on other sites