ID:154158
 
Okay, my game isn't going to get anywhere until I decide what to do with colonies in it. I have no clue how they should work, well, I have some clue, but not enough to work with. Anyway, I'm looking for some ideas.

What I have so far is a star generator that will place anywhere from 10 to 1000 stars on the map, and give each star between 0 and 11 planets. Each planet has it's own resources; organic, crystal, mineral, oil, gas, and a slight chance that it will have relics of an ancient race. Each planet also contains basic information about itself (incomplete) such as its class (volcanic, terra, tundra, barren, toxic, etc.), its diameter, the number of astronomical units (AUs) it is from the star, and how strong the planetary gravity is. I'm also planning to add atmosphere and temperature information, once I figure out how to calculate them.

Each star has only two bits of information so far - # of planets and intensity. Intensity effects how warm the star is, so far off planets would be considered warmer near an intense star than they would be around a dim one.

Now, I want players to be able to colonize planets that are close to their ideals (such as humans could inhabit planets with temperatures between -100 and 150 degrees, with medium gravity).

The problem is, how does the player interact with the colony? What does the colony do? Personally I want each colony to be self-maintained, so that each colony has its own tech level, its own food stores, its own material stores, etc... But you could setup delivery routes from one planet to another so that you could feed humans on a planet that can't grow food, for example. I need some opinions on how buildings should work, how they could be done, and things like that. Anyone have any thoughts?

The limitations are that, since there can be a max of 12000 colonies in the game, I have to keep the use of lists and objects down to a minimum. Otherwise, I'll reach the list and object limits very quickly...
Foomer wrote:
The problem is, how does the player interact with the colony? What does the colony do? Personally I want each colony to be self-maintained, so that each colony has its own tech level, its own food stores, its own material stores, etc... But you could setup delivery routes from one planet to another so that you could feed humans on a planet that can't grow food, for example. I need some opinions on how buildings should work, how they could be done, and things like that. Anyone have any thoughts?

A few.
Food is a staple--you just can't get anywhere without it. Therefore, any colony that can't grow food on the planet's surface would have to grow it in enclosed gardens. This should be subsistence level or higher. A colony will always be interested in offworld foods, however. The uniqueness of what food they grow could be another value for you to work with.

For buildings: With the number of potential colonies in your game, I advise against the kind of micromanagement done in Outpost or Sim City. What you should do is set up about a dozen or so potential city layouts with simple rule sets on how they would be expanded to cover bigger colonies or different tech levels; in essence a city generator. City types will vary by tech level, planet type, and so on. Don't get too much into the particulars; say a city is roughly a certain size and population, and stick with that, changing it gradually over time. Building a city generator won't be easy, but I imagine it would be a lot of fun in many ways and could be used in other projects too.

The limitations are that, since there can be a max of 12000 colonies in the game, I have to keep the use of lists and objects down to a minimum. Otherwise, I'll reach the list and object limits very quickly...

Well, BYOND can't handle everything in memory at once; it can handle a small subset of these. What you're going to have to do is build some good file management to load and save planets and stars. (I would recommend you don't create a particular star, except perhaps by name, until it's first visited. Then create a few others in its immediate area, and save those.) Don't do a lot of small files; instead, make a file for each "cluster" of 100 or so stars in a region. I'd organize paths within the file like this:

stars
StarNumber
StarName/PlanetNumber
StarName/PlanetNumber/CityNumber

Each of these files is potentially quite large. The idea is, don't load too much from one at a time; just use what you need, like some of the basics about a star and the contents of a planet. For example, if I go to visit the star Wogeria, the game should load up its number of planets, statistics, local and near-local trade routes, and so on. Then I go to the 4th planet, which has 2 cities. The game loads up all the details of the planet, and generates the cities. When I leave, all changes to the planet are saved and it's unloaded (provided no one else is there). When I leave the star system, a similar process happens.

By doing this you can keep the memory demands low. If your game expands to the point where a huge number of players are using it, you'll need to spawn multiple servers and work with world.Export().

Lummox JR