Making of RPG prototype
The RPG prototype is a mouse and keyboard action RPG with similar controls as a Diablo game. The goal of this prototype was to learn how to build a world using the Unity terrain tool and free assets from the Unity asset store. The first thing I worked on was the character controls which works with a modified “Third person character” script from the Standard assets pack and a Nav Mesh agent. After getting the movement I wanted to add attacking. I implemented a simple damage system where if the player within range it damages enemies by clicking on them. Similarly the enemies have two range one for follow player and another for start attacking. You can see these range in the scene view thanks to a simple OnDrawGizmos call:
void OnDrawGizmos()
{
//Draw attack gizmos
Gizmos.color = Color.blue;
Gizmos.DrawWireSphere(transform.position, chaseRadius);
//Draw attack gizmos
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(transform.position, attackRadius);
}From this exercise I learned that getting the right proportions is harder than I originally thought. Working with a lot of free assets that all have different sizes you can sometimes have a flower which is bigger than a tree or a house. To correctly resize these assets you need to take a point of reference which if possible should be the player size or at least something which won’t change size.
Before placing the assets around the world you need to define the camera view. Having a locked camera angle means you need to somehow make the prominent features of your assets face the camera to some degree. You must pay attentiong to the height of your assets too. If the player can go behind a house, that house must be small so that you can see at least part of the player. You can also restrict the player movement by startegically placing transparent colliders in places the player shouldn’t go.
I also enjoyed making the water for this prototype. I fused two free water shaders to make a cool effect without being too resource heavy.
The asset store is great to make fast prototpes like this one and lets you focus on the things you are most interested in. I recommend people to try out these type of exercise where you give yourself a small goal to help yourself learn and improve your skills.