i deletes some of the 20,000 files bring it down to around 7000 and it works faster ect. ect.

No it doesn't. There's nothing about my program that would cause it to work faster by deleting questions. The only part that would be quicker would be the initial counting of the categories, which only takes 2-3 seconds. During normal gameplay, you aren't going to notice a speed benefit by deleting questions. I think any perceived benefit is in your imagination.

Also, I'm not 100% certain, but I can imagine that deleting question files would cause the problems you're seeing where it seems to lock up. My algorithm chooses a random category, then a random number between 1 and the number of questions in the category. If you go deleting questions, I don't know what could happen with that. I might not be doing a lot of error checking, I think I check to see that the file is there, but if it's not, all bets are off.

I'm *pretty sure* you could get away with deleting an entire category or multiple categories, ("rm FSW.*.dat" if you don't want the Star Wars questions, for instance.) That should work. But deleting various questions within a category and leaving behind others, that isn't going to work. Not unless you renumber all the files.

Anyway, the point of a trivia game is to not have repeat questions... I admit 20,000 is a lot and it takes up more disk space than your average game, but I wouldn't say that question loading or displaying of them takes a long time, nor does the program take up a lot of memory (it only loads them when it needs them, it doesn't read them all into memory!) So I don't know why anyone would want to go deleting questions.

If 20,000 is too much, then what is a good number? Not everyone likes all the categories, and I thought that burning through all the questions in your favorite categories wouldn't take very long if I only have 5,000 questions or so. It's all about replay value.

So if any of you are deleting questions, then you need to renumber the categories consecutively. You also need to make sure the *.0000.dat file is there, since that's the one that gives the info about the category's name, and whether it's enabled when you start up (change the 1 to a 0 in the *.0000.dat file if you want that category disabled when you start.)

Now, is anyone who hasn't been deleting questions having problems with lockups?
_________________________
- Tony C
my empeg stuff