Foundation Year Final Project: Production Week 7/Post-Production Week 1.

I've got some updates for my project this week, mainly that I've finished the Production phase of my game and it has now moved onto the Post-Production phase.

Game world.

The first thing I did during this week was fill in the remaining sections of my game's background. 


Melee.

I then got on with implementing the melee fighting portion of my game. One of the requirements was that my game should have "Two different attacks that have different damage and attack speed values." I have already implemented one type of shooting (the bullet shooting), but I had not worked on the sword code yet, which I started to do for this week. 

I started by creating a sword game object and implementing code to spawn that sword when the player is in the sword mode (activated/deactivated by pressing the Tab key/Middle Mouse button). 


I implemented a new sword script and an animation file. The animation activates as soon as the sword is instantiated in the game and it shows a sword swing. 



At the end of the animation, I have placed an event which triggers a function within the code. The function destroys the sword game object. 



Although I was able to get the sword spawning and swinging, I was not able to get it working properly with enemies at the time, as any hit would decrease the players health, not the enemies. However, I was able to fix it later. 


Enemy spawners.


Another problem I had was with enemy spawners, as the former code would spawn lots of enemies at once, which added to the every 10 seconds regardless of existing enemy amount and which slowed down the game and made it harder for the player to progress, especially slower players. 

float eSpawnerAmount = FindObjectsOfType<enemySpawner>().Length;
float enemyAmount = FindObjectsOfType<e1Movement>().Length;
if (enemyAmount <= eSpawnerAmount)
{
_spriteRenderer.color = Color.blue;
Invoke("SpawnPatrolEnemy", 1);

}
This was the code I came up with for the solution. Once the timer runs out, the game finds the amount of enemy spawners and the amount of enemies. If there are less enemies than enemy spawners, than the game changes the spawner colour to blue, waits one second and then spawns the enemies. 
void SpawnPatrolEnemy()
{
SpawnEnemiesInSpawnPoint(SpawnPoint2);
CheckHealthLevel();
}
It then reverts the enemy spawner object back to it's previous colour by checking the object's health.

Enemy effects.

I decided to experiment with enemy death effects. I did this by creating a new game object which spawns every time the player shoots the enemy down. 

I also added a particle object on the existing particle object, so that I could try to make it resemble a fire. 


In the end, I decided to comment out the code that spawns the particles, thus rendering them unusable in game. 

Game Menus.

I decided after that to work with the game's menus. Because I had done this before, implementing the buttons was very easy. The buttons link to a function that opens levels, in this case, the first level and a "How To Play" screen. The last button quits the game, although this only happens when the game is built and not in the Unity editor. 


I've noticed from the single piece feedback I had received so far for polyDungeons and the feedback from my previous games, that implementing a "How To Play" screen would be a good idea. The screen doesn't show the controls, just how to play the game. 





Post-Production Launch.

I finished the Production phase by building the 26_03_2023 version of the game onto 4 platforms, Linux, MacOS, Microsoft Windows and WebGL. I skipped Android as I didn't want to deal with the complexity of that platform and because I had not implemented shooting controllers for gamepads yet. I also supplied a feedback form in the game's Itch.io page. 

Post-Production Feedback.

After that, I started to gather feedback for my game. I provided links to 2 Discord servers, 1 of the groups was a public server whilst the other was a server for developers in Southampton. I also gathered feedback by setting up my computer space at University (which has 2 monitors) to have the game playing on the left monitor and the feedback form on the right monitor.

2 suggestions I received from the public server concerned the UI. The person who gave feedback didn't know what the icon on the top left did, and they also couldn't figure out how to close the How To Play page at first. 

Previously, the game featured an arrow image on the top left of the game to represent bullets. 


In the How To Play scene, I had also used a button to close out of the scene.


I dealt with the first bit of criticism by adding a label next to the object on the top left of the HUD. I also changed out the arrow for a silhouette of the bullet used in the game. 


For the 2nd bit of criticism, I moved the button to close the scene to be inside the background blur. 


I noticed that some reviewers didn't catch the feedback link within the Itch page, so I added a button to my Game Over and Main Menu screens, that opens a version of the feedback form that pre-fills in the version that the player is using. 



For the last 2 major changes for this week, I changed the way the sword works to get it to work with enemies.

Previously, the sword used the Box Collider 2D for collision and with the OnCollisionEnter2D function. The problem was that the enemies and players also used the same components, and because the sword spawns as a child of the player, the game treats the sword as the player, which means that when the enemy touches the player, the player loses a life. 

I resolved this by changing the Sword type to a trigger using the "Is Trigger" function (see below).  



You may also notice another change in the video. I've changed the amount of lives that the player has from 3 to 5, in response to feedback I received from the public game dev server. 

For next week, I will make a new build based on the feedback I've received so far, and I will continue to gather feedback ahead of the launch date,  April 27th. 


















Comments

Popular Posts