.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

Reply
 
Thread Tools Display Modes
  #1  
Old May 9th, 2001, 01:30 AM

jimbob55 jimbob55 is offline
Corporal
 
Join Date: Jan 2001
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
jimbob55 is on a distinguished road
Default Re: Could someone explain:

Each entry has a size of one system (planets, populations, values etc.)
so the size of a 16 bit system list would be a lot bigger than twice. It's 2 to the power of 8 times larger (in fact 256 squared).

It would be possible to scale up by factors of 2 but this would require a fair bit of coding just to check how big the system list is every time it parses it.

Bearing in mind I get a noticable pause when looking at my shiplist when there's more that 150 or so entries, a larger galaxy could bring the program to a grinding halt.

And yet again while i'm typing, someone else has already answered.

[This message has been edited by jimbob55 (edited 08 May 2001).]
Reply With Quote
  #2  
Old May 8th, 2001, 04:03 PM

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 understand that but I don't see how that applies to the argument. Your saying 255 systems takes up X amount of space if you use 8 bit numbers, then you say 16 bit numbers takes up much more than 2X the space.

Your argument hold true if your talking about the number of POSSIBLE combinations, not what the actual memory requirement is. The memory requirement is linear with byte size if you keep the same number of variables for the system, the possible combinations is exponential with byte size since you have twice the number of bits, you have as you said, a lot more combinations.

But we're not talking about combinations, we're talking about straight storage, right? Or did I miss the point entirely?

quote:
Originally posted by LemmyM:

if you have 8 bits then you have 2 to the 8th possible numbers, that is 256
if you have 16 bits, you have 2 to the 16th possible numbers, that is 65535

so it's not just twice as much, the difference in bits is 16 - 8 = 8, so it is 2 to the 8th times as much

and 70 mb is of course the maximum, if you actually have 65536 systems in a map

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



__________________
Regards,
KiloOhm
Reply With Quote
  #3  
Old May 8th, 2001, 04:07 PM
Taqwus's Avatar

Taqwus Taqwus is offline
Major General
 
Join Date: Aug 2000
Location: Mountain View, CA
Posts: 2,162
Thanks: 2
Thanked 4 Times in 4 Posts
Taqwus is on a distinguished road
Default Re: Could someone explain:

Don't forget the storms and other features, as well. There are 169 sectors per system, so that's a lot of room for people to create stuff.

I'd be surprised if he used fixed-length records that recorded everything in an entire system. Variable-length using lists would seem more efficient; for instance, each system could have linked lists of planets, storms, et al.

Pathing could be a concern. If every warp point is a vertex, and edges represent both intra-system travel and inter-system travel, and there are up to 10 warp points per system, 655,360 vertices (65k systems) might be a bit much. That's especially true if there are any O(|V|^{2}) or O(|V|^{3}) algorithms in use.


------------------
-- The thing that goes bump in the night
__________________
Are we insane yet? Are we insane yet? Aiiieeeeee...
Reply With Quote
  #4  
Old May 8th, 2001, 04:17 PM
Taqwus's Avatar

Taqwus Taqwus is offline
Major General
 
Join Date: Aug 2000
Location: Mountain View, CA
Posts: 2,162
Thanks: 2
Thanked 4 Times in 4 Posts
Taqwus is on a distinguished road
Default Re: Could someone explain:

Kilo-Ohm:

You're correct. If Aaron were to use 16-bit numbers, he could arbitrarily set a limit of, say, 512 systems, or in fact whatever number he chooses between 0 and 65,535 inclusive. Of course, if he uses any quadratic-order storage (such as an adjacency matrix, but I don't see why he would when the connectivity is limited to 10 per), doubling the system limit still means multipling storage by four. *shrug*

I'd hate to go through the colonies of 100+ captured systems looking for facilities to convert to monoliths, or to add computers, or so forth. Aigh. Please, not without adding text input/output so I can write scripts to input commands. ;-)

------------------
-- The thing that goes bump in the night
__________________
Are we insane yet? Are we insane yet? Aiiieeeeee...
Reply With Quote
  #5  
Old May 8th, 2001, 04:19 PM
geoschmo's Avatar

geoschmo geoschmo is offline
National Security Advisor
 
Join Date: Jan 2001
Location: Ohio
Posts: 8,450
Thanks: 0
Thanked 4 Times in 1 Post
geoschmo is on a distinguished road
Default Re: Could someone explain:

Kilo,

If we assume that Lenny's first number (280Kb)is correct then the second number (70Mb) is also correct.

I'll admit it blew me away at first, but think of it like this. If 280Kb is correct for a galaxy with 255 systems, then simple division gives us a little more than 1Kb per system on average. If we then go to an 18-bit number that allows 65,000 systems then simple multiplication of a 1Kb per system times 65k systems gives us 65Mb of memory.

What I would like to know is, in my ignorance of computer programming, are if an 8-bit number is too small, is 16-bit our next option? Is not there some number in between we could use? If not I am sure he could use a 16-bit number, and then hard code some logical limit to the number of systems, say 1000 or somethhing like that that would keep the mem usage to a reasonable level.

Geo
__________________
I used to be somebody but now I am somebody else
Who I'll be tomorrow is anybody's guess
Reply With Quote
  #6  
Old May 8th, 2001, 04:40 PM

Lemmy Lemmy is offline
Second Lieutenant
 
Join Date: Mar 2001
Location: Netherlands
Posts: 479
Thanks: 0
Thanked 0 Times in 0 Posts
Lemmy is on a distinguished road
Default Re: Could someone explain:

quote:
Originally posted by KiloOhm:

But we're not talking about combinations, we're talking about straight storage, right? Or did I miss the point entirely?



in that i case i did mean combinations..
ok, i was a little vague when i posted this

quote:

...but suppose you use a 16 bit number for the systems instead of an 8 bit number...



what i meant was :
suppose you use a 16 bit number to define the number of systems instead of an 8 bit number...
you would then get 65536 systems max.


/ offtopic
quote:
Posted by geoschmo:
If we assume that Lenny's first number



Lenny ??

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

[This message has been edited by LemmyM (edited 08 May 2001).]
__________________
[Boo!]
Reply With Quote
  #7  
Old May 8th, 2001, 05:11 PM
zen.'s Avatar

zen. zen. is offline
Sergeant
 
Join Date: Jan 2001
Location: Northern Virginia, United States
Posts: 203
Thanks: 0
Thanked 0 Times in 0 Posts
zen. is on a distinguished road
Default Re: Could someone explain:

*zen reels from mathematical gymnastics*

I, um, like klausD's quadrant-jumping idea.

I wonder how hard it would be to code something like that?

zen
Reply With Quote
Reply

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 12:57 AM.


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