Quote:
Original post by Edward Ropple
Find a way how not to keep the majority of stars (every one an alien empire has control of, every one a player has control of) in memory at any time. You'll shortly find that you'll be running low on available memory really quickly, even on fairly buff machines.
Let's say that, oh... NPC empires are not run. They're stagnant. Meaning that you don't need to update the worlds they control. You just need to have a list of planets (or maybe even stars, or maybe even sectors) they own. They don't compete with you, so you don't have to worry about balancing it. They just exist.
Let's say each sector/star/planet is given a number representing how advanced and productive it is. That's it, a simple 32 bit number. The strength of the empire is the sum of all it's parts. The player interacts with said empire, forming trade agreements, etc. and finds that NEVER does he have to deal with how advanced each of the individual parts are.
As far as keeping every colony the player owns in memory... That really isn't any more difficult than what a 4x game deals with. And I don't think I really need to. I just have to update them when it will affect something.
Let's say that after a player forms a colony, it's easy to calculate what will happen in the colony even 500 years down the road (game time of course). Then you just have to calculate a new state for the colony every few years, and replace the old colony database entry with the new one.
Quote:
Also, somehow I doubt your uber-l33t procedural generation routines will be able to come up with the alterations the player and AI empires/players have put onto planets they control, etc. If the game is on such a scale as you're talking about, this alone could run to tens of megabytes. Even with procedural generation, there's a hell of a lot of stuff you need to put on disk.
Okay, 1st: Hardly uber-elite. It's just pasted together using simple calculus and fudge factors. Check out this article and this one. I just combined the two ideas.
As for the actual algorithm for generation of stars, etc. I'm using this article as a launching point, modifying it slightly for my uses.
If that makes me uber-elite... WOOT! I finally made it. Was easier than I thought.
2nd: No, you can't store all the alterations for NPC empires. You just have to simulate them. That's the tradeoff for procedural generation. I think it's acceptable, since you're not competing with NPC empires anyway. In a 4x game it wouldn't be, but as I said, mine is not a 4x game.
3rd: Storing the alterations the player has formed is very possible. Colony control isn't as in-depth as in other games. Probably only have to store ~100 bytes a colony, which isn't monstrous at all. The game isn't real time, so I can spend 10 seconds updating all the colonies if I want, I imagine most people wouldn't mind too much.
4th: 10's of megabytes is nothing. Most modern computers have 256-500MB RAM, and then you don't even count virtual memory which windows handles automatically.
If you show me a computer where a 35 MB game is a problem, I'll show you a paperweight.
Anyway, I doubt that my game will use more than 2-3MB, excluding 3D models and textures of course. The point of the game is procedural generation, not storage. If that means there is some small fudging here and there, so be it.