Custom File Editing, Hex, Binary, Text
Members - Reputation: 305
Posted 22 November 2012 - 06:10 AM
I have created a custom file format for my engine which uses both standard text and binary data. Eventually I will implement creation of these files in a level or world editor, but for the time being I am editing them by hand. My question is how do I conveniently enter delimiting characters into the file, i.e. null and /n, etc. I have been using a hex editor, but it is not convenient for entering non-0 delimiters, and can introduce bugs if data is input at the wrong location (because I cannot intuitively tell where the delimiter should go, I have to count and use the side-bar text representation of the hex). Is there a better way which would allow me to type in '0' or something so that a normal text editor would know that this is a null and NOT a 0 char?
Thanks in advance.
- Dave Ottley
I wonder as I wander...
Crossbones+ - Reputation: 1416
Posted 22 November 2012 - 01:26 PM
Crossbones+ - Reputation: 4286
Posted 22 November 2012 - 01:41 PM
If you're going to be using custom binary files a tool for creating and editing those files should be a priority, even if it's only temporary.
When I need to store data in a binary format I first of all work out a design for the format itself, then I write the required tools based on that design, and it's not until that's finished I start generating and working with the files themselves.
This way of working saves you from a whole lot of painful situations afterwards.
I gets all your texture budgets!
Members - Reputation: 514
Posted 22 November 2012 - 03:40 PM