O'Reilly logo

Chris Crawford on Game Design by Chris Crawford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Designing the World

My first task was to create a world. I had already decided that, like Empire, my game would create its own custom world for each playing. I anticipated that this could create a nasty problem. My world-creation algorithms would be quite complex and could conceivably create nonsensical worlds. In such cases, I would need to re-create the nonsensical world and track down the programming bug that led to the mistake. Yet, if the algorithms relied on random numbers to create the world, then I would have no way to re-create the world. I solved the problem by asking the user to provide a name for the world; this name became the seed for the random number generator, guaranteeing repeatable results should they be required.

LESSON 66 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required