Jump to content
  • Advertisement
Sign in to follow this  
DrNecessiter

String Table System

This topic is 4820 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Has anybody created a "be-all, end-all" string table system for use in games? Ideally this system would cache strings from disk as needed (or via a precache call) such that the enitre table doesn't need to be in RAM at once. Just looking to learn from other's experiences.

Share this post


Link to post
Share on other sites
Advertisement
Text is just another resource for games, so you can load it using a simple resource manager, just as you would with any other type of resource (textures, models, sounds, music, etc).

On the other hand, from a basic memory point of view, a typical 256x256 32-bit texture takes about as much memory as 45000 english words. When your game text is typed at 80 wpm, eight hours a day, by someone who knows exactly what he is writing, and with no in-game testing whatsoever, it would still take you 75 days to write those words. And today, a 256x256 32-bit texture is considered "lightweight" when in the actual system RAM.

Share this post


Link to post
Share on other sites
I understand your point but, as in life, not everything is as simple as hoped. Here are a few issues:

- This is for several different consoles, so every byte counts.
- The game may have a lot of text, only a fraction of which needs to be in memory at any one time.
- Load times need to be ultra-fast. Can't parse file or directroy for each load. Must keep offset table in RAM so string or strings can be read in one swipe.
- Avoid "in-the-loop" dynamic memory allocation, so allocating and freeing memory on a per-string basis is not acceptable. Want to use a static cache buffer.

The task is fairly straightforward... just looking for somebody that has done this to see if I'm predicting all the problems.

(BTW: your calculations are a bit off. A 256x256x3 texture is really only about 40K in DXT1. That's about 6600 words (at 5 char and a space per) which can by typed in under 90 minutes :-) )

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!