
December 2nd, 2003, 01:33 PM
|
 |
Captain
|
|
Join Date: Nov 2002
Location: Finland
Posts: 864
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: Status of systems not presently seen
Quote:
Originally posted by Imperator Fyron:
And just were did you get those numbers? A hat, I presume. You have no idea how MM implemented those objects (and neither do I) Ship names must certainly be included, as they can be seen. And all of the data you can see for ships, including damage they have if appropriate. It is a bit more than you would imagine...
|
Not exactly from a hat. I thought what information I see about enemy planets and ships and calculated how much space I need to store that information. Ship names would need a lot of space, at least in some circumstances. 2000 ships with 20 characters names would take 40 kb or less depending what letters are allowed to ship names (how many bits you need per character). I think it's not necessarily to have ship names, class names are enough. And why the damage ships had should be saved? You never see it if you don't have a ships/units with long range scanner in the system.
Quote:
17 KB per player... you also have to factor in the fact that every empire has to have data stored for whether all those ships/planets can be seen. And then you have to store 21 different Versions of what is in every single system (and then more if neutral races get created mid-game through intel or events). 1 for the actual data, and one for the Last thing every race saw for that system. It gets much larger than just that 17 KB. Sure, you can have optimizations and have an empty byte storing a bool for unexplored systems. But as soon as they become explored, you have to start adding data whenever stuff is seen.
|
Information you need for a planet:
resource values 3 bytes
population 2 bytes
coordinates 1 byte
owner 1 byte
total 7 bytes
Information you need for a ship (name not included):
class 1 byte (I assume classes are stored somewhere so you need only the ID of the class)
coordinates 1 byte
total 2 bytes
For units the class are replaced by number of the units and the type of the unit (fighter, satellite...)
Then it's saved for every empire every system they have visited but not see at the moment. To go over 5000 ships and 1000 planets you have to see a very large area. And if you see more than 5000 ships and 1000 planets the savegame file are probably some megabytes, so it's not a big deal if it goes over 17 kb / player.
__________________
'The surest sign that there is intelligent life elsewhere in the universe is that none of it has tried to contact us.' Calvin and Hobbes
Are you tough enough to be the King of the Hill?
|