![]() |
Question About Number of Planets
Hi
Can some one explain to me why we can only use upto 255 planets per quadrant. I love this game to bits its just so good, but i like Gigantic maps to play with and was just wondering two things. How many can u have? And if only 255 Y???? Drew PS modder wanabes plus seasoned modders should check this out. http://www.cdmag.com/articles/032/11...eempir-04.html |
Re: Question About Number of Planets
It's not 255 planets but 255 sytems per quadrant as maximum.
This is hard coded by MM probably because otherwise the game would need higher hardware requirements as it does now. |
Re: Question About Number of Planets
It's probably got something to do with the way the data is stored is my guess since 256 is a power of 2. Although if this were some sort of 256 slot array, I'd actually expect there to be 256 not 255 systems, I don't know maybe the first slot is some kinda of header.
|
Re: Question About Number of Planets
2^8 = 256
|
Re: Question About Number of Planets
It's probably just an unsigned char -- 8 bits, with the possible range of 0-255. I suppose Aaron *could* have written it so that 0 was interpreted as 1, 255 as 256 (casting to a larger type), and so forth... but pretending that 0 means 1 is a very good way to lose sanity tracking down subtle bugs...
------------------ -- The thing that goes bump in the night |
Re: Question About Number of Planets
Yeah, array indices in C drive me nuts. That's why I love Fortran. Arrays start at 1 by default, like they ought to. But if you want, you can change the index to anything you want -- even have it go backwards. Beats the pants off C and C++. (Fortran95 also has pointers and structures and overloading, if you want them. Plus many commands will work on entire arrays at once. It's a beautiful language.)
|
Re: Question About Number of Planets
It probably is 255 'cause you can't have Zero systems, can you? It's like using a 0 based array instead of a 1 based array (for any programmer types). Just a guess but a possibility......
|
All times are GMT -4. The time now is 09:43 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.