I'm new to handmade hero, been marathoning for 4 months and I'm at episode 130-ish, I could say that it changed on how I think of programming, and it's really changing me for good.
I have a xls file that contains descriptions of skills and power ups. I choose xls because it's easy to tack and easy for content authoring, also probably for localizations if I really planned for it.
Then this xls file gets processed and turned into something that the game could use, probably into csv then to binary, I don't know the ideal solution for this, don't want to choose XML or JSON for it's lack of speed to process it.
How would you store strings data on the memory data block contigously?
I see two problems that needs to be tackled,
- Storing the descriptions data on contiguous array
- How to access it fast by index
If I use char* to store it, drawbacks is I need to know the size of the descriptions up front, and the memory data block will be variable sized allocated. Using std::string would be easier to index but I would like to push myself for doing it this way for learning purpose.
What are your suggestions on solving this problems?
Does this get discussed later on? On which episodes?