Home » , , » An overview of Procedural Content Generation Using C# in UNITY3D

An overview of Procedural Content Generation Using C# in UNITY3D

 Procedural content generation refers to the creation of game content automatically(or semi-automatically) through algorithmic means (Yannakakis and Togelius2015). It is a methodology for automatic generation of content of an entity, typically a game using algorithms or processes which can produce, due to their random nature, extensive variety of conceivable substance identified with the considered element. The keystone of this methodology is the concept of randomness: Using a few parameters, the application of PCG ensures the creation of a high number of possible contents of a game, all differing from each other.
The results from the application of PCG algorithms can be all kinds of elements affecting the gameplay: terrain, maps, layers, stories, dialogues, quests, characters, rules, dynamics, or weapons.The history of games shows that this mechanism can lead to success since the early 1980s, when the Rogue videogame opened the way for PCG. Rogue is generally credited with being the first “graphical” adventure game. Its most recognised contribution, and one that still stands out to this day, is that the adventure in Rogue was generated algorithmically. 
Every time you played, a new adventure was created. That is really, what made it so popular for several years in the early eighties. The vision of creating endless games attracted many developers, and this method was imitated numerous times over the years, for example, in the hit game series Diablo. The use of mass storage is another point in favor of the use of procedural content
 The C# code below demonstrates how random number generation works.

[public class HelloWorld : MonoBehaviour { public string[] hellos = new string[4] { "James", "John", "Josh", "Jordan"}; public Text myText; void Start () { Random.seed = (int)System.DateTime.Now.Ticks; int randomIndex = Random.Range (0, hellos.Length); myText.text = hellos[randomIndex]; }]
Yannakakis, G.N., Togelius, J. (2015). Experience-driven procedural content generation (extended
abstract). In: ACII, IEEE Computer Society 519–525


Post a Comment

Get Instant Updates

Subscribe to my Newsletter