7

During the last 4 days I made major progress from just an empty area with light to a fully working prototype. My aim was to make a fully complete part of the game, so that after the playtest I can just enlarge the environment to explore and find keys.

First of all from the previous test I figured out that a plan is needed before continuing work with lights and further with puzzles and scripts.

I developed schemes for the current level I’ll be developing now and additional areas according to my scheme from the thesis.

area 2

area 1

As you can see, I have separate schemes for the intended route (but the player is still free to explore the whole area), corresponding light path and what tasks to complete to proceed further. (I believe that thus wayfinding can be considered as a puzzle itself, but I’m afraid that just wandering around may seem boring. So some simple puzzles will be a benefit). My focus for now is area 1. And the first thing I did is I finished modelling (as it lacked half ) and set up the ligts according to the plan.

Due to I needed to fit in parts of the whole gameplay into a small area, I adjusted area plan, so that for now it can be the game in itself. So the goal is to find 3 keys that will open the main door. In full game they will be distributed over all 3 areas, 1 key per area. But for now I’ll distribute them across just one area, but different parts of it. Aslo I had to adjust puzzle purpose. In full game the puzzle will open a door to another big area, but for now it will just unblock access to the other half of the same area.

puzzle final version

Later the puzzle will open this door to a sub-level:

Start scripting

First I decided to make the main mechanics work: trigger 3 keys to open the main door and the cube puzzle.

Keys script was made pretty fast and easy, where I finally learnt how to reference variables from one script in the other one. I also connected it with door animations, which works as planned. So now I can place the keys anywhere across the map, and the mechanics will work.

There might be one feature under the question. If I don’t manage to add the rest of the emvironment to the same scene, I might have to learn how to save the data with scene change. Thus I managed to optimize lightmap generation, so I hope that scene change will not be needed.

Secondly, the puzzle mechanics, which requires player to trigger correct cubes to open the door. Player is able to activate and deactivate cubes (it changes colour) on collision. And though this script seemed easy, I had problems that required me reserching the topic for a couple of hours. But eventually the cube worked as needed:

I wanted light to be the hint to solve the puzzle, so initial idea was to have a light source attached to each of the cubes. The right ones will have a greater intensity, so by walking near each of them, player will understand which ones to trigger. And with that idea I completed the whole puzzle (which took a lot more time than it can seem. With solving all bugs it took around 12 hours).

But I still didn’t like the look of it, and after some time I realized that I can just use the surrounding lights as a hint. So now the right ones are those that are touched by the light strains from the window. It might be less obvious, but when I develop the concept of light showing where to go and what to do throughout the game, this will be more obvious.

The rest of work was to create light for the second half of the area (what I had to do twice due to a glitch when reimporting the model + unity freezes after a couple of times regenerating lightmaps) as well as constant testing and fixing minor bugs.

I aslo tried introducing cut scenes when puzzle is solved and all keys being triggered to show feedback to player and hint on what to do next. I learnt ot animate and switch cameras (and might need to learn Cinemachine for future purposes). Overal a lot of minor technical work that consumed a lot of time.

UI

Lastly, the UI is needed like main menu, pause menu etc., which took me another day in total. I wanted to make the menu with nice animations, pop up windows etc. As usual there were tons of minor bugs to solve like lock/unlock cursor (especially in pause menu), unclickable buttons, keys triggering windows or animations at incorrect times, but most of that was solved successfully. Finally I made some work with audio, just background sounds, separate for menu and game, game sound keeps playing with scene change and stops in the menu (which was also a trick to do). Final reasult you can see below:

To Sum up:

I just want to make a lits of the new things I learnt during this small amount of time:

reference variables from another script

working with mesh renderer component and switching materials on collision

activating stuff after puzzle is complete

DontDestroyOnLoad command and ways to access such objects via script

press any key command

pause menu

lock/unlock cursor

raycasting targets

pop up UI elements

and fast search for answers to coding questions

What’s next

I rushed this buld so much to make a proper playtest this week what will tell me, where to go further. This is already can be considered as a very small, but complete project, so at least I’m not panicking that I have nothing to show for thhe assignment. If playtest doesn’t reveal major problems, I’ll spend the rest of the time adding the rest of the area (what will be more interesting for orientation and key finding) and some more simple puzzles based on the scripts I already have. I’m also thinking to adding some kind of story or comments that player can also find if they explore the area more. Something like the Begginer’s guide. Something a bit philosophical or conceptual. But that will be after I complete the main part and some time is left.

Leave a Reply

Your email address will not be published. Required fields are marked *