Procedural Generation
I've noticed that procedural generation is being mentioned in people's posts much more than it was last Pyweek. To those that have mentioned it, why is it on so many people's minds?(log in to comment)
Comments
It also helps as a creator to not have foreknowledge of what exactly a playthrough of the game will be like. With traditional methods, making the game can be fun, but playing a game you created is pretty awful. With procedural stuff it can be almost as exciting for the dev as for another player.
I think the best solution would be that the game engine it's the game itself. For example: Monopoly; once you have the game engine -the board, the rules, etc- the game is done... the dice and players' decisions it's the changing element over the time. But that means that you NEED a very good game idea.
Instead of having a very good game idea, I'll try to get an average idea with some procedural generated levels ;)
Thanks for clearing it up for me!
Possibly a hybrid approach might be fruitful -- use a randomly-generated level as a starting point, and then make manual adjustments to it.
on the other hand it doesnt confer a whole lot of benefits when it comes to actually making your game fun or interesting... except maybe to other programmers. it can reduce your file size... especially procedurally generated music... but a few megabytes is no big deal these days. its essential if you want a practically infinite world... but most games dont need this. the benefit if your game world is moderate in size is questionable.
but like i said... i think its elegant. actually i want to go a step further. the real holy grail should be that your engine is nothing but a physics simulator. it generates and simulates an entire universe and automatically populates it with creatures and objects. all you need to do is tell it a point in time and space where the game will begin and specify an end condition. now wouldnt that be awesome
ps. sorry about the lack of punctuation. im on my android phone and this text input box is badly broken on this browser....
You're kind of almost descibing Minecraft there. :-)
This can work well in a sandbox-style game where it's entirely up to the player to make something interesting out of the raw material provided. Probably not so good if the player expects to be provided with ready-made challenges and surprises.
There's an analogous debate that recurs every so often in the interactive fiction community, where some people believe the holy grail would be some kind of automatic narrative generator. But so far all attempts to produce such a thing have more or less been failures. Creating a story that humans find engaging appears to be an AI-complete problem.
Whereas for procedural generation, you are almost always trying to make something that fits an existing pattern, something that DOES look recognizable. When generating a mountain, you don't try hard to make it NOT look like a mountain, you try very hard to make it look exactly like a mountain. Maybe not 100% the same in every detail as this other mountain, put pretty close. There is similar structure in stories, but not the kind that is easily made into a function, and part of the fun in writing is knowing when to break out of the structure.
but yes minecraft is a great example of how far you can get by relying on a few simple procedural rules to generate most of the gameplay. an older example would be simcity. but i think that even if you want a game with a story and progression it may be possible with procedural generation. i agree with saluk it probably wouldnt be good enough for interactive fiction... but maybe you could write a metroid or starfox with a procedural story.
Starfox, for example, could simulate a war, with the outcomes of each battle having an effect on the overall scope of the war and the potential success by your side against andross. Other shooters I think have taken this approach, though I'm not sure how far they took it.
I guess a game like civilization is probably the best story generator I've seen.
It's harder to pull off in other types of games though. Metroid for example thrives on how well crafter the levels are with regard to upgrades. I mean the story barely matters at all, but what upgrade you get and when, and when you fight specific enemies, matters a lot. I think you could get close with a generator. For another contest I made a zelda style generator, with mountains needing climbing gear, rivers needing rafts, etc. But at best it just feelt like a potentially good zelda setup which has had all the parts jumbled up.
Look at yoda stories for a good example of that idea :)
Ultimately I think the answer lies in more internally consistent and function gameworlds where gameplay and story are literally the same thing.
An interesting facet of online games is that as a developer you have access to the behaviour of many human players. So maybe you could generate believable NPC interaction or plot development in one world from the human interactions in another.
Maybe it would be possible to set up some kind of 'human entropy' server based on, say a Jabber MUC. The interactions between people in a chat room who conform to certain personas could be used to prompt 'autonomous' activity by a NPC in a game world.
For example, Transport Tycoon had procedural worlds with procedural place names but all of the places it generates are soulless. You don't think what it might be to live in "Micheldon" versus "Tambourne" because apart from the layout, they seem identical except perhaps in wealth. Procedural generation just works for Transport Tycoon, enough to give you challenges in moving things around, but those challenges are pretty generic. There are not that many news stories to indicate why prices are fluctutating; there's not much to indicate why one region wants lots of one type of goods, and another region doesn't, or why this is produced here and that is produced there, and so on. As long as the player doesn't think to ask those kinds of questions, you're OK.
On the procedural story idea, there could be a large repository of story elements and the game randomly chooses how they fit together. Then the developers could add more story elements to the game, but the story would still be procedurally generated.
Another question: is procedurally generating a story similar to placing random dots in a game of Conway's Game Of Life?
You *can* fake anything with a computer, as long as you tell it exactly what to do.
I"m just not sure if PCG is right for PyWeek. PyWeek doesn't have time to justify a really good PCG. You can write a story-telling generator in 3 days, or write a story in 1.
I gave a lightning talk about this last year at EuroPython:
https://blip.tv/europythonvideos/lt-martijn_faassen-_how_to_fail_at_pyweek-3999788
By no means let that discourage anyone from experimenting with stuff like this; it'll be a lot of fun and quite educational (I certainly had a *lot* of fun with those projects), but you may run into the same kind of trouble I did and produce no actual game. :)
@fassen: very interesting (and funny), it's a pity you didn't have more time to properly finish the talk.
Are the slides available?
Thanks for sharing!
Are the slides available?
Thanks for sharing!
I've dumped my slides online here:
http://startifact.com/pyweekfail/pyweekfail.html
Akake on 2011/09/09 21:37:
For me, it's a good source of content considering my games' simple requirements. Because I've done it a few times before, I can probably manage it for my stuff, so it'll hopefully go well for me. I'm not sure about others here, though.