Amenti – 2

Second week of the project is now done! This week I have done plenty of stuff. All mechanics for the tutorial room is finished and almost all mechanics in the Horus room which is the next puzzle the player encounters, the fire/sun god puzzle.

I started off by working on the last mechanic in the tutorial room which was the perspective mechanic. We wanted that when the player is standing on a certain location and is looking at a certain point/object an event is triggered. In this case we wanted two door arches to come together as a door when the player was standing at a point looking between the two torches in the tutorial room. RaycastTutRaycast2Tut.png

At the moment the door arches are placeholder pillars and as you can see in the image there is a red line/beam being drawn out from the players location towards where the player is looking. We are using a function called raycasting which creates a vector from a start location (the player location) to a end location which is whatever we decide it to be, you can call it the raycast range. Between these point we have drawn out a red line for debug purposes which makes it easier to explain and show for others, but will not be drawn out in the finished game! Anyway, there are two components that is required for this to work, a triggerbox which checks if the player is standing in the right location which triggers the raycasting and the other component is the pillar that checks if the raycast is colliding with the door object. While the player is looking at the door one of the pillars will start moving towards it’s end location which is next to the other pillar that is already in place. When the pillar is at the endlocation one of two conditions to open the door is complete. The other condition is that the torches has to be lit next to the pillars. If both conditions are met the door will open. And that is the puzzle of the tutorial room done! We were two working on this solution of the perspective puzzle. I made the raycasting function along with the triggerbox and a door object that checks if conditions are met. While Erik the other programmer in our group worked on getting the pillars to start moving when raycasting on the door. Which might seem like a simple task, but it was more difficult than we anticipated. But now all mechanics are done and working as we want!

Besides that I worked a lot on the Horus room which uses the mechanics the player recently learned in the tutorial room but with a little higher difficulty. The only mechanic I had to add in this room was an elevator that the player can use to reach three different floors. Which I made without any major difficulties. I created a floor object on which I placed two lever objects. When the player approach one of the levers and press E it will either go up or down a constant x value in z-axis. While the floor is on the first floor the lever to go down cant be used and while on the third floor the lever to go up can not be used. With that done I could start prototype designing the Horus room. At the end of the week it looked like this:

First Floor:HorusRoom

Second Floor:secondfloorHorus.png

As you can see in these images there are torches on different heights in the room which requires that the player go to each floor to light them. The puzzle is done when the player has lit all the torches.

Here is the design concept I followed while creating this room:Horus Room.png

Besides this I worked on a AI for the small rats we will have later on in the next room, the Anubis puzzle which is all about taking life and giving life. The AI is really simple it is just wandering around to random location  within a certain radius. I also added a short delay after each random location is reached until it starts wander to the next random location, to give it a more likely rat behaviour. I added these since the player will be able to take life from the rats in order to give it to something else. At the moment they are tiny humans running around which looks hilarious. HorusRoom2 That is all I have achievied this week and I am pretty satisfied with what we have accomplished!

Amenti – 1

The first week of the project mostly contained a lot of planning and documentation which can be tedious but deep down we know that it is a essential part to make the project go much smoother.

Besides planning and documentation I have worked on the prototype of the tutorial room where the player is introduced to the core mechanics of the game. The majority of the mechanics are based on interacting with objects and picking up stuff, like fire, life or water. And it is my job as the lead programmer of the group to come up with a solution to make these mechanics work.

What I came up with was a  simple inventory system that stores items when the player press E on certain objects. The inventory it self is very simple since it is only a String Array which we add to when the player picks something up. A String Array is a list which only takes data as texts, so when the player picks up fire for example we add “Fire” to the list. This makes it very easy to add new items to the inventory. This was not very difficult to implement. After that I had to create a script for items which allows the player to pick them up and add them to the inventory. I gave the items a triggerbox property which sets a boolean variable to true when entered and sets it to false when the player exits it. This makes it so that the player has to be within a certain reach to pick the item up. I also created a String variable where you can set the Item name which gets added to the inventory when picked up. InteractionAmenti

When the player is within reach the green text appears in the upper left corner which you can see in the image above. Which tells you what button to press and the item name. This particular item is a torch and when picked up the fire particlesystem on the torch is turned off. I also added functionality so that the player can press F to light the torches while having fire in the inventory, which can be picked up from firepits or other torches.

TutorialTorches.png

The last thing I added this week was the functionality of the door. When both torches are lit the door is raised upwards. The door is a object itself and adds the torches in the tutorial room to a list. Thereafter it checks if both torches are lit and if so it starts opening, and that is about it!

This is everything I have accomplished during the first week which I am very satisfied with. It feels great to have the inventory and item system done since it will be very useful later on for our other rooms and puzzles. Besides this programming focused work I have also been prototyping the tutorial room “design wise” where I followed a drawn concept of the room that our Lead Designer Gustav made. Here is the design concept!tutorial room