Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Procedural Content Generation for Unity Game Development

You're reading from   Procedural Content Generation for Unity Game Development Harness the power of procedural content generation to design unique games with Unity

Arrow left icon
Product type Paperback
Published in Jan 2016
Publisher
ISBN-13 9781785287473
Length 260 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ryan Watkins Ryan Watkins
Author Profile Icon Ryan Watkins
Ryan Watkins
Arrow right icon
View More author details
Toc

Challenge

As an added challenge, you can turn this into a die simulator. Try on your own to have the script display a random number from 1-6. You can, instead of displaying text, display an image of a die face. Also, see if you can display the image and store the random number corresponding to the die face for reference.

You can also try changing the seed to a number of your choice. If you play the scene with a constant number, you will get the same result every time. Try different numbers for different results. This is the benefit of the seed value; even though we are introducing a bit of randomness to our game, we have a way to control it. We will explore the seed value further in a later chapter.

You have been reading a chapter from
Procedural Content Generation for Unity Game Development
Published in: Jan 2016
Publisher:
ISBN-13: 9781785287473
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime