Game Engineer

ArchiTacTools

ArchiTac Building System

 
 
Player Building System

Player Building System

ArchiTac - 2019

ArchiTac is a building game that is currently being built in Unreal Engine. Being that I was in charge of the building system, I will be blogging on the overall development process of the building system as I work on it.

Built-in Unreal Engine primarily with C++:


September 2019 - October 2019

Post prototyping after getting greenlit, I decided to go back to the drawing board to figure out how the building system should function from the ground up. I had two core engineering design goals that I wanted to fulfill:

  • Team Friendly: So that other team members could touch different aspects of it simultaneously. (Both visually and functionally)

  • Extensible: Various building pieces that will be added will have to have different constraints and functions, so many aspects need to be reusable.

My design approach can be summarized as follows:

  • World Grid Actor: Represents the basic grid bounds and basic divisions of the building world. Every block unit in the world is constrained to an IntVector map. Every IntVector represents one 1x1x1 unit of space.

  • BlockSetActor: Represents a singular building piece that can be built in the world. Represents a set of blocks that are predefined. It can be looked at as a metaphor for different types of Lego pieces.

  • BlockActorComponent: Every building piece can take up various configurations of space. Each basic 1x1x1 unit is considered a block. This component or multiple copies of this component represent this configuration. BlockSetActors use this component to define how it is configured spatial-wise.

  • BuildingPawn: When building, a block set doesn’t become part of the word until it is attached. The building pawn represents the player in figuring out where a block set can attach to the world. The management of the WorldGridActor and BlockActorComponents allows the system to set basic spatial constraints, as well as check adjacent blocks easily without the need for a cast-based checking system.

Arguably this design acted as a good base to work and iterate off of. I planned that as more constraints and features were added. We would add them via Unreal Engine inheritance and components. If a Block Set generates resources, we give it a resource generation component. If a Block Set has build constraints, we configure those constraints via additional components or inheritance.

The following were finished during this time period:

  • Core Building System.

  • Basic UI Hookup.

  • Basic Constraints.

  • Basic Requirements.


Modified Unreal Engine Handle Tools

Modified Unreal Engine Handle Tools

Component Visualizer for Block Components

Component Visualizer for Block Components

October 2019 - November 2019

Coming into November, it became evident that I would need to develop tools to assist in both visualizing the building system, as well as level designing worlds with the building system.

Placing BlockSets in the map editor: Considering we would have to level design pre-built levels for the player to spawn and build in. We had to make sure that those levels followed the same constraints of my building system. Manually placing and lining up pieces in the world would take up too much time and slow down the level design process. And so I created two core systems/tools to automate and ease this process:

  • Auto Constraint: On level load, the building system goes through all block sets existing in the world and auto constrains them to the proper world index positions. Ensures that every block set in the world always lines up. and that no two block sets will ever overlap. This process performs some arithmetic rounding to calculate index positions based upon rotation and orientation.

  • Modified Unreal Rotation and Translate Handles: I wanted to modify the default translate and rotation tools in Unreal to always constrain placement to my build system. Reusing my auto constrain system above. I rigged these tools to follow my constraints when placing block set inherited actors. It works out pretty well despite how rigged it felt to hook it all up.

Visualizing Blocks: When configuring spatial take up of block sets, it helps to visualize the configurations of how the block set takes up space. And so I created a component visualizer to visualize the rotation points and blocks of the block set. This helps in determining the dimensions as well as how meshes should line up in terms of block space.


December 2019 - February 2020

Building Controls 2.0:

I would soon have to revisit the controls that players would use to build things. The current controls were too complex for users to use. And so I decided to take a look at Fortnite’s building system as a point of inspiration. A couple of problems became evident that I would have to resolve:

  • Block Set rotation has to look in place for the user. This is so that the block set looks consistent from whatever side you are on, and is placed consistently.

  • Block Set center needs to have the ability to be defined on a corner. This is so that placement is consistent and doesn’t change based upon the block set’s orientation to the player.

  • Block Set Build Prediction. I need to predict where the player is trying to build by doing a sort of “build cast”. Ruling out locations that they would not be able to build.

Rotation in place

Rotation in place

Movement

Movement

Placement Prediction

Placement Prediction

The introduction of new controls brought up many evident problems in my underlying building system that I had to simplify and rework to work with the new controls better. Functions had to be refactored to make casting easier. Calculations of origin indexes had to be changed so that things could rotate in place.