top of page

3. Implement and analyze fundamental data structures and algorithms associated with game applications supporting gameplay mechanics.

Text Adventure Game

textadventure.gif
  • Text Adventure game made in Visual Studio.

​

  • This game comes in with the player's stats on the top left corner.

​

  • Then you can navigate the world with the action buttons shown below.

​

  • Also, I implemented a quest and an inventory so that players can know what they are doing and what they have in their inventory.

txt3.PNG
txt2.PNG
  • This is the code used for the class Location in order to implement the locations that the player would be visiting.

​

  • On this code it comes with recognizing the player's Id, also knowing if there is a quest in that location.

​

  • It will also give a description of the place the player is in.

​

  • There are some places that would need to you do a quest before you enter them in which I added a roadblock to these places before the players could enter.

​

  • After completing the quest needed the code looks for the quest Id and if it's done it lets the player in the next location.

  • This is world-class in which has everything that the player will interact with.​​​​

​

  • In this part of the code, I show you how I use the Location class in it.

​

  • Here I use the location class and create each and every location in the game.

​

  • After creating the location with its description also using other classes if there are quests that are available in these places.

​

  • In the end, we link the places together as it will go on in a sequence on how the player enters the areas and which areas are near the other.

​

  • An example could be Town Square if you go to the North you will go to the Alchemist Hut.

  • This is the subclass creatures in which the creatures or enemies appearing in the game will have all the variables used in the player class such as hit points and how much damage they do to us.

​

  • Adding to this subclass I added how much gold they give when you defeat them.

​

  • Also if these creatures are defeated they can also give you items needed for some quests.

txt.PNG
txt1.PNG
  • This here is how to get the quest to work in our adventure game.

​

  • For each quest, it will check the class player's quest so that we can give the player a quest.

​

  • Then if the quest is completed it will check and return an Is Completed bool when it is true.

​

  • Then the bool what it does it checks the player's inventory to see if he has the items needed for the quest to be completed and if he has he gets a reward.

Fps Survival Ground

fps.gif
  • A Unity FPS Survival Ground.

​

  • The objective of the game is to survive and get as many points as needed.

​

  • There will be items that can heal and a lot of enemies to defeat.

​

  • Also, there are two types of weapons you can use to search for them.

  • So for this game, we use Ai players to not only chase the player around but to do more than just chasing and patrolling.

​

  • In this part, it shows how the Ai chases the player by going into the Ai chaser radius it will start chasing the player.

​

  • Then not only will it shoot the player but it will face the player in the direction the player is and shoot him.

fps.PNG
fps2.PNG
  • In this part of the code, we made the Ai have a memory to remember the player once it has already face him.

​

  • We gave the Ai memory time so that it still chases the player after it out of the chase radius.

​

  • Once that time is up if the Ai doesn't hear the player it goes back to patrol.

​

  • Also if the Ai is able to hit the player this is what will trigger the Ai to know who is the player and recognize the enemy it has to shoot.

  • This will be the noise check we made for the Ai to check when the player makes a noise such as shooting.

​

  • With this, if the Ai is patrolling and it hears the player it spins in the direction of the player and will start to navigate to that point where the noise was made.

​

  • If the Ai has not seen the player yet it will go to that position where the noise was made and stay there for five seconds.

​

  • If the Ai didn't see the player it will go back to its patrol system.

fps1.PNG
bottom of page