In Crash3D all coins are procedurally generated while you play.
What does this mean?
“Procedural generation is a widely used term in the production of media. It refers to content generated algorithmically rather than manually. Often, this means creating content on the fly rather than prior to distribution. This is often related to computer graphics applications and video game level design.” – Wikipedia
So in a nutshell we are designing the game to generate coins on random positions. Each time you play Crash 3D, the coins will be on different places on the map.
How did we do this?
Each level has “Coin Spawn Boxes”, as we call them, placed along its isles. They are invisible to the player and used only to determine where coins may or may not spawn. Then a cleverly coded script uses a combination of 7 shapes of coin layouts to fill the box using the dimensions to calculate spacing and how many coins can be generated in the area. A random layout is selected and places the coins in the Game World until the maximum allowed coins for the box has been reached. – easy right? 🙂
Check out the screenshots we took to demonstrate the generation. Note that we are using cubes only for presentation purposes…