2d space game

Miscellaneous Forums/Blitz Showcase/2d space game

In my game it all comes down to what the player will see or care about. I could have created persistent NPCs that fly from system to system but I didn't go that route. I created "realistic" amounts of NPC traffic when you entered a system and it got updated every so often with new traffic, some leaving, some entering, some killing each other.

They all had various tasks to get on with. When they entered the system (be it by spawning or when the system was loaded), they'd have a blank task list which got filled with various things. One example might be a pirate who, depending on his surroundings might patrol asteroid belts then - on the fly - attack a nearby trade ship. Others would be spawned on the outer parts of the system and travel to a random station, wait for a few minutes, undock and fly to another system. But when they got far enough away instead of being persistent, they would vanish.

You could create the same ship with the same variables by calling rndSeed(num) before you created the ship. Or just make the seed come from a unique identifier (eg: its name). There are plenty of games that use procedural techniques and it's a good way to manage your game. But there are times when it's not required. There's plenty about it around. Here's some info at Wiki: http://en.wikipedia.org/wiki/Procedural_generation

Have a look at my game, http://www.birdinsky.com