Development has taken a slight turn and I had to scrap the enemies at this point. The reason is because I created a custom script that controls the player but it seemed to be interfering with the gravity in the game. This was becoming an issue because as I would create stairs and ramps the player would start to float when interacting with them. Instead of delving into my code to locate the issue I decided to deactivate it all together and continue with the more interesting aspects of the game such as an inventory system, locked doors, switches, etc.
I was able to add a roughly designed a GUIBox with a message that pops up when you can’t enter an area due to a locked gate. I then added a switch that the player walks on and activates that will trigger the gate to open.
What awaits the player on the other side of the gate?
It’s a treasure chest, that opens.
I have added an area in the game where the player will select which level they would like to play. In that area, the player will walk to a warp pad and will be taken to the corresponding level. I have a story in mind, but until I can flesh out at least 10 levels I will be keeping that a secret.
There is no real concept detailing what is going on in the video because I have not added any tags or cinematics, but I can break it down for you.
The first screen is the main menu where you will start your game.
The second area, after clicking “Play Game” is the area where the player will select which level they want to play. For this area, in the future, I will add hovering icons over the level that show the score the player received if they have played the level, and a few other details such as the level name.
Finally, the third screen is the “Game Over” screen which shows what score you have earned from the level you just played.
I updated the script that is used to control the enemy AI to include a random movement and a range that detects when the player is within a certain area. When the player enters the range defined in the code it will trigger the enemy to chase the player until the player passes outside of that defined range.
As you can see from the video I have done a major overhaul of the project and have also added a game time UI element as well as both a main menu and game over scene, which shows the total score of the level you just completed.
This project has gone through a major pivot and at this point is headed in the direction of a hack-n-slash/dungeon crawler. I think it fits better for what I envision for the final product and will fit nicely in that genre because of the elements I would like to add.
At this time the graphics are just a place-holder but have added a better sense of what the environment will look like.
The weapon render path, the weapon “blast” muzzle bug, has remained in the game but will be the focus of my next update along with adding melee weapons, since it will be hack and slash, or some sort of hybrid.
It has been a while since my last update but now it is time for me to unveil what I have been doing with my week of code cleanup and dismantling.
I was able to create a basic weapon inventory script that currently has two weapons in it and uses a boolean variable to tell the script when the player is holding either the handgun or the shotgun. Before posting this video I was working on implementing buttons on screen to deal with this effect but I decided to post what I had to show I did not abandon this project.
One thing that still concerns me is the fact that the line renderer I have attached to both weapons does not fire every time I click the mouse button down as it should. When you watch the video you can see that sometimes there are “blasts” from the muzzle of the weapon and sometimes there are not. For now, this is the furthest thing on my list to fix but it is something that I can’t ignore either.
Progression has been slow since I ran into a weapon system snag. When I tried to add new weapons such as a shotgun or knife I realized that my code was too sloppy. When I updated my code and added a new rate of fire ability, a bug occurred (though I think I know what it is.) I thought it was pretty humorous so I decided to make a video of it, a new video should be updated shortly with the system actually working.
I have made a lot of progress on the game so far. The first thing I did was add a script that follows the player and also opened up the area so there is space to walk. Next I added a new enemy type that gives more points when destroyed. After some thought I decided the next course I should take is ammo and health drops.
The random loot drop script works with two different “if” statements that first ask the question of if loot will drop (60% chance) and if it does will decide which piece of loot will drop between the ammo and the health. The health drop has a 40% chance of dropping and the ammo has a 60% chance.
Next up on my list to do will be a new weapon type and also ammo clips so that the player has to reload, thus adding more challenge to the game. From there I am setting my sights on a menu system.
Next on the list after giving myself an ammo limit was to create an ammo pickup so I could replenish what I used. I think it has come together quite nicely. Basically when the player steps into the pink ammo blob it will run a script that calculates how much ammo the player currently has and adds 30 to it. I think next on my list will be ammo drops from enemies or even starting to figure out the menu systems and a way to die and restart the game.
*Side Note* I got caught up in the moment and tried to get away from the bad guys in the video, it actually worked! After escaping I remembered I didn’t give myself a chance to get any more ammo so I just made myself get obliterated by the wall, I will avenge myself in the future.