[Almost] One Room Post-mortem – Part 2

Posted by
December 22nd, 2016 6:21 pm

On the first part I wrote about how it was the birth of the idea. Today I want to talk about execution and learning, because if you remember correctly, the main idea was to learn Unreal Engine 4.

The starting point was to let the player find a number combination for a door. Every number will be in a copy of the same room, but every room will be lightly different.

We started thinking how to hide the numbers and we wanted to go beyond the easy way of hiding behind the furniture. We wanted the player to think out of the box, and our main fear was to make puzzles too hard to be guessed. With the time restrictions of a jam the harder part is to balance a game, and to balance something as subjective as a puzzle difficulty is only doable if you can make people play it, we hadn’t people.

The first thing we did was to draw a generic room layout with 4 doors, one on every wall but not in the center. Rooms in real life don’t usually have the door in the center, it wastes too much space and from a gameplay perspective, it will limit what you can place there and may compromise room walkability.

almost-one-room-postmortem-room-videojuegos-zehngames

On the other hand I’ve started “coding”. For those who have not worked yet with Unreal Engine 4, it has a visual programming system called blueprints. In the editor you create logic by connection boxes; for example, you have the “branch” node, it receives a boolean expression and it has 2 outputs, one for true and the other one for false evaluation, the flow of the code will go from one output or another depending on the result of the expression, exactly like an if-else statement on traditional programming.

The first thing I coded was the num picker the player will use to put the numbers of the combination. The idea is simple, you will have a collision box to know when the player is next to the picker and everytime the player hits the mouse left button, we will increase the number up to 9, then, it will go to 0. Also, we will need various of these number pickers because the combination will have 5 numbers and every picker lets the player to select 1 number from 0 to 9. To be able to reuse this asset we will create a Blueprint Class, something like a object oriented class that groups code and other assets. In our number picker blueprint class we will have a box mesh, a UI text widget, the collision box and the code. We will be able to instantiate as many as we need and we will be able to access its public local variables to interact with them in the level blueprint.

almost-one-room-postmortem-blueprint-videojuegos-zehngames

Honestly, I’ve been coding for more tan 15 years and the mental switch you need to do to work with blueprints it’s remarkable. Not in terms of difficulty, in the end it’s logic flow and it does not matter if it’s a box or a code block, but more in terms of how do you have to do the flow. It’s hard to describe to me, because it’s not something specific. For example, for the num picker you need to increment an internal integer that stores the number on the picker, something that for me was a single line of code ( this.number = (this.number+1)%9 ) transforms in some nodes: a getter to get the value, next increase the number, then get the module and finally store it in the same variable. It can be done in less steps with a Math Expression Node, but it’s an example. What I’m trying to explain is that even when you know how to code the learning curve of the Engine, specially learning where do you have to go in the editor because it’s full of buttons and windows and tabs.

Back to puzzle design, we decided that we will need to teach the player that he needs to find numbers. That’s why we locked all the doors in the initial white room and put a first codelock there. Also this first puzzle is the easiest one, a giant black 35 in the ceiling, only partially hidden due to it’s like an humidity stain. Locking the player also gives us the moment of surprise when he opens the doors and finds the same room over and over again.

almost-one-room-postmortem-35-videojuegos-zehngames

Once Carlos told me how the basics of blueprints and the event system I started to prepare the door unlock code. Meanwhile Carlos was working in the assets we will need, the furniture, doors, etcetera. We needed functional and easy to create assets and whats more generic, easy and reusable furniture in the world? Disclaimer, no brand or company funded the creation of our game. IKEA of course! :V

We relied in UE4 vertex painting tint every room, we used a material with a color parameter in some assets, giving us an incredible power to get all the rooms done with a minor impact in performance and a huge time saving. The only texture applied to the assets was a baked ambient occlusion to give them the correct shading.

Finally to create the puzzles we used different techniques. For the distance one is a simple material that changes the opacity depending on the distance from the camera. Something similar happened with the reflection, we have a copy of the same room below and the floor uses a material that changes the opacity in this case with a Fresnel function. We wanted that the details that changes in every room helps the player to find the clue. For example in the light one there is a second lamp, no other room has it, the green room is the only one where the statue is different.

And it’s all, we wanted to do more content, but I’m happy because we marked us a minimum product and we delivered it as we imagined it, but the process was good enough that if we had more time, more content would be done fast, spending again the major part of the time designing new puzzles.

Many thanks for reading, please play the game, rate us and please comment, we need your feedback!

Tags: , , , , , , ,


Leave a Reply

You must be logged in to post a comment.

[cache: storing page]