ID:152784
![]() Oct 15 2005, 8:34 pm
|
|
Would dividing all of a player's stats by X when they log out and their file is saved, and then multiplying them by X when they log back in again save space? I think it could save a few bytes, which multiplied over hundreds or even thousands of players adds up to save a lot. I was just thinking about it for a while and thought I'd share my idea.
|
![]() Oct 15 2005, 11:24 pm
|
|
i dont think it would work because you if some of the data was odd when you divide by X you would get a decimal place. this would requere a duble or floting pointer file type and would require a lot more bytes for saving
|
The Riddler wrote:
i dont think it would work because you if some of the data was odd when you divide by X you would get a decimal place. this would requere a duble or floting pointer file type and would require a lot more bytes for saving So no matter what X is it gives a dicemal place. What if X = 1 and the odd number is 1? EGUY, I think its a good idea. Why not test it out. Then report back with a reply on this thread. |
If you're saving values in binary it won't make any difference at all, because each value will be packed into the same number of bytes (probably 4) regardless of how large it is.
If you're storing values as text, then you'll use more space. And data stored as text is generally larger than binary data anyway, so storing it in a binary format will save more space. Except in BYOND savefiles. Apparently binary savefiles (the default) are actually larger than text ones, which is a bit odd. So if you're really looking to save space, you could export your savefiles to text. These days, though, storage is cheap, so a few bytes isn't going to make much difference. Spend the time on game design instead. =) |
Green Lime wrote:
So no matter what X is it gives a dicemal place. What if X = 1 Then nothing at all would happen. =P EGUY, I think its a good idea. Except for that little part where it completely won't work. =) Nice try though, EGUY; what you lack in technical know-how you make up for in imagination, which is good. =) |