Just needed some info / advice / suggestions on the follwing...
I have heard that keeping most values externally (as in a file that gets read in) is the best way to go as you dont have to recompile when tweaking settings.
Along the same lines, I was thinking of expanding on this thought and make actual objects in text files.
Here is an example: (quick and dirty)
range = 15;
damage = 20;
I know syntax is way off, but given as an example.
in any case, so say I have 20 different weapons, normally I would create 20 different classes.
This made me think, what if I want 50 different weapons, or add new weapons in the future?
So, I started to think is there a way for the game to read in a file and make these classes while the file is not EOF?
so as an example, in a text file i have:
would it be possible to iterate on this file to make the rifle object and a rocket launcher object and whatever else is there?
in addition, if i have 50 soldiers, 20 have rifles and the rest have various others... how would they use these objects?
Simply solved in classes by making the object for each soldier.
I know I am asking a lot, but any advice anyone can give would be greatly appreciated. (and credits will be given
I have heard scripting languages (LUA / GameMonkey) could help. Is this a viable option?
Thanks in advance.