18
\$\begingroup\$

I'm reading the online Procedural Content Generation book and on chapter 1, page 2 there's one example of what PCG is and another of what PCG is not and I can't tell them apart.

This is PCG according to them:

game engine middleware that rapidly populates a game world with vegetation

This is NOT PCG according to them:

a game engine capable of integrating automatically generated vegetation

Also on page 1 they explicitly said they do not consider a game engine PCG

A key term here is “content”. In our definition, content is most of what is contained in a game: levels, maps, game rules, textures, stories, items, quests, music, weapons, vehicles, characters, etc. The game engine itself is not considered to be content in our definition.

My guess is the PCG example is a code in a game (or it could be a code that adapts to any game) that recognizes the game map and populates it with vegetation according to it. And the not PCG example for me would be like an option available from the game engine were the developer can add the vegetation offline via the user interface.

The last one is a very very wild guess from me, I'm pretty sure I'm wrong cause at first glance they both sound like PCG. Please help me differentiate them.

\$\endgroup\$
  • 9
    \$\begingroup\$ Compare two men: A walks into a room, looks at it, builds furniture based on the room, and puts the furniture in the room. B does the same, but he goes to IKEA (people who have built the furniture) to get furniture to put in the room. Would you say that both A and B are creating furniture? That's the difference that they're trying to point at. Unless you're creating the furniture from scratch, you're not actually creating furniture, you're just using existing furniture in new ways. \$\endgroup\$ – Flater Feb 21 '18 at 16:47
27
\$\begingroup\$

By way of analogy

A circuit does not generate power. A light bulb does not generate power. A battery does not generate power. None of the things which use or store generated power, are power generators.

A gasoline-driven generator is a power generator. A solar panel setup is a power generator. They can be expected to spontaneously generate when they are kicked off. Other things can use that power they generate: fridges and TVs and PCs and heaters and light bulbs.

Likewise, any code or program that actually generates content itself at runtime is PCG. The rest are just users of that procedurally-generated content (PGC). Now,

Procedural Content Generation

is not the same as

Procedurally-Generated Content

PGC is the resultant artifact of a process (program) which engages in PCG.

PCG is developed (programmed) to a point where it can autonomously produce content to some or other specification, but in (typically) countless variations; PGC is generated thereby as one single variation of the otherwise limitless possible content spaces within that broader algorithmic specification. PGC's are finite and static once generated. PCGs deal with infinity (or near enough).

Addressing specifics

"Procedural Content Generation" refers to code / applications which generate content.

Any game can be considered a PCG game if, at runtime it dynamically generates new content via part of its instruction set.

If you (or your engine) use(s) some other program code that generates content, then include that content as part of your game at compile / build time, then your game (and it's code) is NOT PCG. Hence:

a game engine capable of integrating automatically generated vegetation

...is not PCG, since that engine itself does not produce new content at runtime, it simply uses generated content from elsewhere, that has been manually included by artists, designer or devs.

recognizes the game map

PCG has nothing to do with recognition. It has to do with doing the active work of creating content. Generally PCG applications produce their own format of data that they can already understand and work with. They do not typically read in outside sources, although when they do, that is just plain old program logic... not PCG as such. PCG is all about generation. Hence PCG and not PCR :)

Historical perspectives

What we consider "content" in this context generally covers those things which, in the past, humans have had to produce by themselves. For example in the '70s and '80s, pretty much every game (with the exception of a very special few) had to have its art, its storyline, its music, its character and planet names, and suchlike, produced by a human being. That was the polar opposite of PCG.

PCG began when game programmers realised that instead of the rigmarole of hiring artists, musicians, writers etc. - and then still having to integrate their work with the code, or worse yet, doing all of that work themselves as well as coding - they could instead write programs to generate all that stuff for them. Those efforts were some of the first truly PCG functions, modules, and programs. A perfect example is the original XCom / UFO, where the game's code generates a completely unique level for you before combat. Earlier still (1979) was Temple of Apshai.

Elite was a different case: some of its content was generated when the game was under development; not only was that code written by the very same authors, but also that pre-generated content was typically used at runtime of elite.exe (i.e. when you the player ran the game) by further generators which were part of the game's code, creating the world you played in.

A newer example is Minecraft (and other games inspired by it) where the world literally generates around you as you walk toward the horizon, thanks in large part to modern computing power. Compare this to Rogue or Moria played on a PC-XT in the 1980s, for which you might have to sit sometime waiting for the level to generate! (depending on your chosen game settings).

Not all PCG is historically rooted in the games industry. For example, there are those who write fiction generators. For example, Ken Perlin in the field of graphics and computational geometry created the Perlin Noise algorithm, for which he was later given an academy award. For example, the musician Brian Eno has for a long time engaged in procedural generation of musical scores. And as another example, non-digital boardgames like HeroQuest/Warhammer Quest long ago invented procedural dynamics for creating a different gameboard on each play.

\$\endgroup\$
  • 6
    \$\begingroup\$ A very minor technical exception - there was a proof of concept research project/game in which the game itself was procedurally generated. That is, the goals, rules and to some extent, the representation were all dynamically generated at run time. It blurs the line between content & engine somewhat, but the litmus test of "does it generate" still holds even there. Excellent distillation. \$\endgroup\$ – Pikalek Feb 21 '18 at 15:25
  • 3
    \$\begingroup\$ @Pikalek I agree fully with that line of thinking. We can take it as far as Lisp does - that there ultimately is no distinction between instructions and data. Didn't want to over-complicate things in the answer though. Thanks for commenting. \$\endgroup\$ – Engineer Feb 21 '18 at 15:26
  • 2
    \$\begingroup\$ @Adocad: I think you missed a minor detail in the answer: "If you (or your engine) uses some other program code that generates content, and then include that content as part of your game at compile / build time, your game (and it's code) is NOT PCG" If you had included the program in your game, instead of the content that was generated by the program, and your game would trigger the program when it needed to (locally, on a player's computer), then it would indeed be offline PCG. But that is not the case when you simply include a result from a PCG generation (which is now static). \$\endgroup\$ – Flater Feb 21 '18 at 16:51
  • 2
    \$\begingroup\$ @AC: I think the distinction is clearer when labeling it as either procedurally generated content or procedural content generation. \$\endgroup\$ – Flater Feb 21 '18 at 17:06
  • 4
    \$\begingroup\$ @Flater Thanks, that's a better way of putting it -- procedurally generated content can be generated offline and/or at runtime, but procedural content generation is explicitly runtime. (Note that a tool which generates content which will later be compiled in is doing PCG, however after that content has been pre-generated and compiled in, the game that uses that content is NOT doing PCG) \$\endgroup\$ – A C Feb 21 '18 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.