Go back to previous topic
Forum Name Gameplay
Topic subjectCF Performance
Topic URLhttps://forums.carrionfields.com/dcboard.php?az=show_topic&forum=6&topic_id=24457&mesg_id=24457
24457, CF Performance
Posted by Zulghinlour on Wed 31-Dec-69 07:00 PM
So I continue re-factoring code to make this a smooth running beast. One of the benefits I've seen already is that TICKS actually happen closer to when they should (between 15-45 seconds). Just one of the things I'm now keeping an eye on.

I've added in goals & validation around all functions in our update_handler() function (this basically is what runs the game). If any function exceeds the goals I've set all the IMPs get notified, so we can go make appropriate changes. As of now, the majority of functions have a target goal of 0.03 seconds, there are a few that do the most grunt-work that have a target goal of 0.25 seconds (like mobile_update() which does various things to every mob/character in the game every 4 seconds, and char_update() which is the function that takes care of the TICK for every mob/character).

Right now my hope is to keep the goals less than 0.25 seconds, and add new functionality as necessary to meet those goals.

I know of about a dozen or more things that don't meet these goals right now, and I'm slowly working through them.