Procedurally Generated Coins – Explained

Share on Facebook0Email this to someoneShare on Google+0Share on LinkedIn0Tweet about this on Twitter0Share on TumblrShare on StumbleUpon0Pin on Pinterest0

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…

 

 

3 isles of coins randomly generated

3 isles of coins randomly generated

 

 

Share on Facebook0Email this to someoneShare on Google+0Share on LinkedIn0Tweet about this on Twitter0Share on TumblrShare on StumbleUpon0Pin on Pinterest0

2 thoughts on “Procedurally Generated Coins – Explained

  1. I really appreciate your help, it is very useful for me,you will get good grades! Ray ban brillen http://www.raybansuns.com/

  2. I just want to tell you that I’m beginner to blogging and site-building and certainly savored this page. Most likely I’m going to bookmark your site . You amazingly have awesome stories. Thank you for sharing with us your blog.

Leave a Reply