This is a rough idea of my code, What I have now works wonderfully. My problem is it takes 6-8 minutes to compile every time I need to make a minor change.
I looked into splitting this into multiple files. I have tried to do it, and I get errors, lots and lots of errors... I was thinking a file for the rooms, a file for the verbs, and a file for the nouns. I've tried .cpp files, .h files, and every which a way. I get errors from file not found, not declared in this scope, wrong type, not defined and so on.. Once I swear my compiler asked me if I was stoned or just plain stupid...
I'm obviously not doing something right. I'm not even sure this is the right answer for my problem. May I impose on someone to show me how to do this properly please? I thank you in advance.
The problem is that you are hard-coding level layouts. It takes a long time to compile because not only are you essentially embedding entire levels into your application, you're doing it using a language which is nutorious for long compilation times.
Instead, devise a level format that you can load from files at runtime. You can change the levels without recompiling your program this way.
I thought that is what I was asking for, to put the rms data into a separate file so it would compile faster... otherwise, you advice escapes me. Can you please give me a small example, some pseudo code or something to get my brain engaged in that direction?
LB, I thank you for your advice, I am not unappreciative I assure you. As i stated in my original post, I have tried making separate data files, and failed. That's why I came here. Your answer "devise a level format that you can load from files at runtime." is like Someone asking why the space shuttle didn't launch and you telling them "You need to use the dew hickey"...
Though you answered the question, (Thank you), but you also leave me at the same place I was before I posted the original question. That's why I asked for "a small example, some pseudo code or something" Could you please be just a tad more specific? Like
" Make an .dat file, put the pointer array in their, make sure it reads this way, or that way..."
I'm not asking you to write my program, but more or less give me a guide that I can use.
Thank you so much sir...