Author Topic: Implementing the "Game generator" of AGS 2.72 :-D  (Read 1083 times)

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
(This is meant to be a funny thread in reference to a funny fictional feature of the late AGS 2.x)

So at the moment I'm really, really studying the underlying construction principles of point-n-click games. I mean I'm going beyond writing roadmaps with the number of rooms, the connections between rooms, the number of objects and that sort of standard planning.

I've extracted some very abstract core principles that end up being pretty much a bunch of lists. These are lists of entities types : types of puzzles, types of areas in a game with several locations, types of obstacles, etc.

I've reached the point where I'm thinking "If I had too much time on my hands I could create an adventure game generator". Of course I'm saying that as a joke, as the task would be HUGE, programming wise. But it's the first time that I'm thinking it could be done with a sufficient level of quality (the player wouldn't notice). With the help of those lists and metrics, the game could be randomized and generated by a computer, and still be fun -- just the same way a computer can already build a (good) randomized dungeon and looting system in an action-RPG, or just the same way some games have simple randomized quests, as in the old "desktop adventures" series from the 90's or many games today.

Imagine the face of the wannabe point-n'-click creator if he could actually create a full-length point-n-click game by just clicking a button! Then of course he/she would still need to apply a "skin" to it (well-written dialogs and nice graphics), but the underlying game would be there, would be entertaining, and would be solid (well-balanced in difficulty, clues-dropping, no dead ends, and all that).

Also from a more serious perspective, if I was making adventure games for a living I would seriously consider implementing that tool, for quality control of full-length adventure games. The tool could in turn produce the actual roadmaps (meant for developers and artists) like the ones that are normally hand-made by the project manager or the game designer. That would probably save one to two months of planning and design at the beginning of every new game.
« Last Edit: 06 Aug 2019, 16:36 by Monsieur OUXX »
 

Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #1 on: 06 Aug 2019, 16:40 »
Is that why you started this thread? So you could compile a huge database of puzzles to feed to your algorithm?  :-D

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #2 on: 06 Aug 2019, 16:55 »
Is that why you started this thread:-D

No it's the other way around : I started that thread, and then internally to our project I had several other similar epiphanies. After that I started putting two and two together. "Hm, a computer could have done all that".
« Last Edit: 06 Aug 2019, 16:57 by Monsieur OUXX »
 

Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #3 on: 06 Aug 2019, 17:44 »
Well, since there are games where computer generate worlds and history of the worlds, including character relations (see Dwarf Fortress), I don't see why full adventure game plot could be generated.

IMHO generating "meta data" would be the first step. By "meta data" I mean, an abstract description of a game, not connected to particular engine.

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #4 on: 07 Aug 2019, 07:58 »
Well, since there are games where computer generate worlds and history of the worlds, including character relations (see Dwarf Fortress), I don't see why full adventure game plot could be generated.

IMHO generating "meta data" would be the first step. By "meta data" I mean, an abstract description of a game, not connected to particular engine.

Yep that's how it would work. The difficulty with an adventure game is to generate the proper ratio of dialogs, locations, "locked" locations, going back-and-forth, and puzzles to unlock the story. Dwarf fortress puts together bits and pieces of story but it doesn't have to make sense, because it doesn't impact the gameplay. In an adventure game, the tool would be more like "do you want to generate a plot twist towards the end? YES/NO" "How many rooms do you want after the plot twist?" "How many rooms do you want re-used in two different parts fo the story?" etc.
 

Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #5 on: 07 Aug 2019, 17:40 »
I have a suggestion: think about a conveyor-like sequence of generators, each has a result of previous one on input and outputs its own part of work. This will make things easier for both designing and programming this system.

For example, the first generator creates a setup: main characters, their motives and goals, items of most importance, general description of locations (not actual rooms, but abstract explanation where story takes place).
Next generator will take this setup as an input and create a progression scheme, which tells what character should do in order to achieve the goal;
Next will take setup and progression scheme and create actual locations where progression steps take place, and so on.

Monsieur OUXX

  • Mittens Vassal
  • Cavefish
  • Mittens Half Initiate
    • I can help with proof reading
    • I can help with translating
    • I can help with voice acting
    • Monsieur OUXX worked on one or more games that won an AGS Award!
    •  
    • Monsieur OUXX worked on one or more games that was nominated for an AGS Award!
Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #6 on: 08 Aug 2019, 08:23 »
Hey I said I wouldn't make it. Are you crazy?  ;-D  (roll)

Apart from that, yes, that's how it should be made!
 

