At 11:06 2003-1-7 -0800, you wrote:
You can add whatever kinds of resources you want to your app.Yeah, that would probably work...and wouldn't be too slow I guess. As I mentioned in my last message, the reason that I've been trying to stay away from databases and records, etc. is because I want my game to be contained within one PRC file. I don't want the word list to be a separate file from the main game. There is no way (that I know of) to embed a database into a PRC file and still be able to access it.
Based on a numbering scheme where "aa" is (0 * 26) + 0 and zz is (25 * 26) + 25, you can then have a whole series of resources with the same type, and the prefix keyed on ID. In the resource, just store your word list as a list of NULL terminated strings, with the prefix missing. You can use the 5-bit encoding I mentioned to make the list more compact. To pick a word, pick a random number, use a frequency table to decide which bucket its in, and then do a sequential search through your sublist to find the word.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
