Lynda.com: Become a Unity 2D Developer (Day 8)

UNITY 2D LEVEL DESIGN

We finally move towards the final stretch.  Unity 2D Level Design is the last tutorial on the Unity 2D Developer track.  I'm extremely excited to have gotten this far because it is only a matter of time I can rework this game and then push out a prototype.  Afterwards, I will rework the game entirely and release it for testing.  

Import New Assets

When it comes to importing assets, it is always important to setup your project correctly from the start.  As instructed, I  created a new project and named it as Jetroid Level Design.  From there, it was a matter of setting up the GUI layout and preferences.  Afterwards, I was able to import assets through the menu options, specifically Assets -> Import Package -> Custom Package.  Next, I navigated to the Resources folder and selected the "JetroidAndTileMapEditorV1.unitypackage".  Once all of the assets were imported successfully, I was simply instructed to double click the SplashScene file in order to prepare for the next lesson.
Reconnect the Scenes

For this part of the lesson, I learn how to reconnect scenes for any given project.  Apparently, when attempting to import assets, sometimes the scripts do not transfer effectively.  The remedy is to manually reconnect the scenes to the project, specifically File->Build Settings. 

Unfortunately, after testing the game, it appears that the gravity settings were not setup correctly. At its current state, the gravity pull is far too weak.  See below.


In order to resolve the gravity issue, I needed to go into the global physics settings withing the project.  I was able to access this through the menu, Edit->Project Settings->Physics 2D.  Within the Inspector palette, I modified the Gravity Y: -100 and Velocity Threshold 2.  Gravity sets the strength of pulling down the player, while Velocity Threshold allows the sprite to remain static instead of constantly moving around.


Below is the result of the changes to the values within the Physics2DSettings. The example below does not completely reflect the animation timing.  Below is a compressed file that makes the animation move a bit faster than real-time.  It is also important to note that the aliens are not rendering properly, in fact they are invisible.  That is why you see the astronaut suddenly explode into a bunch of pieces without any provocation.


In order to resolve the invisible aliens, I modified the value within the Order in Layer field, specifically to 3.  The 3 layer is the same layer as the astronaut.  Lastly, within the Foreground layer, I added a new layer, specifically User Layer 8: Solid.


The next phase with importing assets is to ensure that the sprites have been setup in the most effective manner.  That way, the game will be able to run smoother and more efficiently.  Ultimately, will need to transpose all sprites onto one sheet, as oppose to the two sprite sheets currently in the build.  

The last few steps of cleaning up the sprite map is to first make sure all of the textures are set to the same image type.  First, I used the texture filter and then selected all of the texture/images.  Next, I modified the Texture Type and Sprite Mode to all match.  I then made sure that the Cave texture was still sliced correctly in order to ensure that the background elements would render properly.  Finally, I was able to go back into the Sprite Packer and select the Pack option. Now, all of the sprites are on one sheet, which will improve load times.


Comments

Popular posts from this blog

JavaScript 30: JavaScript Drum Kit

Lynda.com: Become a Unity 2D Developer (Day 11..Sort of)

Back On the Coding Horse