Grand strategy game in #godot - How to make flat maps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello hello So today we're going to talk about like map generation there were a couple people that um have requested or were curious about how the map gets generated so let's get down to it it's very simple process so I decided to just make a very basic video so the first step is to actually get a black and white texture going so um you generate this black and white texture uh off of a reference image as you can see uh feel free to pick any reference that you that you enjoy and you just make provinces just like this right uh yeah just export it and yeah so this is the first step what is the next step does next step is to use hini you can use um you can either code the algorithm yourself to generate the meshes um some games most Paradox games tend to do that um but um I found that using hini was much much much easier and it's already essentially uh there for you to use right like you don't need to to code anything complicated uh there's still complicated scripts and things in gdau itself when reach to it but but I think Kini helps alleviate especially like if you look at the quality of these edges it looks really good so yeah so you take that black and white image and then you generate the message this way as you can see these are all newly added provinces um the note that I'm using here just for the sake of argument is the trace node and what you can do is off of this you can just save this as a geometry and then you can save it out as in your in any um any file format that you should that you wish for so yeah so you take your black and white texture you port into the export it and now you have a mesh so what you going to do with a mesh so the next step is to import it into blender I already pre- imported it uh as you can see here and then yeah these are you can uh observe your individual meshes here so now you have meshes how do you actually get this into Gau right so the next step is to Simply um copy this Spen file into your working data of gdau and open it up so this is uh the blend scene that I I want to call it and uh here I just literally just referenc the blend file and uh all edit it by itself as you can see this is a fantasy map. blend which uh is this blend file and as you and you if you're looking at the top right corner of my screen you can see all the different provinces here right and when you important to G do you have have exactly the same blend their scene structure as in the game so if you go back to the editor here you your PR is 02 03 and so on and so forth and the background as well so yeah so this is how you get it into gdau right but now how do you author ownership how do you generate connectivity or neighbors right because one of the things if you open up let's say if you mod any Paradox game you you will know that each province has unique color and the reason for that is is because you need to know unique IDs for each province the reason why I don't need it here and you can just use just a very basic and simple black and white texture is because each one of these nodes is is already unique by itself so since it's already unique by itself um you that problem is essentially solved right it does introduce another uh problem though which is you need to generate Neighbors in a different way and but for that is I have a bunch of map editor uh commands or editor commands that K has support for and yeah which allow me to to essentially generate all these uh Collision meshes as you can see um and shapes as well as set up all this type of like neighbors as you can see here and ground types neighbor counts and factions as well so for example if I want to like change the faction of this region I going to just do this right so this is all custom built in gdau itself but be but yeah if you just want to like get a bunch of meshes based off of a texture this is how you do it technically uh yeah one thing before I go is um I know that this is like a flat map so this technique allows you to generate flat Maps very quickly what about 3D maps let's say if you want to like actually have proper terrain editing in the sense of like a massive Ravine or like uh BAS of a height map well my friends you can do that um but that will probably become for a next video which I'll be doing some experiments on on how to do that um before I go I do want to show a bigger experiment that I've been doing as well I think it's yeah there we go so this is the entire map of Europe well not just of Europe Europe North Africa India all the way to the edges of China and then yeah as you can see the provinces are looking quite nice um I really that's that's the reason why I really like using hudini because if I were doing this through kod there would be a lot of polish that I would need to do yeah uh as always this is it so um thank you for watching and uh see you next time
Info
Channel: Strategy Corner
Views: 4,641
Rating: undefined out of 5
Keywords:
Id: OCbVwbSR_3s
Channel Id: undefined
Length: 5min 53sec (353 seconds)
Published: Wed Nov 08 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.