selmiak

  • ǝsıɔɹǝxǝ ʞɔǝu puɐ uıɐɹq
    • I can help with play testing
    • I can help with proof reading
    • I can help with translating
    • I can help with web design
    • selmiak worked on one or more games that won an AGS Award!
    •  
    • selmiak worked on one or more games that was nominated for an AGS Award!
Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #7 on: 14 Aug 2019, 20:54 »
oh noes, crimson did beat me to it. There are neural networks that write blogposts full of nothing that read a bit like a human would have written these, but actual value of content is low, but it is readable. These could also write stories for the puzzle flowchart and dependency generator. Just cleverly combine these. AIs can also compose music, but it can turn from harmonic into cacophonic pretty fast, that would be the same for a completely computer generated adventure game ;)

Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #8 on: 14 Aug 2019, 21:29 »
This reminds me of an interview with a game developer making a platform game I read once, he had managed to make a platform level generator that could create thousands of game levels, but the problem was that the levels it generated got boring very quickly because the engine always generated rather "safe" and predictable levels, and I think it'd be something to bear in mind for an Adventure game generator too. The crux would be to come up with a way to generate a game with enough flexibility for a human designer to insert variation and stave off predictability after it's been created...

Danvzare

  • The Man with No Name
    • I can help with AGS tutoring
    • I can help with proof reading
    • I can help with scripting
    • I can help with voice acting
    • Danvzare worked on one or more games that was nominated for an AGS Award!
Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #9 on: 19 Aug 2019, 13:14 »
Funnily enough, I've given this a ridiculous amount of thought ever since I first saw that funny fictional feature all those years ago.
I've thought about how you could even implement such a thing in AGS itself. How you could "generate" characters and locations, using a set of pre-made graphics.
How you could "generate" puzzles based on a set of pre-made puzzles, with possible "connections" to other puzzles. So the game can slot puzzles in depending on what puzzles its chosen, a bit like how you can connect up different parts to your computer depending on other parts (like your motherboard).
There could even be small variations in certain items, to allow different connections to be made.

And then I start thinking about how randomly-generated adventure games, could be implemented as a feature in a single adventure game, rather than broadly as an adventure game maker. An adventure game that you can play again straight after completing it, and it still be fun, because the game is slightly or perhaps entirely different.

Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #10 on: 01 Dec 2019, 12:28 »
I made a very simple story/puzzle generator once and used it for the game Tales of Otubania.
There were basically lists of possible locations, possible characters (e.g. occupations, creature types) and possible items (inventory items and objects in the room were in a single list iirc), also there are the usual verbs. Then a random chain of puzzles is generated, like "To win the game, you have to go to location A. To get to location A, you have to use item B with item C. To get item B, you have to talk to character D in location E." and so on.
This still needs a good amount of creative work to get a relatively coherent story and of course no graphics, programming and dialogue writing are done automatically, and (in contrast to what some review articles about the game said back then) the story does not change dynamically when you start over.

The story I implemented was a very silly one, but this could have been improved with small alterations in the generator, firstly by narrowing down the list to a specific setting, e.g. only medieval locations, items and creatures/occupations, secondly by having connections between them: item A can only be found in locations B or C, in location D you can have one or more of characters E, F and G and so on.

Danvzare

  • The Man with No Name
    • I can help with AGS tutoring
    • I can help with proof reading
    • I can help with scripting
    • I can help with voice acting
    • Danvzare worked on one or more games that was nominated for an AGS Award!
Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #11 on: 01 Dec 2019, 14:48 »
I was just about to make somewhat of a necropost in this thread, but it looks like someone beat me to the punch. I guess I'm not the only one who has been thinking about this topic recently.

The reason why I'm posting, is because I've found out someone has already done this.
Or at least, there's a paper describing a program that does this: https://dspace.mit.edu/bitstream/handle/1721.1/100267/Vara_Procedural%20generation.pdf
Adventure Game Studio is even mentioned at the end.
« Last Edit: 01 Dec 2019, 14:51 by Danvzare »

eri0o

Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #12 on: 03 Dec 2019, 22:23 »
I tried to make a name generator based on the code here, in AGS Script, but I got stuck. Here is the code for namegen.asc and namegen.ash, someone  please finish this  (roll). I already initialized the boring AGS arrays with content, so this part is done.

Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #13 on: 03 Dec 2019, 22:39 »
I tried to make a name generator based on the code here, in AGS Script, but I got stuck. Here is the code for namegen.asc and namegen.ash, someone  please finish this  (roll). I already initialized the boring AGS arrays with content, so this part is done.

Uh-oh, why do you put the data in ags script though? Might be much easier to populate a text file and load it up into array.
« Last Edit: 03 Dec 2019, 22:41 by Crimson Wizard »

eri0o

Re: Implementing the "Game generator" of AGS 2.72 :-D
« Reply #14 on: 03 Dec 2019, 22:53 »
It's not a generic name generator, it's based on an existing name generator that existed in some game at some point, you can look other implementations and see they are all hardcoded like this.   :P (also I sometimes do this batch initialization of AGS array on Python, JS or libreoffice calc , because it's easier than reading a file xD)
« Last Edit: 03 Dec 2019, 22:55 by eri0o »