So I've got this trader game running on an 8-bit architecture.
And I want to store Charted Space on disk. The file system is FAT32.
How would you do it?
* * *
At least theoretically, I could store each steenking UWP as its own file. All 80,000 of them (appx).
I mean, that's the simplest solution, right?
For example, Regina could be stored in a file named 53/281-5099 (or whatever).
Its neighbors would be 53/280-5099, 53/282-5099, 53/281-5098, 53/281-5100. And so on. Very easy to use coordinates to determine filenames.
(I'm not consulting the map so my numbers are off, but you get the drift.)
File Content
A UWP often takes up 135 bytes. It's parsable, but it can be improved. Also, there's room for another 100 bytes.
Here's what the player might want to know:
Pad it out to simplify parsing.
	
	
	
		
Lots of room left.
				
			And I want to store Charted Space on disk. The file system is FAT32.
How would you do it?
* * *
At least theoretically, I could store each steenking UWP as its own file. All 80,000 of them (appx).
I mean, that's the simplest solution, right?
- 100 directories to break up the fileset based on the first two digits of the ring/ray coords.
- Each directory would have on the order of 800 UWPs.
- The filename has the ring/ray coords of a single UWP.
- Finding its neighbors is a snap. It's some math and then some directory searching.
- I can use much of the UWP as-is.
- Reading in a dozen tiny files is fast.
- Ideal file size is just under 256 bytes -- plenty of room for UWP plus metadata.
For example, Regina could be stored in a file named 53/281-5099 (or whatever).
Its neighbors would be 53/280-5099, 53/282-5099, 53/281-5098, 53/281-5100. And so on. Very easy to use coordinates to determine filenames.
(I'm not consulting the map so my numbers are off, but you get the drift.)
File Content
A UWP often takes up 135 bytes. It's parsable, but it can be improved. Also, there's room for another 100 bytes.
Here's what the player might want to know:
- The sector: SPIN
- The hex: 1910
- World name: Regina
- UWP: A788899-C
- Trade remarks: Ri Pa Ph An Cp (Amindii)2 Varg0 Asla0 Sa
- Importance: 4
- Nobles: BcCeF
- Bases: NS
- Zone: -
- PBG: 703
- Worlds in the system: 8
- Allegiance: ImDd
- Stars: F7 V BD M3 V
Pad it out to simplify parsing.
		Code:
	
	SPIN 1910 REGINA              A788899-C NS RI AN CP SA       AMI VAR ASL 4BCF-703 8 IMDD F7 V BD   M3 VLots of room left.
			
				Last edited: 
			
		
	
								
								
									
	
								
							
							 
	 
 
		 
 
		 Depending on the ruleset (looks like you are using T5) data that can be auto-generated (like many trade codes) does not need to be stored.  As, Va and others that are determined by other data fields and need not be stored. Others like Capitals (Cp) or minority sophonts (the travellermap codes) which are assigned and not necessarily auto-generated will have to be saved.  At runtime generate the necessary codes as needed.  Since you mention 8 bit you would have to determine the resources used to calculate the trade codes and such vs just storing it in files.
  Depending on the ruleset (looks like you are using T5) data that can be auto-generated (like many trade codes) does not need to be stored.  As, Va and others that are determined by other data fields and need not be stored. Others like Capitals (Cp) or minority sophonts (the travellermap codes) which are assigned and not necessarily auto-generated will have to be saved.  At runtime generate the necessary codes as needed.  Since you mention 8 bit you would have to determine the resources used to calculate the trade codes and such vs just storing it in files. 
 
		