For this week, we were told that the next two lessons we were going to focus on a brief that would, in the end, provide some methods and features that we could potentially include in our assignments. The assignment brief asks us to make a Real Time Strategy game of any type (Tower Defence, MOBA, etc.) so for the next two weeks, the game brief is to make a basic RTS game.
The first step we did in the creation of our RTS was to make a basic terrain. To the amazement of our tutor, we had never used Unity’s Standard Assets before, more so that we hadn’t used Standard Assets in his class yet. After being given Standard Assets separately, we proceeded to create and texture our basic terrain. I went for the dry, patchy-grass look.
Terrain added, Check! Next we incorporated a potential obstacle, which stands in place of a building that the player could have previously placed on the terrain. We added a unit to the playing field and set up a NavMesh component on the terrain. A NavMesh Agent was added onto the unit and a NavMesh Obstacle was placed on the obstacle.
We then were shown two specific camera tricks. The first gives us the ability to move the camera in any direction, based on where the mouse left the screen. The other camera trick modifies the y-axis on the camera to zoom in and out, with limits of min and max zoom distances. Both were very interesting and will be very helpful in future game developments.
The next part was exciting. We were taught how to add the ability to select a unit, and then click somewhere else to move it to that location. I love this feature, it seems so fancy to me.
A thing I would recommend you remember, is when typing out your script, make sure any tags you reference actually exist, as a problem I ran into was that the units would move through the ‘obstacle’ like it was nothing. It turns out, the obstacle was not tagged as ground (a temporary fix, should have created a separate tag called Obstacle).
The reason why the game did not give an error when it was compiling is because the actual ground was validly tagged as ground, so it did technically exist. This teaches me for not tagging objects correctly, to solve this, I could have, as I previously said, set the obstacle to have a new tag named ‘Obstacle’.
Next week we will continue to work on this game brief. The plan is to implement a method to select multiple units at once and move them around like you could with a single unit. Also we will be placing buildings. Hopefully we find a way to detect if we are trying to place a building where we don’t want one. We do not want a building on top of another building, or a building to be placed on top of units.
This is Daniel Jochem, signing out.