0:06 School several times before um and uh I
0:09 think he was in principle interested but
0:12 various things happened um pandemics
0:14 happened and various things
0:18 um yeah so we very very happy to have
0:21 Oscar here today um Oscar is not an
0:24 academic like some of us um and also not
0:26 a research director at the giant
0:29 multinational games company um um like
0:33 some other of us um um instead I think
0:36 he's this year we don't have that many
0:37 people from the indis space but I guess
0:40 he's our main Indie representative today
0:43 so Oscar is famous among other things
0:46 for two games um townscaper and bad
0:50 north um they are quite different in
0:53 various ways but um they are also they
0:55 have some similarities in how in the
0:59 Reliance on PCG um and we asked osar to
1:01 come to talk about what he wanted to
1:03 talk about assuming that what he wanted
1:04 to talk about
1:08 was how to build games around PCG and
1:10 PCG matters around it so uh without
1:20 right uh yeah so you know how when you
1:23 go see a band all the fans just want to hear
1:25 hear
1:27 the when you go see a band all the fans
1:29 just want to hear all the hits and then
1:31 the band goes and here's a song from our new
1:32 new
1:35 album that's what this talk is going to
1:37 be uh so this is a new thing I'm working
1:40 on it's like a cool little procedural Island
1:41 Island
1:44 generator uh that generates cool nice
1:45 looking islands that I probably
1:49 eventually G to put a game on top of uh
1:50 but I'm not in a hurry so I'm sort of
1:52 taking my time just making them look
1:55 beautiful in more ways um so I'll show
1:57 you a little bit the stuff I've been
1:58 working on before because this is all
2:00 kind of I keep building on the same kind
2:04 of Technology um this is townscaper it's
2:08 the last game I made um it's sort of
2:10 it's barely a game even you just sort of
2:13 Click you pick colors and
2:15 then there's a bunch of algorithms
2:17 running underneath that's making sure
2:20 that sort of however you build it makes
2:21 sense and there's like little details
2:23 filling out the space you can do things
2:26 like building build green backyards and
2:28 whatever making cool like floating
2:30 structure stuff like that
2:34 um and then before that I made the game
2:36 uh bad North here I just have some
2:38 random YouTube video of what that game
2:41 looks like um the new thing I'm building
2:43 is probably going to be a lot more like
2:47 bad north than townscaper because um um
2:49 townscaper is an is an interactive
2:51 generative game right you can keep
2:55 building and that kind of limits the
2:57 kind of algorithms that you can
2:58 Implement right because everything has
3:00 to be updated instantly that's one thing
3:02 so it has to be fairly fast it's harder
3:04 to do Global things like doing a UV
3:06 mapping of of the whole world for
3:08 example if if it keeps changing all the
3:13 time um and also there's like there's
3:15 some design restrictions as well because
3:16 if you're making something like
3:19 townscaper where
3:23 um the player has to have a fairly good
3:24 idea of sort of what's going to happen
3:26 when they do different things I can with
3:29 my algorithms play a little bit with
3:31 like the shape of tiles and surprise the
3:33 the player but if they place a house
3:35 block it should look like a block and it
3:37 should be a house like I can't turn the
3:39 whole thing into a tree unless I figure
3:41 out like a very clear way of
3:42 communicating to the player why this
3:44 happened and not another thing so that
3:46 sort of limits the kind of there's a
3:48 bunch of architectural features for
3:49 example that would fit very well into
3:51 townscaper but I haven't figured out
3:55 good way of doing um sort of recipes for
3:57 the player on how construct to construct
4:00 these different things um there's also
4:02 after townscaper townscaper is all Urban
4:04 environments there's a tiny bit of green
4:05 space but it's it's all within the
4:08 context of an urban environment uh but I
4:10 wanted to get back to doing some more
4:12 sort of natural landscapes likeing by
4:13 North and I had some new
4:17 cool um Technologies and stuff in mind
4:21 that I thought would work well um so
4:24 we'll sort of go through the generation
4:25 process fairly linearly on what happens
4:27 when you make one of these levels let's
4:30 just make a couple of more just to see
4:32 what what kind of it's capable of
4:36 um so first of all there's the grid and
4:38 sort of as I'm when I mean townscaper
4:39 that has a weird grid as well you can
4:41 tell it's
4:43 not um it's not Square here we got this
4:46 big weird hexagonal thing going on uh so
4:48 I kind of felt after having introduced
4:49 that kind of grid I couldn't go back to
4:52 doing normal grids uh so now I'm I'm
4:53 stuck with doing weird grids in whatever
4:57 projects I make in the future um but you
4:59 can see in the middle here the grid is
5:01 kind of square right that makes a lot of
5:03 sense but then up here at the edges
5:05 there's some different things going on
5:07 so we can actually overlay what sort of
5:11 will be the game tiles so in bad North
5:15 you uh no
5:18 that's in bad North it's it's a tile
5:20 based game but the it's only tile based
5:21 for the player so the player tells units
5:23 where to go but the units themselves
5:26 flow freely across the terrain so it's
5:27 kind of an interesting differentiation
5:30 in in the abstraction level that the
5:32 player is working on and that the the
5:35 actually units fighting uh are are
5:37 working on and that also means that like
5:39 normal tile based games it's super
5:41 important which tiles are adjacent and
5:42 which aren't adjacent right if you're
5:44 doing melee combat on a square grid then
5:46 like what happens on the diagonals
5:48 that's unclear uh but in a game like
5:51 this it doesn't um it doesn't really
5:52 matter at all you can have like thin
5:54 winding paths going between different
5:55 tiles the only important part is that it
5:58 should be easy to send units to go
6:00 through all the different paths to clear
6:01 out if there enemies standing there
6:02 because the enemies they don't care
6:05 about the tiles at all um but yeah so
6:07 bad North was all square that was before
6:10 I started doing weird grids uh at all
6:13 but townscaper or this thing here which
6:15 might become bad North too we'll see uh
6:18 has this kind of grid um let's generate
6:20 some new ones to see what's going on
6:21 yeah so you see there's a bunch of
6:23 square sort of squarish things going on
6:24 but then there's a bunch of more hex
6:26 likee or kind of irregular grid shapes
6:29 going on and what's actually happening
6:32 if we take a look at there's a the first
6:34 thing that happens in the generation is
6:38 the base grid being generated and if we
6:41 slow down that we should be able
6:44 to uh here we see the base grid being
6:45 generated so I start with like a a
6:48 convex shape I place a bunch of tiles or
6:52 a bunch of vertices uh in the shape in a
6:54 mostly Square pattern and then I just
6:55 fill it out with triangles where it
6:57 didn't fit anything so then you get a
7:01 nice mix of squares and triangles
7:03 triangles
7:07 and as we all know that is everyone
7:11 familiar with the jeel graph concept no
7:13 maybe not um there is uh when you're
7:16 doing a hexagon game you might like you
7:17 could make all the game tiles be actual
7:20 hexagons but hexagons are tricky because
7:21 they have six sides and six corners
7:23 that's a lot of work what you could do
7:26 instead is you could make all your
7:28 visual tiles out of the little triangles
7:30 combining different like hexagons like
7:33 this uh because that's super convenient
7:35 because then you can um like within a
7:37 like say this is a a medieval town with
7:40 a town wall then within this triangle
7:41 you can have a wall like that so then
7:43 like if you have a triangle that has a
7:45 wall like that going outwards and then a
7:48 triangle with a wall like that going
7:51 inwards and then like one triangle
7:52 without wall and then one triangle just
7:54 filled with the town that's supposed to
7:56 go inside the wall so it's like town
7:58 here it's town here then you can create
8:00 all the different town shapes you would
8:01 want to on a on a hex grid without
8:03 having to do a bunch of different things
8:04 that you would do if you put it straight
8:05 on the hex
8:06 hex
8:09 um so yeah we got this so we can
8:10 actually look at as well what happens if
8:12 we do it in a non-mixed
8:15 grid um here is just with a square Grid
8:22 boring there we go it's a bit unfair of
8:24 course because I built the T whole tile
8:26 set with the mixed Grid in mind so like
8:27 it's not able to do all the kind of
8:30 interesting things here uh we can also
8:32 do it with uh let's just do one more but
8:35 it's faster yeah and then we could do it
8:38 with a full uh triangle grid so that's
8:40 essentially a hex grid as well that's a
8:42 little bit cooler like you get these
8:44 interesting it's sort of it's obviously
8:46 works better with like Cliff faces for
8:48 example they look a lot more natural in
8:52 a hex grid but I'd say one um drawback
8:54 of the hex grid is it has this very
8:58 clear scale to it right if you follow a
8:59 a l like in in a civilization for
9:01 example if you zoom out you always see
9:03 these kind of these lines right this
9:07 wave of the hex grid size everywhere um
9:08 and that looks like that works at a
9:10 certain scale but if you zoom out more
9:11 it starts to look very repetitive and
9:13 very obvious I mean this is a an issue
9:15 with a lot of tile based Solutions
9:16 whereas of course squares have a nice
9:18 feature of you can actually have like
9:20 lines running along the square so like
9:23 in a in a the the grid scale doesn't
9:25 show as much right you can have straight
9:27 lines and in so with this solution with
9:30 the mixed grid I get sort of the Best of Both
9:31 Both
9:34 Worlds uh and some featur so I've
9:36 actually chosen um specifically to not
9:40 to only allow flat planes on the on the
9:41 square tiles because squares kind of
9:42 feel more natural and since I'm
9:45 displaying this as this kind of um
9:47 agricultural landscape with these little
9:49 like lines between the different tiles
9:50 which are supposed to be game tiles you
9:51 play on but they also look like
9:53 different fields that makes a lot more
9:55 sense on the on the on the Square grid
9:57 uh whereas on the on the boundaries it
9:59 looks a lot better on the hex grid so
10:00 here you get a little bit of Best of Both
10:01 Both Worlds
10:04 Worlds
10:07 um yeah and the other big thing that's
10:10 going on apart from the grid of course
10:12 um are the is the wave function collapse
10:14 that's the same sort of algorithm that
10:17 it's also known as well they're probably
10:18 slightly different but there's not
10:20 there's I maybe should call it model
10:23 synthesis which might be the correct uh
10:25 name I'm not ex my algorithm is probably
10:26 so far a spin-off of both of these that
10:29 there it might be called its own thing
10:30 but what's going on and this is the
10:33 thing I've been working with since uh
10:35 bad North and townscaper and a long
10:37 while back as well is I'm taking all
10:39 these different so these are all my
10:42 tiles that I built in Maya and then
10:45 export them just as one big triangle
10:47 soup mesh without any like naming
10:50 conventions or grouping or anything uh
10:51 into unity and then I have an import
10:53 script that parses these things and like
10:54 divides them up into different tiles and
10:57 stuff and you can see I've got a lot of
11:00 square tiles going on here
11:03 and a lot of triangular tiles and then I
11:05 even have
11:08 some tiles that sort of because I can
11:12 have tiles that stretch across multiple
11:15 cells so to speak so this house here is
11:17 supposed to sit like half on some
11:19 squares and half on some triangles uh
11:22 that's pretty fun and I can do some more
11:23 like I think we have an interesting sort
11:25 of sloping feature here that's supposed
11:28 to also like fit in a very specific way
11:30 with like both squares
11:32 triangles um so that's good then I can
11:33 get sort of the best of both world most
11:36 of the houses and stuff exist on on
11:39 squares um whereas most of the Cliff
11:41 face features and stuff like that exist
11:44 here in the Triangular space uh so what
11:46 the wave function collapse algorithm
11:48 does for those who do not know is that
11:53 it figures out how to create a coherent
11:57 uh level from a set of input tiles uh so
11:58 this is a demo of the wave function
12:00 collapse algorithm I wrote a while back
12:02 so you can see it takes these this is
12:04 like the smallest possible version of it
12:07 that's still a little bit interesting uh
12:08 so you have these input tiles here to
12:10 the left and they fit together in
12:12 specific ways you can see there's like
12:14 little bits of text written on the sides
12:17 here uh which is like in in this case
12:19 this the that's just based on the colors
12:21 on like it's sampling on three positions
12:22 along the tile Edge and based on the
12:24 colors but you would do this differently
12:25 depending on how your tile set supposed
12:27 to fit together and then the algorithm
12:29 just figures out how to fit all these
12:34 together in a coherent um environment
12:38 and one um the way it does is it starts
12:40 with like everything being possible
12:42 everywhere and so here you can see like
12:44 all of these existing all these modules
12:46 existing in all these different slots
12:48 and then if you select something that's
12:50 supposed to go somewhere so say I want
12:51 like this little this little Spire to go
12:54 here I click there Bo a bunch of the
12:56 possibility space collapsed because a
12:58 bunch of things are no longer possible
12:59 there's no like overhang in this tile
13:02 set so if I put the Spire there then
13:04 there has to be air above it and below
13:05 it there has to be this one because
13:07 that's the only one that fits there but
13:08 then below that one there's actually a
13:10 couple of different one that fits but
13:13 they all in turn have to have dirt uh
13:15 below them uh so that's very convenient
13:18 like this is a mixed initiative version
13:19 where you can you can pick some tiles
13:21 and then you can just tell it to solve
13:23 the rest and like technically what's
13:25 going on is we can make the algorithm
13:27 run a little bit slower so if I pick a
13:30 Spire once again
13:32 uh you see it unfolding and technically
13:35 what's going on is when you place a tile
13:37 what's happening is removing all the
13:39 other tiles because like removing
13:40 possibilities is the core of the
13:45 algorithm and every time the last tile
13:46 with a
13:51 specific um profile facing aside so in
13:52 this case a specific color for example
13:55 is removed then it tells the cell next
13:57 door like hey you need to remove
13:58 everything that rely on relied on this
14:01 one so if there's no longer any Sky
14:03 facing the side then all the sky tiles
14:06 relying on the sky has to be removed uh
14:08 and that's a a recursive function
14:10 basically I mean you can implement it as
14:11 a recursive function recursive function
14:15 or as a as a work list kind of with an
14:18 explicit stack as well um and then it
14:20 does that until there's nothing more to
14:21 collapse all the implications have been
14:23 resolved and then you get to make
14:26 another Choice uh and in this case like
14:28 with this kind of tile set it can't fail
14:30 basically always succeeds with more
14:32 complex environments or complex tile
14:35 sets it has some limitations and it
14:48 um yeah let's speed up oh it's fast
14:50 whoop There we go so that's the basic of
14:52 the wave function collapse algorithm so
14:54 my uh I have this big import script that
14:56 analyzes all these
15:00 um um terrain tiles and you can see on
15:01 the edges of them there are little
15:04 numbers and those are
15:08 basically uh the sort of profiles of
15:09 specific sides and they fit together
15:11 with other things so this 21 and 20
15:12 they're very close to each other because
15:14 they're actually mirrors of each other
15:15 so they're like calculating indexed
15:17 right after each
15:20 other um and there's also little these
15:22 little faded numbers here there's a zero
15:24 there's a one because above here that's
15:26 outside whereas below here that's all
15:28 inside so those are like reserved
15:30 indexes for these specific cases so you
15:32 could have a tile that's just like an
15:33 empty tile without any mesh that's just
15:35 one one one one one everywhere because
15:37 it's inside entirely yeah
15:38 yeah
15:41 um so these are sort of these little
15:43 numbers are super key to the algorithm
15:45 but I sort of like if you imagine all
15:48 the um if you have imagine you have a
15:50 you have a a tile that fits inside a
15:52 cell like that and then it has like a
15:54 shape facing the edge of it there's a
15:57 way to sort of create a hash from those
16:00 edges facing the side and then um uh
16:03 there's a bit of um sort of art to how
16:04 you create this hash because you don't
16:07 want like mirrored you want to keep
16:09 track of mirrored things and yeah um and
16:11 then you can index that hash and then
16:13 hopefully two shapes that look exactly
16:14 the same will end up having the exact
16:17 same hash and that's that's good uh you
16:19 do I do round my verts quite a bit so
16:20 that you don't run into like Precision
16:22 issues because like it's all floating
16:24 Point coming from Maya
16:27 obviously um I also do a bunch of all
16:29 the the different triangles in Maya are
16:31 marked up with different materials and
16:33 I'm using that as tags to sort of apply
16:34 metadata to the
16:37 triangles um so there are some like
16:39 here's a little beach curve here so
16:41 these have like a material called uh
16:43 grass and these ones have a material
16:44 called Beach and then when I analyze the
16:46 thing I also check for edges between
16:48 different kinds of materials uh they're
16:52 also marked up with like um so that I
16:54 get these uh so if we have an entire
16:56 Square Tile For example we have uh
16:58 what's like a big flat plane for example
17:00 here we got one of those you see it's
17:02 got this cross in the middle cuz these
17:04 are marked up with like it's grass but
17:06 grass I I call them different colors so
17:07 it's like grass yellow grass green grass
17:09 teal and then maybe that's grass green
17:11 as well and then the borders between
17:12 those become the borders between the
17:14 tiles in the
17:18 game um and then also I if I have
17:22 triangles that stretch across multiple
17:24 of these sort of underlying grid tiles
17:27 these are joined into bigger modules so
17:29 this is a big module right you can see
17:31 how it's uh it has like triangles that
17:33 stretch across both of those and then
17:34 you see the yellow outlines like that
17:36 it's and you see also that the borders
17:38 between these are negative numbers
17:39 that's just how I flag that these are
17:42 not normal border hashes but these are
17:45 like connecting two internal um sort of
17:49 sub tiles into one big tile yeah so
17:51 that's sort of the tile based part of the
17:56 algorithm let's start up the game
17:59 again so another thing I have have been really
18:06 um so yeah another question is like why
18:08 would you go for a like normally when
18:10 people do landscape like tile based are
18:12 very good for architectural environments
18:13 because they they tend to be they
18:16 require a lot of um uh specific
18:20 authoring but when people do uh oh it's
18:23 in the WR there we go uh when people
18:26 do um Landscapes they tend to go for
18:27 sort of softer algorithms for stuff with
18:30 height fields orx based things like that
18:32 uh that's really good to get organic
18:34 shapes but a benefit of doing tile based
18:36 things is you kind of know if you if you
18:38 care about things like navigability
18:40 where units can go where they can't go
18:41 and you won't want to be able to control
18:42 that in nice ways like you don't want to
18:45 create Pathways that looks like they're
18:46 wide enough for a unit to go through but
18:48 they can't really because it's a bit too
18:50 narrow or Cliff faces that you don't
18:51 really know if they're too steep or not
18:55 steep enough to um to go up and down um
18:57 you don't want that for a game you want
18:58 the game world to tell you very clearly
19:01 how you're you're able to act upon it
19:02 and tiles is a very nice way of
19:03 achieving that because then you have
19:05 very clear control over what kind of
19:07 data goes in and of course tiles are
19:08 also good because you can mark up
19:11 special things like places where where
19:14 props would go or where um Like Houses
19:16 mark them up as being houses and where
19:18 the door supposed to be and and stuff like
19:19 like that
19:21 that
19:24 um and here we can we can turn on
19:27 the and it's easier to do like obviously
19:28 like something like this wouldn't work
19:30 on on a height field but it's fairly
19:32 straightforward to do with with these a
19:34 tile based solution here we can mark up
19:36 and see the the borders between the
19:38 modules that make up these so these are
19:39 like the borders between the tiles that
19:41 you saw in the last picture and you can
19:44 see that they have if we turn on the the
19:46 game tiles where you would move units to
19:48 if this was bad North you can see that
19:51 they are uh they have this this dual
19:53 relationship to each other you see the
19:55 the black lines and the white lines are
20:02 and you also see right now that these
20:04 lines are not straight at all they're
20:06 kind of wonky uh because that's the next
20:10 part I was going to talk about when
20:12 in the one thing I wasn't really able to
20:14 do in townscaper is I wasn't able to do
20:17 slopes right townscaper has it's all
20:19 block based so if you have a if if you
20:20 have a block like that and a block like
20:22 that and a block like that like there's
20:24 no I do put in a little bit of like
20:26 staircase things going on like this but
20:27 sometimes you would want to have a nice
20:30 slope like and probably a nice sloping
20:32 slope like that and townscaper doesn't
20:33 have any of that so that's like one of
20:36 the things I really wanted to tackle uh
20:38 in this project uh because you you want
20:42 those for kind of um yeah to create nice
20:45 natural organic environments so what I
20:47 did here is I'm actually doing a quite a
20:49 lot of postprocessing of the mesh after
20:52 it's being assembled so if we turn off
20:53 all of that
20:55 postprocessing I do that in two steps
20:56 that I'll go through uh we do no
21:00 deformation and we do um no
21:02 relaxation and then we generate this same
21:04 same
21:07 level there we go you'll see that some
21:08 like edges look a lot more Jagged like
21:10 here there's like a sharp turn here
21:11 where it was basically a smooth straight
21:14 line before and if we turn on the uh
21:16 module borders you see that now they're
21:19 very straight and they conform like very
21:22 well to the the base graph lying
21:25 underneath um but here also you see this
21:29 like this slope here is very clearly
21:31 like a flat tile and then a slope tile
21:34 and then a flat tile again uh which is
21:36 this kind of boring super obviously tile
21:40 shapes that I wanted to get away from so
21:42 there's actually two things going on
21:50 um turn on the cells and then we'll look
21:53 at the cell
21:56 deformation there's a face that looks
21:58 like that
22:02 where uh there's essentially two things
22:04 going on in this I call it the cell
22:06 deformation stage there kind of two
22:09 things going on uh one of the things is
22:12 that um uh each of
22:15 the so if we look at it from above the
22:17 cells are trying to achieve this the
22:21 shapes that they had in the
22:24 um in the the modules that went into
22:25 create that actually ended up filling
22:26 them and that's interesting because some
22:28 of the modules actually have slightly
22:29 different like there's triang most of
22:31 the triangles are the same shape but
22:32 some of them are a little bit wider like
22:34 for example to make space for a house in
22:36 between two different game tiles where
22:39 there wasn't really enough space anyway
22:41 um and also like they obviously have to
22:42 compromise with their shape to fit
22:45 together between the different uh other
22:48 grid tiles that they're next to but
22:49 after the level's been assembled they
22:51 know that there there's actually air
22:52 between some of these so you can see
22:55 like there's a gap opening up like here
22:57 between these two cells that are
22:58 actually right next to each other but
23:00 there's no mesh connecting them so they
23:02 can have a bit more leeway in how they
23:05 deform uh and then there's also the if
23:06 we look at at this axis
23:09 instead we can see
23:12 uh uh the whole thing's kind of rising
23:13 up a little bit like that and that's
23:15 just a way to add a bit of additional
23:19 variety to it where um if you would have
23:20 if you would have at clean this a little bit
23:30 so what's happening if you would have like
23:31 like
23:34 a uh imagine a t maybe there's a bit of
23:36 a stair and then there's like flat but
23:38 then there's a sharp wall and it goes
23:40 down like that a bit of that kind of
23:42 shape what I'm doing is I'm kind of
23:44 pulling everything upwards but then it's
23:46 kind of clamped down with the other
23:49 things next to it but uh uh it's
23:51 clamping down more where you can go so
23:53 it's kind of tethered where you can go
23:55 and not and but not Tethered on just
23:57 Cliff faces so what's going to happen to
23:59 that shape during the relaxation stage
24:00 is like it's going to rise a little bit
24:02 here and then the staircase is going to
24:04 rise a little bit as well but then it's
24:05 going to be able to rise like quite a
24:08 lot in this direction and go down like
24:09 that and then just like rise a little
24:12 bit there so this like uh Cliff face
24:13 here actually gets quite a lot larger
24:16 and you introduce a new interesting
24:18 shape sort of that isn't depending on
24:20 like variation in the input tiles that
24:21 also means that if you have a completely
24:24 flat level it will instead turn into
24:26 like something like that which is you
24:27 know pretty nice it looks more natural
24:29 you get some nice Cur in there stuff
24:32 like that
24:34 um and then the second thing that's
24:38 going on is we can turn on the
24:41 relaxation uh so this like a good thing
24:42 with doing cell deformation is that it
24:44 keeps the cells have a defined volume
24:46 and they keep the contents of the cell
24:48 very intact because when you do post
24:50 processing on a mesh otherwise you might
24:53 end up with like generating degenerative
24:54 triangles like you might end up flipping
24:56 a triangle upside down or something like
24:58 that or making something too narrow or
25:00 or just like destroying the the
25:02 intricate shapes but if you do it on the
25:04 cell scale and then just interpolate the
25:07 the contents of the cell U it's mostly
25:10 intact everything inside the cell but I
25:11 still want to do there's still a little
25:14 bit too much
25:16 um U sort of jaggedness and especially
25:19 if you look see if I have any good
25:20 example this is and this is sort of an
25:22 an issue I really had in townscaper as
25:24 well if you look at this hexagonal house
25:26 here it's got these really weird like
25:28 concave Corners cuz that's just like
25:30 comes from the shape of the grid
25:31 underneath and I didn't really have a
25:33 good way of solving that
25:36 um but in this one let's generate a new
25:39 one that where it's more apparent yeah
25:41 here we should see one of these concave
25:50 well but then I do do a bunch of or a
25:52 little bit of I I don't dare to do it
25:54 too much but postprocessing
25:56 postprocessing
25:59 um on this let's turn on the
26:03 yeah let's do that without the cell
26:05 deformation but with the relaxation
26:07 instead and then let's slow down
26:09 relaxation with M cell deformation so
26:10 now this wall here turned out like a
26:12 little bit less concave a little bit
26:14 smoother and more natural let's run that
26:17 process um let's turn on the turn that
26:21 and that and that so here we see
26:26 the um the wireframe and also the the
26:28 some lines are are blacker than others
26:29 that's super important they are marked
26:32 as hard edges in the import step so
26:33 that's like really important information
26:36 in the relaxation step that happens now
26:38 so if we generate this one more
26:42 time we should see this happen slowly
26:43 here you see like everything's a little
26:44 bit Jagged but then it gets really
26:46 nicely smooth out while I'm at it
26:48 touching these BS I'm also like pushing
26:50 them a little bit outwards along their
26:52 normal just to make the shape a little
26:54 bit rounder which you know that's a
26:55 stylistic choice that's because I want
26:57 these really cute sort of roundish uh
27:01 Cliff things things going on um so this
27:03 smoothing step also means that I can
27:05 take like if you look at a if you look
27:08 at a cliff face from the side it's like
27:09 the bottom is here and then I have a CH
27:11 the mesh goes like that but then it goes
27:13 straight up and then it goes a little
27:14 bit inward like that and here's the like
27:16 the borders between the different the
27:18 different tiles and here's like the top
27:20 of the the hill uh but when I smooth it
27:22 out it turns into something like that
27:24 instead which is a much nicer thing and
27:27 you don't see where the original sort of
27:29 borders between the tiles work and of
27:32 course this the smoothing step is quite
27:33 interesting because it as I said it
27:35 cares a lot about where these little
27:38 black edges are uh I call it uh
27:40 hierarchical smoothing because different
27:41 edges and different birds have different
27:44 hierarchies so if we just do a a super
27:46 simple smoothing where every vert just
27:48 gets to pull all the other verts sort of equally
27:49 equally
28:03 so it looks a little bit crooked and
28:05 weird you sort of you're adding more
28:06 noise really than you're removing from
28:08 from with this moving especially like on
28:10 the I mean like a jagged Beach like this
28:12 might be fine well here with the sand it
28:13 looks a little bit weird like these
28:15 triangles here are pulling this vert
28:17 outwards it looks very and especially
28:21 the like the houses they break down like
28:22 almost entirely because they're not
28:24 super high poly so they don't have a lot
28:26 of sort of um geometric weight I guess
28:28 you could tell it
28:31 so I'm doing this uh hierarchical smoothing
28:36 instead
28:38 where it's basically
28:42 like um yeah there the only some verts
28:44 get to pull other verts and only along
28:48 some edges so an a vert that's not
28:50 that's not special in any kind of way
28:51 like this vert here it's just in the
28:53 middle of nothing that one sort of get
28:55 that's a normal smoothing function that
28:57 that one gets that that one just gets
28:59 pulled to the middle of all its
29:00 neighbors sort
29:03 of whereas
29:06 uh like this ver here for example that's
29:08 on a hard Edge so it only gets pulled
29:11 towards this vert and that
29:13 vert so then you get something like uh
29:16 if you have like a couple of verts like
29:17 that and it's a little bit Jagged but
29:20 that's a hard Edge and this one's this
29:22 one actually has like more than two hard
29:24 edges going out so that's like pinned as
29:26 a really hard vert that barely gets
29:28 moved at all uh
29:30 but then this whole thing will like
29:31 these will average towards each other
29:34 and they don't care at all about
29:37 whatever soft words they're connected to
29:39 other directions but those soft words
29:42 get pulled like by these things uh and
29:43 then there's there's actually multiple
29:45 layers to these because I got other
29:49 features going on uh so if we turn on
29:50 here you'll see that there are some blue
29:54 edges and some uh red edges as well and
29:56 the red edges those are the the borders
29:57 between the game tiles because I want to
29:59 smooth those out as well uh so that
30:01 they're they become a a lot more legible
30:04 and smooth and nice um but they have a
30:07 different hierarchy to them so that like
30:10 the hard edges are the highest highest
30:15 um uh sort of priority and then uh the
30:17 blue thing here is different is the
30:19 border between two different materials
30:21 so it's between the beach and the sand
30:23 those are sort of lower priority and
30:25 then the red one is the border between
30:28 different um uh between different tiles
30:29 and those are the lowest priority and
30:31 then the ones that don't have any
30:32 specialness at all are like super low
30:35 priority uh so that means that I can
30:39 sort of uh introduce a lot of variation
30:41 after I assemble the different tiles and
30:45 I have a way to um provide an intention
30:46 to my algorithm of how I want to do that
30:49 so it matters a lot in Maya what I how I
30:51 Mark the different edges like which ones
30:53 I Mark as hard and which ones I Mark is
30:54 soft and where I have the different
30:56 material borders and stuff like that uh
30:58 so I retain the sort of the intention of
31:05 um yeah while still being able to do a
31:08 lot of manipulation after the
31:11 fact so that's one thing also when I do
31:14 the here's a cool thing as well when I'm
31:16 doing the uh wave function collapse
31:18 algorithm it's a classic challenge if you
31:19 you
31:22 do uh any kind of procedural generation
31:23 that you want your level to be roughly
31:25 playable you want units to be able to go
31:27 to different parts in the level so I
31:30 have this really rudimentary navigraph
31:33 that's part of the an uh the step where
31:34 I analyze all the different tiles that
31:37 go into the game I analyze which edges
31:39 that are outgoing from the tiles are
31:42 navigable uh and how you're able to
31:43 navigate between these different meshes
31:45 right because you you might or edges
31:46 because you might have a tile with like
31:48 a wall in the middle so you can't go
31:49 over the wall but you have to go like
31:52 the tile has several navigable separate
31:55 graphs in it so when I run the wave
31:56 function collapse let's see if it works
31:59 to slow that
32:02 down you'll see how it starts with some
32:04 Naval parts and they're different colors
32:06 initially because they're not connected
32:07 to each other uh so they're part of like
32:10 different navigable islands and then it
32:14 grows the um probably turn on the cells
32:17 as well yeah it grows the it sort of
32:19 collapses the the the possibility space
32:22 from the edges of the navigability so it
32:24 and and it always tries to extend the
32:26 navigability to place new tiles that
32:28 makes the player or the units able to go
32:30 to new places it doesn't always succeed
32:33 but it tries to and it's it's fairly if
32:34 you give it the right kind of tile set
32:36 it's fairly good at sort of climbing up
32:37 to high points and making little nice
32:41 interesting stairs and stuff like
32:44 that um and it looks the the the the nav
32:45 graph you see here looks really
32:47 primitive and not very nice because it's
32:50 sort of I made it in the smallest way
32:51 possible so if you have a square tie
32:53 like this that's completely navigable
32:55 that means that you can enter through
32:57 this Edge that edge that edge that edge
32:59 and then I just connect them in the
33:00 smallest way possible which is like just
33:02 like that so I'm not even connecting
33:04 them like this because this connection
33:06 is implied by the other connections so
33:07 then the whole thing looks like a little
33:10 bit messy and ugly but uh uh it serves
33:11 the the
33:14 purpose and if
33:17 I slow this down if I remove the
33:19 Slowdown and
33:23 I turn on the nav graph and generate
33:25 again yeah here you can see as well
33:27 there's a little bit of what should be
33:29 navigability a little bit red uh thing
33:31 here but there's nothing there cuz
33:32 what's actually happening is I'm running
33:34 the wave function collapse algorithm
33:35 Twice first I'm doing it trying to
33:37 expand the navigability then when I've
33:39 done that I'm like okay which of these
33:41 sections were actually were we able to
33:44 walk to and then I I save those choices
33:46 and then I reset the whole algorithm and
33:48 then I Implement only those choices that
33:49 you like the tiles that you were able to
33:51 go to and then I try and create like
33:54 water or air in all the other places uh
33:56 so here it ended up then not having a
33:58 little bit of sort of snpp of navigable
34:00 land but instead just water which is
34:02 like sometimes there are Snippets that
34:04 show up anyway because of just the
34:06 constraints of the tile sets um but
34:08 mostly it removes them so that there's
34:09 not and that's sort of an aesthetic
34:10 Choice as well like you might want to
34:12 have some Snippets some islands or
34:14 little pieces because you could put like
34:15 here's there's there's a couple of them
34:18 but you see it it used to be um bigger
34:20 but then it shank a little bit and the
34:21 reason these one appeared as well is
34:23 because this this little sort of river
34:25 piece is part of the same tile so it's
34:26 navigable on this side but so then it
34:31 um and well here you can see there's
34:33 quite a lot of navigable area that
34:36 wasn't used at all and got replaced by water
34:38 water
34:42 um yeah so another
34:45 thing happening here of course is after
34:47 I've made this
34:50 um uh made the cool shape of the level
34:53 uh I paint it so that it looks like I do
34:54 a bunch of procedural texturing which is
34:56 also a very nice way of breaking up the
34:58 the tiles right so the texture and the
35:00 UV Maps don't come directly from the tiles
35:01 tiles
35:04 um here we can look at we can turn on
35:06 what the color texture looks like on this
35:06 this
35:14 that and the as you probably are able to
35:16 see the textures are kind of painted on
35:19 like one sort of brush stroke at a time
35:22 so if you turn off the text the should
35:25 be able to turn off the stamps um there
35:28 we go no stamps same
35:33 seed yeah so here's without any special
35:35 texturing here I'm just sort of priming
35:38 it with some base colors going on uh
35:40 here you can like see how very low poly
35:42 the mesh is for example these lines here
35:43 they follow exactly the shape of the
35:47 mesh but then like I found um uh very
35:49 early on in implementing this system I
35:52 found I get a lot
35:55 of um I come a long way just adding what
35:58 I call Big blotches here
36:02 which is basically I just like paint big
36:04 uh Big Brush strokes and just sample the
36:07 colors and the normals where I paint the
36:09 brush strokes but then just paint it on
36:11 as a big Square uh because then you get
36:14 like if we see the difference between
36:17 the um here you have the the wireframe
36:19 and then the these lines just deviate
36:21 like slightly make it a little bit more
36:23 wobbly while largely following the the
36:25 wireframe uh so you get a really nice
36:27 sort of Base especially for the cliffs I
36:28 think that there's a really nice way of
36:31 getting like slightly Jagged edges uh
36:35 that fit very neatly closely to the um
36:37 to the shape of the mesh like another
36:38 way to make it look more cliff-like
36:40 would be to just add tiling textures and
36:41 stuff like that but I don't really like
36:42 those kind of solutions because
36:45 especially in the stylized style um they
36:48 kind of hide the low poly mes mesh
36:51 mostly with noise uh they don't contain
36:52 contextual information about the shape
36:54 of the mesh at that specific point
36:56 they're just like a rock noise that goes
36:59 on top of it whereas this actually
37:02 creates the rock shape out of the um uh
37:08 the actual underlying um polygon
37:10 shape and then there's a bunch of and
37:11 and I plan to go a lot further with this
37:13 as well there's of course a bunch of
37:17 other like specialized handwritten uh
37:19 uh
37:21 um paint brushes going on on top so to
37:23 create these little Bush things they
37:26 should probably have some like uh 3D
37:28 shape to them as well but it's a good
37:30 start and these sort of lines that run
37:32 along the grass and stuff like that so
37:33 there there's a lot left to be played
37:37 with there as well
37:40 um and another thing I do here here's
37:42 the normal map for the whole thing and
37:43 here's an interesting thing called the
37:45 contrast texture uh which is because I
37:47 want to have these little lines between
37:48 different things I don't know if
37:50 anyone's has ever experimented with
37:52 doing these kind of handdrawn uh Styles
37:53 where you have lines everywhere so
37:56 outlines is a fairly solved problem but
37:58 lines internal to object is actually a
37:59 fairly difficult way to get right if you
38:01 just bake them into the texture they
38:03 will look like they will have a certain
38:04 scale and if you zoom out too much
38:05 they'll they'll start to disappear and
38:07 when you zoom in they turn large and
38:10 blurry um that's why I have this
38:13 contrast texture where for each each
38:15 Edge uh it has an idea of how much
38:17 contrast it wants to have to the edge
38:19 next to it so like a hard Edge should
38:21 always have some kind of contrast and
38:23 the difference between grass and Cliff
38:24 should always be that should be an even
38:27 higher contrast or like between the the
38:28 roof of Tire of a house and the wall of
38:30 a house and then I've got this iterative
38:32 algorithm which is seeds everything with
38:34 a with with a random color and then it
38:36 iteratively goes through and see like oh
38:38 this Edge should have more contrast so
38:39 let's like push these colors away from
38:41 each other oh this edge here they should
38:43 have less contrast let's pull these
38:44 towards each other you run that like 100
38:46 iterations or something and then you get
38:48 a nice like super colorful map like the
38:51 one here and then if you just run like
38:53 like Edge detection on that map you get
38:57 super nice uh outlines uh with like the
39:07 places um
39:09 yeah then I got some also some nice like
39:12 I voxelize this whole space and make a
39:14 three-dimensional distance field as well
39:18 uh for lighting and for other things um
39:21 if we see there we see that's a
39:24 beautiful gorgeous uh texture can anyone
39:31 it's a 3D texture sort of but stacked
39:33 right so the these are like the
39:35 horizontal plane planes and then all the
39:37 different the 16 ones are like stacked
39:40 vertically uh but the weird colors
39:42 because it's actually a distance field
39:43 in the alpha Channel but you can barely
39:46 see that but the weird colors are the UV
39:49 colors of the closest triangle to that
39:52 boxal in the distance field because that
39:53 means that I can then through that
39:56 distance through this texture I can look
39:57 up the the
40:00 uh the UV mapped Mega texture so I can
40:03 run my like lighting calculations I can
40:04 go back and forth back and forth between
40:14 unruptured texture of those because I
40:15 figured if this should run on mobile
40:17 which so far I've put all my games on
40:19 mobile so I guess this should run on
40:20 mobile as well doing this kind of
40:22 expensive lighting calculations and
40:24 Global illumination it'd be nice if you
40:26 could just pre-bake this whole thing
40:27 into one Mega texture then like drawing
40:29 the whole environment becomes super
40:33 cheap uh but then it's also baked into a
40:37 big nice light volume here you see that
40:40 one um which is like a volume but it's
40:42 also with different axes so you got like
40:44 the brightest one here is upwards facing
40:46 and that the darkest is downward facing
40:48 then it's like Left Right positive
40:50 negative and you can clearly see the
40:54 sort of shape of the uh Island here as
40:55 well and there's actually some Shadow
40:57 costing going on so I can use that in
41:00 the um to do like so the I got fairly
41:03 complex Global illumination lighting but
41:05 actually rendering that is super simple
41:08 I just sample like one place in the uh
41:11 in this volumetric texture and um so
41:13 then I can light particles grass foliage
41:16 units whatever super cheaply I had a
41:17 similar solution to bad North but it's
41:19 just like a little bit more complicated this
41:20 this time
41:22 time
41:25 um doing all time pretty good yeah so I
41:28 think I've uh
41:29 I've gone through most of the major
41:32 things I wanted to show so I can start moving
41:33 moving
41:37 to questions and yeah I got a lot of
41:39 the stuff here on the computer if you
41:41 want to see
42:07 here yeah thank you very much um you
42:10 know with the texture sorry the vertex
42:13 smoothing yeah do you do anything you
42:15 you smooth towards the low priority
42:19 vertices at all um no the the the higher
42:21 priorities or order or what you want to
42:23 call them they don't move towards the
42:26 lower ones at all um but the yeah but
42:28 the lower ones move towards the higher
42:32 ones yes yeah um there's a t and the
42:33 yeah the ones the ones that have more
42:35 than two outgoing hard edes so the ones
42:38 like this one uh
42:41 those shouldn't be moved At All by the
42:42 other ones but I actually move them just
42:44 a tiny bit because it it creates a
42:46 little bit it depends a bit like I do a
42:48 lot of ad hoc stuff like the houses
42:49 they're not smoothed at all because
42:51 they're created in the correct shape
42:53 from the beginning so yeah there's a
42:55 bunch of adog stuff like that going on
42:56 and like different materials being
42:58 treated differently and some are bulging
43:00 outward a little bit more and some a
43:01 little bit less and stuff like that
43:09 much um this is this is a bit out there
43:12 but um given that you're at the output
43:17 of your uh algorithm is itself kind of a
43:19 tile have you considered running this
43:22 recursively to create like use this as
43:25 like the tile piece and then extend that
43:28 into like a its own kind of kind of wave
43:31 function collapse into like a set of of Island
43:33 Island
43:35 tiles I don't think I fully understand
43:37 oh sorry given that you can generate
43:41 like a like a like a tile yeah uh out
43:44 comp comprised of tiles right could you
43:47 ostensibly like recurse and generate
43:51 like a like a whole a whole archipelago
43:53 of these guys oh yeah I mean
43:56 theoretically you could uh for sure yeah um
43:57 um
44:00 yeah but yeah I'm probably not gonna
44:02 because uh I like these little really
44:04 Coy small environments and it sort of
44:06 brings out the most of the tile based
44:07 approach as well because if you've got a
44:08 very big environment you can spread
44:11 things out a lot and you're not you can
44:13 sort of but when you're doing a small
44:14 Coy environment things need to butt up
44:16 against each other and sort of relate to
44:18 each other a lot and the handcrafting
44:20 you get to do when you do a tile based
44:22 system kind of caters to that a lot you
44:24 get to like like little details be
44:27 leaning on each other and uh stuff like
44:30 that um yeah so yeah there's also a
44:31 bunch of like there's a lot of technical
44:33 things you can get away with when you do
44:36 a very constraint environment like this
44:38 like like being able to do the lighting
44:40 in just one big volume and that's it
44:41 like obviously in a big game that
44:42 wouldn't have that wouldn't work at all
44:44 you would have like a loing system and
44:45 like a bigger volume and then a smaller
44:47 I mean you probably couldn't use a
44:48 that's why use light probes and similar
44:51 system but here it's very defined small
44:52 space I can just have one big volume
44:54 covering everything one big UV map
44:55 covering everything one big texture
44:57 covering everything so it's like like
44:59 you you a lot of the problems become a
45:00 lot simpler when you just put everything
45:08 this uh so when you're deciding the
45:10 tiles uh do you have like a different
45:12 texture for each different tile of
45:15 combination or do you have like um a
45:17 grass tile kind of and a portion of it
45:19 is taken by another texture
45:22 somehow uh so all the texturing is
45:23 happening procedurally after the fact so
45:25 there's no texturing going into the
45:27 tiles at all and there's no UV map on
45:28 the tiles as they are so the whole thing
45:33 is UV map as one uh and then the yeah so
45:35 there's no the the texture system
45:37 basically doesn't know much about the
45:40 the tiles at all that at that point that
45:41 information has become old and
45:44 irrelevant sort of um yeah which is also
45:46 why you don't get like the borders
45:48 between the the tiles shouldn't be
45:49 visible in the I mean there are some
45:50 borders visible here but they're
45:53 actually not the borders between the the
45:54 module tiles that go into the game but
45:55 they're the borders between the game
45:57 tiles where you would play the game so
45:58 they're sort of intentionally placed
46:00 there uh so it's like decided after kind
46:03 of yeah yeah yeah the texture is
46:05 entirely created after the fact yeah
46:07 yeah thank
46:10 you um really fun talk um I wanted to
46:11 ask you I think you mentioned already
46:14 the handcrafted tiles but you have all
46:17 this Tech going on and then you actually
46:19 do these tiles in Maya yeah which is
46:20 kind of weird right like you know you
46:23 have all this like what is the rationale
46:24 why do you do it like like the way
46:27 you're doing it is an aesthetic thing or
46:29 what other way would I do it you could
46:31 just generate them like you could just
46:33 generate yeah but no but there's a lot
46:35 of thing there's a lot of artistic
46:36 consideration that goes into
46:38 handcrafting them a lot of them look
46:40 like fairly generic in their shapes and
46:42 just solve like specific geometrical
46:43 problems but there's a lot of things
46:45 about like what happens when different
46:46 things meet each other like how a
46:49 certain little path looks like and and
46:50 also big part is like which ones
46:52 shouldn't be there there's some awkward
46:54 conect that's a big difference between
46:55 this and townscaper because down
46:57 townscaper that has to solve for every
47:00 possible way a person can build but
47:02 which actually like negates some of the
47:03 benefit of the wave function collapse
47:04 algorithm because it's supposed to be
47:05 able to figure out what it can do with
47:07 it what it's given so here it's like if
47:10 I have an awkward shape or if there's a
47:12 theoretical awkward shape where two
47:13 different things would meet each other
47:14 but it looks a little bit weird I can't
47:16 solve it in an aesthetical way I just
47:18 don't I just don't create that one at
47:21 all uh yeah and especially once I like
47:24 now I only have a few houses like this
47:27 um but they have a little bit of special
47:28 shape to them like you see this one has
47:30 like a little bit of a path that's sort
47:32 of tied to the house this one has a
47:34 little bit of a foundation that goes out
47:38 like this um like these things you could
47:39 you could generate these things kind of
47:41 in Houdini or something like that but
47:45 then you then you have to write all
47:47 those all those aesthetic rules you have
47:49 to formulate them into generative
47:52 functions uh which is good for some things
47:53 things
47:56 um but here you can just bake them in
47:58 man ually which is good for other it's
48:00 much easier to add I I think that
48:04 especially shows in townscaper which has
48:05 uh because you know in urban
48:06 environments it's filled with so many
48:09 different kinds of objects and things
48:10 that there would be so many rules if you
48:13 would generate them uh whereas if you
48:14 make them manually it's it's a lot
48:15 easier and you can like for everything
48:17 you can take into consideration oh does
48:20 this look too busy or too detailed or or
48:22 maybe good do these complement each
48:25 other in a nice way uh so yeah I mean I
48:26 think it's in general with procedur generated
48:27 generated
48:30 things it's very easy that they look too
48:33 procedural generated you want to get the
48:35 handcrafted artistic aspect in there
48:37 somewhere and a bit of that comes from
48:40 just writing sort of a artisanal code
48:41 lot a lot of hardcoded things on what
48:44 goes where and stuff like that uh but
48:45 it's good to have some space to do
48:48 actual uh sort of manual modeling or
48:51 texturing as well
48:56 yeah hello uh thank you for the talk um
49:00 how how do you go from like yeah you
49:02 have many tiles uh how do you decide
49:04 which ones you want to make next and
49:07 then that whole process of making it
49:09 Maya and then importing it through your
49:12 custom importer like deciding hard IES and
49:13 and
49:16 stuff how do you keep track of every
49:19 single T you already made and like is it
49:22 just like a very arduous process is it
49:24 very like no I mean it's a it's a it's a fairly
49:27 fairly
49:29 um that's a fairly fun and artistic just
49:31 thing it's like you imagine this kind of
49:32 natural feature and then you try and
49:35 make a tile that creates that one or a
49:37 Ser usually you make like a tile system
49:38 because you want it to be able to appear
49:41 in many different ways so like
49:45 um um yeah if you have a specific like
49:46 little sort of small path then you
49:49 usually have several like lower parts of
49:50 the path and several possible higher
49:52 levels of the path and and stuff like
49:54 that so that's usually that's the kind
49:55 of work you do at the end of the day
49:57 when you're tired and because it's
49:58 fairly relaxing and you just build a
49:59 bunch of different shapes try them out
50:01 see what they look like uh actually a
50:03 common thing though is that I make some
50:05 really cool shape but that require some
50:09 very specific context to show up yes and
50:11 then they don't show up for ages uh so I
50:12 should probably write a better system to
50:14 like ensure that something shows up in a
50:17 some way after I've created it so I can
50:19 see that does this actually work uh but
50:20 sometimes I've made a piece try to make
50:21 it show up it doesn't show up and then
50:22 just like a couple of days later it's
50:24 like oh there it is oh that looks pretty
50:25 cool or that looks bad I should remove
50:27 that one uh those are like usually for
50:30 the the the pieces that solve for really
50:32 weird cases require very specific
50:34 context to show up yeah a second
50:37 question is for the pathing uh is that
50:39 also part of the Importer is that yes
50:42 it's part of the yes analyzing so it
50:45 does uh both all the all the little
50:46 triangles depending on their materials
50:49 they know if they're pathable or not but
50:52 it takes that information so in the the
50:53 the game that's probably going to end up
50:56 on top of this uh that that information
50:57 will be used straight up and it will be
51:00 treated as a navish basically uh but the
51:03 simplified layer of pathing that you see
51:06 um uh here that's that's based on that
51:09 but it's it's like creating the the most
51:12 abstract representative version of that
51:16 uh as possible yeah um yeah so it
51:18 ignores the internal pathing within a
51:19 tile for example and just sees how it
51:23 connects to the borders yeah so Oscar uh
51:24 if you can reveal this the game that
51:27 sits on top of this yeah uh
51:30 so do the players interact with the with
51:32 the island as as before or is has
51:33 nothing you know the geometry you
51:36 generate has nothing to do with a game
51:38 well I'm so I'm building it with bad
51:41 North in mind okay which was this thing
51:43 um which is uh so you in that case you
51:45 send little armies around and they move
51:49 on the tiles uh yeah yeah this this one
51:52 wouldn't a bunch of these systems in
51:54 this one wouldn't work in a townscaper
51:57 style environment because uh Like This
51:59 Global texture for example would be
52:02 basically like it would be a I mean you
52:03 could probably do something where you
52:05 update con yeah uh but it would be
52:15 envirment hi Oscar I'm a fan of BOS and
52:18 the transcri I love your game very much
52:21 uh I want to know when you develop your
52:24 uh tools how do you ensure your
52:28 functionality will work properly
52:29 properly [Music]
52:32 [Music]
52:34 um I mean I don't have a special I just
52:36 try things and see if they work and try
52:39 it over and over again uh so like
52:41 actually preparing for this talk because
52:43 then I needed to like most of these
52:45 things I've built as visualizers as I've
52:47 developed them but preparing for this
52:48 talk I like polished up the
52:50 visualizations and uh like tried to slow
52:52 down the algorithm in different places
52:54 and I discovered a bunch of bugs uh and
52:56 things that didn't like especially with
52:58 the pathing thing that didn't work out
52:59 and all kinds of things so there's a
53:01 very good cleansing process in like
53:02 going through everything again step by
53:04 step and like oh this is supposed to be
53:05 working but it's not anymore uh so
53:07 there's a lot of that happening because
53:08 it's I mean it's probably even worse
53:10 with like the new like this is a bit of
53:13 a black boxy algorithm as I guess is the
53:15 problem with neural net stuff as well
53:17 that you don't it's not it's black boxy
53:19 in the way that the data is so big and
53:21 so abstract that it's very hard to
53:24 visualize what's going on uh so like why
53:27 do some possibilities get eliminated
53:29 from the possibility space uh like so if
53:32 there's errors there it's very hard to
53:34 it's very hard to catch you usually have
53:35 to if you suspect there's something
53:38 wrong you usually have to write write
53:40 specific visualizations for that thing
53:41 but a very important part of my process
53:43 is to visualize the algorithms as I'm
53:45 writing them and doing this kind of
53:47 thing where I deliberately slow down the
53:49 algorithm and run it step by step to see
53:50 what's actually happening that's a good
53:51 way of
53:55 catching um uh catching bugs and seeing
53:57 if you're doing doing a necessary work
53:59 somewhere or like yeah seeing how things
54:09 yeah um um H maybe I missed this but how
54:13 did you um get inspired to use W
54:16 function collapse SL model synthesis for
54:18 your game development and do you know of
54:22 any prior examples in the game Space
54:23 this I know there are some other ones
54:25 that do it now I think I was one of the
54:26 first ones to do it like properly
54:29 especially for train generation I think
54:30 uh I actually like I I've been
54:32 interested in tile based procedural
54:36 generation for a long time and I
54:39 um I'd been thinking about like how do I
54:41 get sort of features that stretch across
54:42 multiple tiles and I've also been
54:44 thinking explicitly about like is there
54:46 a way to derive constraints from the
54:48 ways the tiles look to actually figure
54:50 out what's possible to build from them
54:51 and I'd been thinking about that and
54:52 then I came across a wave function
54:53 collapse algorithm of course I don't
54:54 know how many of you have seen the like
54:56 original implementation of it but that's
54:59 doing things on like a pixel art thing
55:01 it's not 3D tiles but since I've been
55:04 thinking about these this problem I
55:05 immediately recognized that oh this
55:06 actually this exactly solves the thing
55:08 I'm trying to figure out uh so then I
55:11 got um like working 3D thing up and
55:13 running fairly soon after that and then
55:15 I first I tried to do these beautiful
55:18 colorful environments Urban environments
55:19 like in
55:21 townscaper uh I didn't manage to put a
55:23 fun game on top of it uh because I
55:25 wanted it to be nice peaceful game
55:26 peaceful games are hard so then I made a
55:29 violent game instead bad North it's easy
55:31 to make fun violent games uh but then
55:33 after bad North I was going no this time
55:34 I'm just going to do the just going to
55:37 do the beautiful buildings and I'm not
55:38 going to put a game on top of it
55:40 whatsoever it's just going to be nice
55:46 yeah jump in um so you mentioned the
55:48 advantage of pathfinding for for this
55:50 particular approach yes do you feel like
55:54 you made any um artistic compromises by
55:57 that needing to par
55:59 or to put it the other way if you had
56:00 agents that didn't need that pathf
56:02 finding data but could still move around
56:05 whatever you generated would you do anything
56:06 anything differently
56:08 differently um
56:11 um
56:14 a I don't know I mean because to me
56:16 pathf finding is a really aesthetical
56:18 thing in of itself right you're really
56:20 intrigued if you see an Environ and and
56:22 has got little staircases or little
56:24 ladders or stuff like that and you start
56:26 to imagine how a person would walk
56:28 through this space I mean like
56:31 townscaper isn't uh it's not constrained
56:33 by pathfinding there's sadly nothing
56:35 walking around here whatsoever but
56:37 they're still like here's a little
56:39 ladder going up like this and I Tred to
56:41 make it sort of believable so that
56:43 there's not too many ladders and not too
56:44 few ladders and there's a bunch of
56:46 things like that and there's like little
56:47 you know here's a ladder going up to the
56:49 side of that house and there's little stair
56:50 stair
56:53 so pathfinding I mean sort of
56:56 an making it pathable is sort sort of
56:58 aesthetic in and of itself but also I
57:00 mean with any kind of game in mind you
57:03 that's the pretty core requirement uh
57:05 anyway yeah so I've never really thought
57:06 what I would do if I didn't have to do
57:08 that I think this is a nice example
57:10 because it traditional nav mesh if you
57:12 were doing that on this and you're
57:14 making that deconstruction constantly
57:15 it's going to be really hard to rebake
57:18 that Nev mesh every time yeah but if you
57:19 had a bunch of autonomous agents that
57:23 weren't dependent on uh a nav mesh or or
57:25 that graph already being there and that
57:27 they could just drop and player destroys
57:30 or builds whatever with your your your
57:32 tool but the agent still naturally
57:34 Traverse through that space but also the
57:36 thing about a tile-based environment is
57:38 you can keep a nav mesh in the tiles you
57:39 don't have to you don't have to run a
57:41 normal nav mesh algorithm to reconstruct
57:43 a huge nav mesh for the whole thing you
57:45 can just have little nav mesh Snippets
57:47 or just uh like I'm in bad North I I
57:49 explicitly made little bits of nav mesh
57:50 that sat on top of the tiles like as
57:53 meshes uh but in the new project I'm
57:55 hoping to just use the mesh as it is and
57:57 just cuz it's all already marked up with
57:58 different materials and what's navigable
58:01 and what's not um yeah so you actually
58:03 you you sort of just skip all the
58:05 expense the entire expensive nav