Dev Diary Part 2: EGONE

Recently, our team has made a lot of progress on our EGONE project and it is finally looking like things are  coming together how we want them to. A lot of changes have been to the mechanics of the game and we have added a lot of things like particle effects, new levels and the main mechanics of the game changed a lot.

Main Mechanics

With our current movement, there wasn’t really anything fun for the player. It was a boring forward backward movement so we decided to add a little something to amp the player interaction with the character. We gave the player character a scooter! With the scooter, the player has a different collider with the ground as to help simulate a scooter. This gave us some interesting game play and stimulated many different ideas for how we could use this new mechanic throughout our game. Many ideas came to mind. Things like jumps, grinds, wheelies and back flips were the main ideas under discussion. We will be keeping all these things in mind as we move forward with the game and start to flesh out how this new mechanic will be used better within our game.

Scooter

In addition to the scooter being added, we also added some code to the head of the character to help it stand up straight. We thought that the balancing of the head was a little wack so we went about implementing some code to give the player a bit of a helping hand when it comes to balancing their head. It is only a small thing that will be tweaked as we mess around with our game play mechanics in the days to come but in came together rather well.

TrunUpMaths

This small snippet of code gets the angle of the head relevant to the players body.transform and applies force to try and get the angle of the head back to 0 (zero). It currently works great and has changed the way the player balances their head a lot, causing us to have to reconsider the rest of the balancing mechanic.

HeadRotate

Particle Effects

To make our game look a little better, we added particle effects and trail renderers to the new scooter! We also added a particle effect to the players head that activated every time the player attempted a boast.

As the scooter moves, the players scooter wheels leave a trail behind them. This is a cool little effect that was easily added and made a huge difference to the look of the game. Also, the particle effect that comes out the back of the scooter to simulate a dust could has also been attached. This makes the scooter look like it is interacting with the surface of the level rather than just plodding along boringly. The particle effect on the head that activates when the player boasts gives the player better feedback when they boast instead of just having their head grow when they tap space bar.

ParticleSystem
Above is the particle system that is on the head. It is very basic at the moment but we really just needed something for the time being until we decide on something a little bit more refined. Right now all this does is emit colored particles outward that last for the duration set (1.50 Seconds) and change their color from a light blue to white. All that was done to add this particle system to the player was a simple drag and drop. To achieve the current effect all I did was adjust the duration to the desired time, set the “Color over Lifetime” feature to change from Blue to a White,  set the emission shape to “Cone”, added a force to the Y axis so it would shoot up slightly (in a cone), set max particles to 25 and the rate of emission over time to 10 so that they wouldn’t all just emit all at once.

ParticleSystemDirt

The Dust Particles were also rather similar and simple but were a bit more thought
out. Rather than emitting on button press, they would emit whenever the asset that it was placed on would move. This System is very similar to the first as it isn’t doesn’t go into great detail but it works very well for what we want it to do. To get the emitter to function when the player was moving, we added values to the “Rate over Time” rather than “Rate over Time” so they wouldn’t spray everywhere but simply leave a trail (of dust). Something that we included in this Effect however is the Noise element. This makes the dust a little more unpredictable. This effect also uses a material to help make it a little more dust like.

DustMaterial

This is just a little something that is added from the internet to overwrite the the default unity material, making it look at little more dusty and fit our desired aesthetic.

The most simple addition that was made to the character was the trail renderers. They are just a default system in unity that we attached to the wheels of the characters scooters to make it look cooler.

TrailRenderer

The main parts of the trail renderer that were taken into account were the width curve that created a cool looking point at the end of the trail as it died off, the size so it fit the scooter tire and the overall lifetime it had on the screen before it disappeared. This created a cool effect and has already received some great feedback from players. In the future, we hope to have this looking a little different and custom to our game rather than the default unity color of magenta.

New Levels

I have been working very hard to get together a working base level of the game with all
of the random code and object that were scattered throughout the main project level. With a base level I would be able to get the designers on the team to be able to easily create new levels for our game instead of having to piece everything together themselves.

BaseLevel

The “BaseLevel” Scene contained several things that were needed for all of the levels to function correctly.

First was the camera. he Camera contains a script that follows the player around the level. This was used rather than just attaching the camera to the player as to avoid any unwanted rotation caused by the player.

CameraFollow

This code creates an offset for the camera position (offset = new Vector3(0, 4, -10);). It then takes the offSet and uses it to set the position of the camera appropriately to the player’s transform.position (transform.position = player.transform.position + offSet;).

Next down the list we have a prefab for the Ground which is currently a place holder until we refine how we want the surface of our game to look.

Ground

We aim to have this invisible but indicated by the background that that will be in the scene. Currently this is all we have. The Ground has a collider that detects if the player has hit their head on the ground. If so, the player looses. There is another prefab called “EndZone” that we are using to detect if the player has reached the end of the current level. The only difference with these 2 prefabs is their Tags “Ground” and “EndZone”. They both have the same script but what happens depends on what the player head hits.

The UI Canvas is activated when the player wins or looses. The UI Canvas has 2 children, the “LooseCanvas” and the “WinCanvas” that are called when the player hits either the “Ground” or the “EndZone”. It would then display to the player either the win screen or the loose screen and then give the player options to either go to the MainMenu or Restart the current level.UIManager

This canvas also has “LivesDisplay” and “ScoreDisplay” that you can see in the top left and right of the image. These are currently not being used for anything. There were plans for these but we have not implemented them.

Next down the line is the Player prefab that has been shown over and over again. The player Prefab contains 2 children; the PlayerHead and the PlayerBody. These have all of the particle effects, trail renderers, colliders, audio and sprites that are needed for our default player.

The last that is included is the GameController. This really isn’t doing much other than playing the sound track for the game. It also has scripts that are meant to work with the score and the lives but currently do nothing.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s