An introduction to graph rewriting for procedural content generation

  Рет қаралды 20,201

The Shaggy Dev

The Shaggy Dev

Күн бұрын

Graph rewriting is a great way to generate interesting procedural content for games, suitable for generating both grid-based and non-grid-based maps, quest structures, and more. In this introductory video, we'll look at what a graph is, how graph rewriting can be used to generate content for games, and what some common techniques and usages look like.
Intro: 00:00
What is a graph?: 00:42
Graph rewriting: 02:30
Generating a graph: 04:09
Common uses: 05:26
Text version: shaggydev.com/2022/11/20/grap...
And here's a few links you might want to check out regarding implementation:
Metazelda Algorithm: web.archive.org/web/202106281...
Graph Grammar based Procedural Generation for a Roguelike: • Graph Grammar based Pr...
Unexplored's generation method: www.aiandgames.com/2021/01/28...

Пікірлер: 36
@NateyC214
@NateyC214 Жыл бұрын
Simple explanations and pleasing diagrams, who could ask for more?
@Microphunktv-jb3kj
@Microphunktv-jb3kj 4 ай бұрын
7:20 , what game is this ?
@Kazner0h
@Kazner0h 3 ай бұрын
How could I *not* subscribe with such wonderful visuals and editing? Great video
@haydenap
@haydenap Жыл бұрын
Always look forward to your videos. This has been really interesting, thanks for including extra links.
@_gamma.
@_gamma. Жыл бұрын
Great overview! 👏
@nickvatanshenas9251
@nickvatanshenas9251 Жыл бұрын
Great editing and explanations
@pixtrick
@pixtrick 3 ай бұрын
That was exactly what i was looking for. On top of that, that was brilliantly explained. Thanks mate
@joelgomes1994
@joelgomes1994 Жыл бұрын
Your channel is pure gold, nice job!
@TheShaggyDev
@TheShaggyDev Жыл бұрын
Glad you enjoy it!
@realMenta
@realMenta Жыл бұрын
Thanks
@pavlovsdoguk
@pavlovsdoguk Жыл бұрын
your stuff on Graph rewriting is awesome. Subbing for this content.
@TheShaggyDev
@TheShaggyDev Жыл бұрын
Thanks! If there's any other proc-gen topics that you're interested in, let me know! I keep a big list of topics and pull from it when I'm deciding what content to cover.
@pavlovsdoguk
@pavlovsdoguk Жыл бұрын
@@TheShaggyDev Right now I'm working on a game that uses graph rewriting, but I've been very interested in Wave Function Collapse and genetic algorithms
@Sean-gx1sf
@Sean-gx1sf Жыл бұрын
Damn, first image is the FTL map; you know your stuff
@TheShaggyDev
@TheShaggyDev Жыл бұрын
FTL is one of my favorites! Gotta include it, at least visually, for anything related to proc gen.
@pokelizardo2298
@pokelizardo2298 Жыл бұрын
Great explination, a nice introdiction to graph rewriting. What would you say are biggest pros and cons of graph rewriting for pcg compared to other techniques?
@TheShaggyDev
@TheShaggyDev Жыл бұрын
Glad you liked it! Biggest pro for me is the flexibility it offers, since you can control the generation as tightly as you want and can generate anything from quests to maps to building structures (which I came across but didn't cover in this video). As opposed to generation techniques that are just for grid-based maps or just for X, you could really dive deep into this technique and reuse it in a lot of ways. Biggest con imo is just the complexity involved. A lot of people aren't too familiar with graphs or don't work with them very often, and making good procedural content is hard enough without also having to deal with an unfamiliar data structure. You'd also probably need some custom tooling to make it easy to generate a large number of interesting replacements and rules to use.
@pokelizardo2298
@pokelizardo2298 Жыл бұрын
@@TheShaggyDev thanks a lot. I am currently working on my bachelor thesis on the usage of graph grammars and graph rewriting and both this video and your video about generative grammars were a godsend. After drowning in research papers it was nice to have a concise and understandable video with all the necessary information. Keep up the good work.
@TheShaggyDev
@TheShaggyDev Жыл бұрын
@@pokelizardo2298 That's awesome to hear, thank you! And yeah, I had to read a fair number of papers for this one as well, but I guess I have to choice to skip those that are too boring 😅
@_mickmccarthy
@_mickmccarthy Жыл бұрын
Nice! I spent quite some time running through Joris Dormans' papers on graph grammars, could've used these videos around 5 years ago! ;) Keep up the awesome work! Not sure if you've come across it before, but there's a great Zelda dungeon generator project based off his work created by someone called Beck Lavender. Definitely worth checking out if you haven't already. P.S. Haven't yet watched the whole video (but did see Unexplored get a mention!), so apologies if it's already covered!
@TheShaggyDev
@TheShaggyDev Жыл бұрын
Oh cool! I had missed this one somehow, thinking Metazelda was the only major Zelda algorithm. Gonna read into it more!
@deeri638
@deeri638 10 ай бұрын
How would you store a graph in Godot? Its the multi paths that Im not sure about, a simple tree is just children, but when a node can have multiple connections how would you store that
@TheShaggyDev
@TheShaggyDev 10 ай бұрын
There's a proposal open to add graphs to Godot (github.com/godotengine/godot-proposals/issues/3848), but otherwise you'd need to make the structure yourself. Khan Academy (and other places) has some discussion on what that might look like: www.khanacademy.org/computing/computer-science/algorithms/graph-representation/a/representing-graphs
@deeri638
@deeri638 10 ай бұрын
@@TheShaggyDev thanks, Ill take a look at the khan academy link. Saw that proposal and was looking at if A* would work, still wrapping my head around how to position everything
@Aleamanic
@Aleamanic 3 ай бұрын
what is that game at 0:39 in the video?
@TheShaggyDev
@TheShaggyDev 3 ай бұрын
Tile Cities!
@SpudMackenzie
@SpudMackenzie Жыл бұрын
Heads up, the metazelda link in the description appears to have died.
@TheShaggyDev
@TheShaggyDev Жыл бұрын
Thanks for letting me know! Replaced it with a Wayback Machine link.
@McHumaty
@McHumaty Жыл бұрын
7:26 name of this game?
@TheShaggyDev
@TheShaggyDev Жыл бұрын
Rogue Fable III !
@user-rt6zg3wn8q
@user-rt6zg3wn8q 11 ай бұрын
2:30 what is the name of this game??
@TheShaggyDev
@TheShaggyDev 11 ай бұрын
Curse of the Dead Gods. Decent roguelite
@Nesetalis
@Nesetalis 9 ай бұрын
This video feels like the underpants gnomes... "first I have some nodes, then replace nodes by color and connections." "???" level design!" What is the aim of these replacements? Now that you have a random smattering of colored nodes, what are you doing with those nodes to generate rooms? Are edges corridors? Doors? Are hallways a node? And not once do you mention how you might program something. What is the underlying data type, how is it structured, how is memory allocated? What is the processing and memory cost of generating one of these graphs? Implementation detail, even as an example would be nice.
@G69G71
@G69G71 Жыл бұрын
hi, do you have discord?
@TheShaggyDev
@TheShaggyDev Жыл бұрын
Afraid not at this time, at least for Shaggy Dev related stuff. I may look into setting up a server at some point, though...
@G69G71
@G69G71 Жыл бұрын
@@TheShaggyDevok, thx anyways
An introduction to procedural lock and key dungeon generation
11:41
The Shaggy Dev
Рет қаралды 16 М.
Generative grammars as a form of procedural content generation
7:50
The Shaggy Dev
Рет қаралды 10 М.
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 3,2 МЛН
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 38 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,7 МЛН
Procedural Modeling Using Graph Grammars
20:35
Paul Merrell Research
Рет қаралды 9 М.
I rewrote my dungeon generator!
4:27
UnitOfTime
Рет қаралды 154 М.
A CHASM of Mediocrity - Procedurally Generated Metroidvanias
20:34
ingeniousclown Gaming
Рет қаралды 525 М.
That Other Kind Of Game - Story Generators
15:28
BuffaTwo
Рет қаралды 298 М.
An introduction to Utility AI
8:57
The Shaggy Dev
Рет қаралды 9 М.
Procedurally Generated 3D Dungeons
9:42
Vazgriz
Рет қаралды 282 М.
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 3,2 МЛН