I’m hoping to have a list holding previous used names, so that each one can only be used once. This is because once player’s die they will stay dead and need to make a new character. There can be repeat, but they will be named “Dumb Jerk the second”, or whatever, to show that they’re same-named descendent.
Anyhow this list can potentially get huge from all the players making new characters, and I’m having problems thinking of a way to add to the list in a quick manner once it gets big. I tried using a random access file with the names in alphabetical order, in which searching for a existant name is decently quick in large files. However there seems to be no way to write to it without either writing to the end or overwriting something else. The alternative, re-writing the entire file with the new entry is very slow.
Perhaps using mysql would speed things up here? I had problems finding what the runtimes were for inserting and finding stuff in an alphabetically ordered list that was large, and aside from that I don’t really want to use mysql if I don’t have to.
Any ideas on how to handle such a large list [30mb+] for this?