Difference between revisions of "Disk space quota"
Lestofante (talk | contribs) (Question about file size calculations) |
(java knows hte size) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
It can seems a stupid question but if i'm right i'm impressed how easily i can store more than 15 weigth for every bot in rumble(and much more!), giving at my gun a chance to learn specific weigth for every bot (i think the gun will be really slow to learn, due to automatics weigth finding, but actually is under development) | It can seems a stupid question but if i'm right i'm impressed how easily i can store more than 15 weigth for every bot in rumble(and much more!), giving at my gun a chance to learn specific weigth for every bot (i think the gun will be really slow to learn, due to automatics weigth finding, but actually is under development) | ||
--[[User:Lestofante|lestofante]] 15:20, 12 March 2009 (UTC) | --[[User:Lestofante|lestofante]] 15:20, 12 March 2009 (UTC) | ||
+ | |||
+ | If you know the length of a double, you actually don't need a char as a separator. Just read in doubles 64 bits at a time... it will save you disk space. You could probably use floats instead, which would be even better. An idea I had was putting the information into a long filename, so your actual filesize is 0 and doesn't contribute to the quota.--[[User:Skilgannon|Skilgannon]] 18:56, 12 March 2009 (UTC) | ||
+ | |||
+ | * Haha... I wouldn't trust the filename to store any more info than the name of the enemy bot the info is about... After all many systems have somewhat short limits on filename length, and spamming it with tons of files with 0 size yet long file names would be.... just plain rude. --[[User:Rednaxela|Rednaxela]] 19:16, 12 March 2009 (UTC) | ||
+ | |||
+ | * Hehehe, It sounds like a "good" idea, but I agree with [[Rednaxela]] about it's rudeness. About knowing the size of double, it isn't really necessary if you use the writeDouble and readDouble methods. They would write and read the appropriate number of bits. --[[User:Zyx|zyx]] 02:37, 13 March 2009 (UTC) |
Latest revision as of 03:37, 13 March 2009
Little question: space for saving to file double is 64bit, one char 16bit. If i want to save the weigth for my gun i can store it to file using 1 double(weigth) and 1 char(separator), using 80bit (8 byte). 8 byte for 1000 robot is 8000 byte, and 200kb is maximum file quota (204800 byte) So for every bot in rumble i can save 204800/8000 = 25 weigth, right? If i use float(32 bit) i will gain about double space right? It can seems a stupid question but if i'm right i'm impressed how easily i can store more than 15 weigth for every bot in rumble(and much more!), giving at my gun a chance to learn specific weigth for every bot (i think the gun will be really slow to learn, due to automatics weigth finding, but actually is under development) --lestofante 15:20, 12 March 2009 (UTC)
If you know the length of a double, you actually don't need a char as a separator. Just read in doubles 64 bits at a time... it will save you disk space. You could probably use floats instead, which would be even better. An idea I had was putting the information into a long filename, so your actual filesize is 0 and doesn't contribute to the quota.--Skilgannon 18:56, 12 March 2009 (UTC)
- Haha... I wouldn't trust the filename to store any more info than the name of the enemy bot the info is about... After all many systems have somewhat short limits on filename length, and spamming it with tons of files with 0 size yet long file names would be.... just plain rude. --Rednaxela 19:16, 12 March 2009 (UTC)