Binary "Database" for a game - Need a how-to =)
Hello and thanks in advance to anyone who offers help.
To make this simple, let's say I have a game which has 100 different monsters. I want a binary data file to hold all of these. It would have the index number of the mob, name, size, attributes, etc. I can easily create an editor to edit the records in this file, as soon as I know how to create this file and be able to find a specific monster in the file and fill, say, text boxes full of the information regarding that specific monster.
I hope I am writing this in a way that you can understand fully what I mean. Let's say I have a data file full of monsters, and the one I want to know about is in the middle of the file, say record number 33. I want to be able have my program look for the monster named "Dragon" and then retrieve all information that goes with that monster.
I was able to do this easily in VB6. I even made an editor that could go through the different monsters, with their information populating text boxes as I browsed through them. but for the life of me I can't figure out how to do this in C#. I know how to read and write binary files, but that's about it.
So, to my question. How could I do this? I want all records in a single binary file and the ability to locate specific ones and get their info.
Thanks in advance. I apologize for the book I wrote. I just wanted to make sure it was clear what I was looking for.