Implementing the "Game generator" of AGS 2.72 :-D

Started by Monsieur OUXX, Tue 06/08/2019 16:31:55

Previous topic - Next topic

Monsieur OUXX

(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.
 


Monsieur OUXX

#2
Quote from: notarobotyet on Tue 06/08/2019 16:40:43
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".
 

Crimson Wizard

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

Quote from: Crimson Wizard on Tue 06/08/2019 17:44:48
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.
 

Crimson Wizard

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

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

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 ;)

Blondbraid

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

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.

TomatoesInTheHead

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

#11
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.

eri0o

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.

Crimson Wizard

#13
Quote from: eri0o on Tue 03/12/2019 22:23:57
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.

eri0o

#14
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)

SMF spam blocked by CleanTalk