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!?
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.
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
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...
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