Archived

This topic is now archived and is closed to further replies.

3DNeophyte

A could-be speed/performance issue...

Recommended Posts

3DNeophyte    122
In my text-RPG for Visual Basic, I''m using a class called "Location" that stores all the text-based information for an area of the game. So far, that should work. Well, I''m wanting the program to initialize all the zones in the game upon startup. I''m thinking of having the entire initialization process contained within the main form (which would result in a mile or so of zone information in my code due to having all the text stored there...), but I''m also thinking of another option where the intialization procedure accesses a text file from which zonal information is passed along to my location objects. So my question is this: Which would be more optimal for the program - to have all the information processed within the program only, or to have the program fill in all the object information from a text file? If anyone can offer their advice, I would appreciate it greatly. If I''m not being completely specific in my information, I''ll add some pseudo source code to illustrate my problem. Thank you ''''Math is useless'''' - who the hell has ever said that!?

Share this post


Link to post
Share on other sites
DaJoostMan    122
Well including the text in ur program would be faster but considering u are using a text based rpg and using vb i''d say speed is not the issue here.
Including ur text in a file has the benefit of easy editing. If u later want to change something u wont need to recompile everything.
There is also the security. Do u want users to be able to easily read and/or edit ur story. If u use a text file that will be very easy to do. including it in ur program will eliminate that.

Hope i helped,
good luck

Share this post


Link to post
Share on other sites
3DNeophyte    122
Thanks for the reply. I''m leaning towards the text-file route. Concerning security of the file, isn''t there a way to prevent people from easily accessing a textfile, like encryption or something? I''ll look into it; but if you or anyone else knows how to do it, please tell me - it''ll save me some time

Share this post


Link to post
Share on other sites
EvilCrap    134
textfile, all the way. if you have ''miles'' of text hard coded in your program, you get problems, here are some i can think of:
1) compile-time editing only.
2) Program size : a HUGE program loaded into memory all at once...

Share this post


Link to post
Share on other sites
3DNeophyte    122
Thanks for reinforcing my decision, Evil. I don''t know if it will be "miles" as I previously said, but it sure will be a lot - think of Dungeons and Dragons'' Faerun in the Forgotten Realms converted completely into text. I''m implementing file reading functions in my program right now, so text-files it is. Thanks

Share this post


Link to post
Share on other sites