Project Update #4

So we’ve finished the tutorials and we will start creating our own game.

As a reminder, our objective in the course is to explore and learn about the Unity engine, game logic and how game objects work.

In the last couple of days we implemented a system to create different tanks in the same scene, the logic to control the game flow and audio mixers.

The tank manager is a script that controls that instantiate a tank in the scene, setting its new color, and defines several methods to modify the behaviour of the tank, like disabling control.TankManager.png

The Game Manager is a script that controls the game (duh), setting the targets for the camera (because there could be different number of tanks), and have different functions that are executed based in the current state of the game (i.e.: starting a round, playing, finishing). We can archive this thanks to coroutines, which are functions that can pause its execution and return to the normal flow of unity (updating the frame, etc.) and then continue executing where it left.GameManagerCode.png

So the Game Manager just defines the number of rounds to win, the delay time to start (a countdown), controls the targets of the camera, instantiates the tanks and the Manager also keeps track of the state of the tanks (to finish the game when there is only one tank left in the scene).

GameManager.png

The starting delay just shows the text “tanks!”.

Text.PNG

The audio mixer is just like a filter to all the audio sources that the game have, you can just create one in the project folder.CreateAudioMixer.png

You can also create sub-mixers, so you can divide the sounds of the game and apply different filters to it, in addition to the main mixer.

Attenuation.PNG

In the output field of the audio source of the different objects you can select the audio mixer that you want that sound belong to.

DrivingTankAudio.png

And as you can see in the images you can add filters, modify the pitch, level, attenuation and other things until you are satisfied with the sound effects of the game.

The next idea is to create an interface to interact with the tank and game manager scripts. This interface will let the player to set some properties for the game (like adjusting the damage, the force and the color of the tank).

Anuncios

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s