DevLog_03: A Change Of Scenery (Self Study + Tutorial)


Ahoy!

This week, I started working on building an environment. The open ocean was great, but no one could get to the ship to buy tickets, so we needed some land to use as a port. But first, I had to learn how to create environments in Unity.


Making Terrain

I first learned how to make terrain by reading the Unity documentation. I used that knowledge to make a lump on a flat terrain—a great start!

Figure 01: Making lumps.


After this success, I added the new Unity Terrain Tools and learned how to use them by reading the documentation and through wild experimentation. I downloaded some textures from the Unity Asset Store (referenced at the end) and started painting textures, as well as trees and rocks. This gave Chad a place to live. The camera’s draw distance conveniently makes it look like the trees at higher altitudes don’t have leaves. 😁

Figure 02: The New Island.


Making Structures

Next it was time to build the dock. I started by reading some more documentation, this time on ProBuilder. But then I quickly got bored and found a YouTube video by DebugDevin that covers the details in a more interesting way. I then played around with ProBuilder, creating stupid-looking abstract shapes that had no right to exist.

I needed to model the dock for the ship, so I used Apple Maps and my memory as references for the entrance to Brooke Street Pier in Hobart.

Figure 03: Apple Maps view of Brooke Street Pier.


I used stairs and cubes to make the majority of the entrance.

Figure 04: Stairs.


The Devil's in the Details

The area was pretty boring and not fun to navigate, so I decided to add some sort of obstacle course to roam around in. I added a couple of different ramps to see if Chad could move up various angles. Then, I created a balcony and added some props. I also downloaded more texture assets to get some nice concrete, wood, and tiles.

Figure 05: Floating Concrete?


Figure 06: The Obstacle Course.


Then, I remembered that the pier actually has a shed where you can buy tickets. So, I moved the obstacle course around, modified a cube to resemble a building, and drew up some windows in Photoshop. I also remembered there’s a pink rocket at the pier, so I modelled that using ProBuilder and applied a pink material to it.

Figure 07: The Final Product.


The docks are now complete!

Figure 08: Cheeky wave.


NavMesh

Next, I created a NavMesh so that the AI could move around the map without input. It mapped pretty well, though there was definitely some jank around the stairs—but they still seemed to work fine.

Figure 09: Picture of my sketchy NavMesh (AIChad can walk on the blue).


A-Aye Movement

Getting AIChad to run around on the new blue NavMesh was easy enough, but I needed him to predict where PlayerChad was moving. I wrote a couple of lines of code and added a little red debugging line so you can see AIChad’s predictive skills. If the player stands still, the AI moves towards them. But if the player is moving, the AI tries to predict their path and intercept them.

Figure 10: Raycasts Predicting Movement.


Time for an AI apocalypse. I wrote some more code to capture the cursor’s location when clicked and spawn an AI there. Who knew Chad’s entire world could end with just four lines of code!

Figure 11: Spawn On Click. AHHHH.


Combining the AI’s predictive skills with movement led to this nightmare. Some say he is still running to this day.

Figure 12: It Follows.


It turns out the AI just want to mosh.

Figure 13: One Of Us.


That's all for this week! Thanks for reading!


References:

Aerial Map Photo: Apple Maps

The Fastest Way to Design Levels in Unity 6 (Pro Builder Explained) by DebugDevin: https://youtu.be/qV2o1D1uWgE

Water Stylised Shader by AzureDevGames: https://assetstore.unity.com/packages/vfx/shaders/water-stylized-shader-orto-per...
Terrain Sample Asset Pack by Unity Technologies: https://assetstore.unity.com/packages/3d/environments/landscapes/terrain-sample-...

Free Stylised Textures by LowlyPoly: https://assetstore.unity.com/packages/2d/textures-materials/free-stylized-textur...

Mountain Terrain, Rocks and Trees by Jermesa Studio: https://assetstore.unity.com/packages/3d/environments/landscapes/mountain-terrai...

Rock Package by Shui861wy: https://assetstore.unity.com/packages/3d/props/exterior/rock-package-118182

Fantasy Skybox Free by Render Knight: https://assetstore.unity.com/packages/2d/textures-materials/sky/fantasy-skybox-f...

Realistic Terrain Textures Free by ALP: https://assetstore.unity.com/packages/2d/textures-materials/nature/realistic-ter...

Worn Wooden Crate by Golden Pixel: https://assetstore.unity.com/packages/3d/props/furniture/worn-wooden-crate-24673...

Generative AI was used to check the spelling and grammar in this post (ChatGPT 4o).

Leave a comment

Log in with itch.io to leave a comment.