Skip to content

paulaheupel/unity_project

Repository files navigation

Fly me to the moon

Youtube Link to our game presentation: https://www.youtube.com/watch?v=3hOl9WbFx4I

The first brain storming seesion left us with th idea of building a game with the mission of traveling from the earth to the moon. Since we followed your uploaded tutorials we sticked to the jump and run format but moving in a horizontal manner (doodle jump like). We started by building the player behaviour (moving & jumping), after that we decided to include two kinds of enemys. The ones that are falling down and you need to avoid to not be damaged and enemys that are attacking the player from the platforms. The second kind of enemys are vulnaerbale to attacks from the player. Those attacks take pace in form of bullet shooting in the current direction of the player. The player is provided with three lives from the start and gets the opportunity to collect more lives through out the game (hearts). Lives are collectablea as well as coins which represent the score in the game. After all those elements were fixed we went into building the game enviroment, with all its platforms and we took some time to design the background ourself since everything else we found did not really fit our needs. After that we included the Main menu in the beginning with buttons to start the game, give instructions and a credits window :D. At the same time we also decided to include a audio component to the game and first provided the buttons with clicking sounds but also put sounds in the game (jumping, colliding, firing, game over etc.) We faced a problem here adding a sound effect to the collison with the chair prefeb and could not find the soure of the problem. We than focused on adding a panel that pops up in case of the players death. The player than has the options to restart the game or go back to the main menu. We than needed to decide on the next scenen when the player has reached the moon. We could have simply implemented a window that celebrates your win but we though a little challange bofore reaching the goal would be nice and we could include another form of game. We therefore tried to build a qick puzzel as a last task. When the puzzle is solved the game is won, Congratulations!

Some elements definitely occupied us more than others and some frustrating hours were spent:

  • Player turning acording to moving direction: Since the player is able to move left and right we wanted the palyer to face its moving direction accordingly. But we struggled a long time with figuring out the rotation component and the online sources talked about a lot of different functions that we could not reallly comprehend. We now ended up with setting the local rotation to the Quaternion Euler and it finally worked out.
  • Bulllet spawning in both directions: Since the player can turn around we needed to let the bullet fire in borth directions. We first tried this with a boolean that told us whether the palyer was facing right or left. We though changing the direction now according to the bool would be no problem but we were wrong. We ended up creating to different prefabs (left and right bullet) that get instatiated accoringly. But there we got stuck a really long time and only noticed in the coding sopport that the left bullet was getting detsroyed immediately and it therefore looked like it was not even instantiated.
  • Adding sound to chair collision: In the course of adding sound effects to the game we also wanted a collision sound for the chair. We did the same as before, included the sound in the script and wanted to attach the audio source to the script. The sound could not be attacked to the script and we guessed it had soemthing to do with the prefab. We then included the audiosource as a component in the chair prefab and attached this source to the script, which worked out, but the sound is not playing
  • bouncing back from enemy: We wanted to add some kind of effect to the damage with our enemy and decided to let the player bounce back form the enemy in case of damage. After some time we looked into the AddExplosionForce function for the rigidbody of the collision object. This woked out but sometimes the player got pushed out of the axes somehow. We solved this by freezing the z position of the player.
  • Drag and Drop of sprite: The puzzle game needed a drag and drop function that moves the puzzel pieces around. This did not work for quite some time. With the help of Peter we figured out that somehow the mouse position gets some weird axis when the main camera as a perspective projection. Changing the projection to orthographic solved the problem and we got the right inputs for the mouse Position.
  • selfmade designs: we decided to design the sky background since we couldn't find stuff online that fit our needs. And we also desgined the whole puzzle in the end by ourselves.
  • GIT!!!!!!!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published