Dimacus
Member
I need some input on this;
Im currently trying to make some sort of conversation system for a RPGish game.
But I just cant decide if I should preload all the conversations or if I just should load them when needed.
If I only load them when needed there would be an excess of file I/O operations, and alot of searching trough files.
However, caching all conversations would take quiet a lot of ram and I dont really have a great way of indexing them.
I thougt about creating a FILE (I use C style file I/O) for EVERY diffrent conversation and keeping them in an array, until I realized that it is a somewhat stupid idea since you can only have that many files opened at the same time and the FILE struct might takeup even more space than ceartin conversations.
So, what do you guys think?
Im currently trying to make some sort of conversation system for a RPGish game.
But I just cant decide if I should preload all the conversations or if I just should load them when needed.
If I only load them when needed there would be an excess of file I/O operations, and alot of searching trough files.
However, caching all conversations would take quiet a lot of ram and I dont really have a great way of indexing them.
I thougt about creating a FILE (I use C style file I/O) for EVERY diffrent conversation and keeping them in an array, until I realized that it is a somewhat stupid idea since you can only have that many files opened at the same time and the FILE struct might takeup even more space than ceartin conversations.
So, what do you guys think?