How many variables before performance slowdown?

Hey, everyone!

My title Estheria: A Realm Divided is being built from the ground up as an interactive choice-RPG. As such, many systems have to be initialized, several of which have robust requirements for variables to be tracked and implemented.

I’m already a few hundred variables in, and these are just for some of the core systems. My question is if anyone might be aware of limitations within the engine that could cause major issues if this ends up in the range of a few thousand.

I am certainly working my best to optimize. However, due to the intricacy of systems (such as the Stats Screen being used as a multi-system access tool for information and such), it’s something I’ll certainly have to do regardless.

I appreciate any and all assistance!
~Zach

I’ve never encountered any performance problems when playing a complicated game. The main issue I have had is that the longer the files are, the longer QuickTest and RandomTest take to run. But that isn’t directly related to the number of variables that have been created.

5 Likes

With the processing power of current devices, I don’t think you should worry about performance issues. Having more variables would mean more memory consumption (almost depreciable for a choice of games app I could say), the only thing that would maybe slow down is how many checks the game has to do to go to the next screen, and the length of text to be shown. But being a text game, you don’t need to react to the page being turned in order to make a kill so I wouldn’t worry about that if I were you.

2 Likes

The only thing that I’ve encountered that can slow the game down is a lot of gosub_scene checks. The variables are presumably all numbers and text etc. not binary objects, so I don’t see memory becoming an issue.

2 Likes

As above, your biggest issue will be processing any data in those variables. If you start to loop over thousands of array variables, you will definitely see the impact in the responsiveness of your game.

Whatever you do, check performance on a mobile phone regularly.

7 Likes

Oof, yeah, that’s also very good advice. An old, busted up phone with only the out-of-the-box browser.

2 Likes

Hey, everyone!

Thanks a ton for all the great replies, I appreciate all of you, and will keep everything in mind as I move forward.

~Zach

2 Likes

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.