Our map doesn’t look very organic, let’s add some water by eroding the edges. We’ll start by using Linq get us the coast tile and then disable a specific percentage.
- [Voiceover] Now, one of the ways that we can…make our island look a little bit more organic…is by removing some of the coast tiles.…In order to do this, we're gonna need to create…a method that'll allow us to get the coast tiles,…which should be easy to find.…If you remember, all of our grass tiles…which represent the inner tiles inside of our island…are set to the value of 15,…so if we look for any tile that's less than 15,…we should be able to find the coast pretty easy.…In order to make this even easier for us,…we're gonna use something called linq…to allow us to do a query against the tiles array.…
At the top of our class,…let's bring in the system.linq namespace.…Next, underneath our public fields,…let's create a new public property.…Its return type will be an array of tiles,…and we'll call it coast tiles.…Inside, we'll use a getter.…And in our getter,…we're gonna return the value of the tiles that we find.…We'll use linq to query the tiles that are less than 15.…We'll start by accessing the tiles array…
Released
5/16/2016- Setting up the project
- Creating the tile, map, and map tester classes
- Visualizing the map
- Creating a moving camera
- Autotiling and bit shifting
- Decorating the map
Share this video
Embed this video
Video: Create the coast