Getting into the thick of it (Weeks 3&4)

Oct 16 – OCT 29

I got a lot done in these two weeks. I dived into AI behaviourtrees and expanded on what I had done before. A lot of my time was spent on the item delivery system, and on restructuring the class-design. I hit a lot of obstacles I didn’t expect, but managed to solve them. We also had the first presentation among our peers.

JobManager

The item-delivery system had the top priority for me, as it was at the core of the gameplay loop. I had attempted to make this game a year before already, in Unity, and that mechanic was where I hit the first major obstacle, which I never came back to. This however meant that I had thought about it before, and that I knew it was a difficult topic, so I spent much time off the computer thinking about how to implement it.
I’ve written a detailed post about this feature here.
During these two weeks I changed the system around a few times, and refactored the code a few times too. By the end of October I had a reasonably efficient system I could work with for the time being.

First Presentation

Our First presentation took place on October 26th. It was called a “pitch” presentation, but I didn’t want to sell the game to anyone yet, nor try to find more team members (I knew everyone already had a group) so instead I used the pitch to simply tell everyone what I was doing. Most of the other groups had a similar approach, so I could really get a good insight into the other projects.
I mainly used my presentation to highlight the importance of economy in Warriors and Serfs, and to explain my different goals for the project.
I really enjoyed making this presentation, and spent around 8 hours on it in total, fine-tuning the animations. The presentation itself took me 8 minutes, when I already skipped over some of the details though, so I should’ve spent more time on timing it correctly.
The presentation can be viewed over googledocs here.

Player

The concept of the player was always a little harder to grasp on RTS game compared to other genres like FPS, RPG or Platformer games. There usually wasn’t a “Player” object in these games, the player generally took the form of a flying camera without a body. The same was true for Warriors and Serfs, so that’s the approach I chose for the Player Actor. I wanted to implement a free-cam, meaning the player could fly around the world and get as close as they wanted to their city, rather than a super static top-down camera, especially since I had a 3D game. Although the implementation of this didn’t feel very clean, I managed to make it work and feel good on the player side, and prepared everything for the implementation of click events that I would start on the following week.

Class Restructuring

At the start of these two weeks, I had a Lot C++ class, with a Building C++ class inheriting from it, and a blueprint class inheriting from each. As I progressed on the JobSystem I realized that was a pretty stupid approach, because I wanted the Building blueprint to inherit from the Lot blueprint too, but in Unreal, you cannot inherit from two different classes. So I took what I changed in the Building C++ class (the recipie and production / crafting stuff) and turned it into a component instead.

I also realized that Warrior and non-warrior subjects should behave radically different, so I split the two into a Warrior and a Civilian Blueprint, each inheriting from Subject. I inherited Serfs and Builders from Civilian directly, because they are special in their own way, and then created a Harvester and a Craftsman blueprint inheriting from civilian, from which the final subjects -Lumberjack, Carpenter, Farmer etc- will inherit from in turn.

Game Screenshot

This is what the game looked like at the end of week 4. You can see the 4 different buildings, and some Serfs carrying items around.
You might not really see that, but believe me, it’s happening!

GameScreenshot Oct 29

Leave a Reply

Your email address will not be published.