Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
Tim Driven Development | Test until the fear goes away
That looks like a maintenance headache You will have no end of difficulty linking the individual files to your objects. That is why file management systems have largely been abandoned.Yosuf Ibrahim wrote:. . . Save each object in its own .dat file and organize them into folders based on their type . . .
That looks like a recipe for poor performance as you will find yourself reading the same file repeatedly and discarding much of the information read.Just the whole list of the objects saved in .dat file of the super type . . .
Yosuf Ibrahim wrote:I do not think databases would fit my needs because think of the objects I am saving as words in a dictionary, the user will be only reading that data will not modify it or add more to it, all the data will be added during the development of the application.
Carey Brown wrote:
Yosuf Ibrahim wrote:
What is the "unique id" used for? Can you have multiple weapons of the same type?
The unique ID aka classname is how the game engine knows the weapon the developer is trying to equip a soldier, crate etc.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
Yosuf Ibrahim wrote:The unique ID aka classname is how the game engine knows the weapon the developer is trying to equip a soldier, crate etc.
Carey Brown wrote:
Yosuf Ibrahim wrote:The unique ID aka classname is how the game engine knows the weapon the developer is trying to equip a soldier, crate etc.
So, you can only have one gun?
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
Yosuf Ibrahim wrote:
Carey Brown wrote:So, you can only have one gun?
Of every type yeah, for example:
Name: RPG-42 Alamut
ClassName: launch_RPG32_F
Carey Brown wrote:
Yosuf Ibrahim wrote:
Carey Brown wrote:So, you can only have one gun?
Of every type yeah, for example:
Name: RPG-42 Alamut
ClassName: launch_RPG32_F
It sound like the name itself is unique if you can only have one, so why would you also need a unique id?
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
Tim Driven Development | Test until the fear goes away
Tim Cooke wrote:The application I work on at work has a very large static data set that is read into memory on startup and never modified at run time. That data set lives in a single file and is modified as and when new items are required, which is rarely. The new data is then loaded the next time the application is started up.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
Now I'm confused. If you already have a large single file why are you looking to make lots of little .dat files?Tim Cooke wrote:The application I work on at work has a very large static data set that is read into memory on startup and never modified at run time. That data set lives in a single file and is modified as and when new items are required, which is rarely. The new data is then loaded the next time the application is started up.
Yosuf Ibrahim wrote:Isn't that bad programming, having all the data read on startup using up maybe a GB of ram if not more that is not required??
Tim Driven Development | Test until the fear goes away
Yosuf Ibrahim wrote:Isn't that bad programming, having all the data read on startup using up maybe a GB of ram if not more that is not required??
Tim Driven Development | Test until the fear goes away
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |