Yet Another question for you experts...
Posted: Wed Dec 04, 2002 11:15 pm
Yet Another question for you experts...
I'm developing a ASCII text-based RPG game. I'm finding that I'm repeating text strings in many places. I assume each unique string takes up string memory. Would it be more efficient to create string var words such as confused$ and then assemble phrases/sentences using these string var words?
For example, I might issue the following messages: "You feel intutitive", "You feel creative", "You feel stealthy", etc.
Would it be better to define a string var phrase like this: youfeel$ = "You feel", intuitive$ = "intuitive", creative$ = "creative"
And then throught my code, piece the phrase together like this: print youfeel$ + intuitive$
Is it worth it? Will I save string memory but pay more in code memory?
Am using QB7.1 Thanks for any help!
I'm developing a ASCII text-based RPG game. I'm finding that I'm repeating text strings in many places. I assume each unique string takes up string memory. Would it be more efficient to create string var words such as confused$ and then assemble phrases/sentences using these string var words?
For example, I might issue the following messages: "You feel intutitive", "You feel creative", "You feel stealthy", etc.
Would it be better to define a string var phrase like this: youfeel$ = "You feel", intuitive$ = "intuitive", creative$ = "creative"
And then throught my code, piece the phrase together like this: print youfeel$ + intuitive$
Is it worth it? Will I save string memory but pay more in code memory?
Am using QB7.1 Thanks for any help!