.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old May 9th, 2001, 01:14 AM

KiloOhm KiloOhm is offline
Corporal
 
Join Date: Dec 2000
Posts: 81
Thanks: 0
Thanked 0 Times in 0 Posts
KiloOhm is on a distinguished road
Default Re: Could someone explain:

I don't get your math, your saying for 8 bit numbers, it's 280KB but for 16bit numbers it's 70MB? Your only doubling the # of bits required so You should be 560KB not 70MB...right?

quote:
Originally posted by LemmyM:
i think it's about mem usage

let's do a little math :

suppose you have 255 systems

each system can have a name, i don't know the max. characters for a name, but i haven't seen them larger than 32, that is 32 bytes for the name

on average a system has about 10 planets, some have no planets, and some have as much as 15

a planet has three resource values, mineral, organics and radioactives, i haven't seen those above 255%, so one byte per resource would be enough, that is 3 bytes.

a planet also has a atmosphere and type, there are three type, Gas, Rock and Ice
and 5 (?) atmospheres, Oxygen, Hydrogen, Methane, Carbon Dioxide and None. thos could be fitted in 1 byte

then there is the population 4 bytes (common int)

population growth 1 byte

the buildings build on a planet, they could be references to an array in which all the buildings are stored, if so, there is a maximum of 25 (?) buildings on a huge world, that would mean 25 indices, or 25 integers, that is 100 bytes,
a sphereworld can hold 200 buildings, but that is an exception

then there are the ships and units and such but i don't have time include them right now

so for just a galaxy with 255 systems with on average 10 planets per system, you would use

287232 bytes = 280 kb

that ain't much, but suppose you use a 16 bit number for the systems instead of an 8 bit number, then it would be

73531392 bytes = about 70 mb

maybe i'll include ships and units later, or someone else could do it..

[This message has been edited by LemmyM (edited 08 May 2001).]





------------------
Regards,
KiloOhm
__________________
Regards,
KiloOhm
Reply With Quote
 

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 01:53 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.