Posts

Showing posts from June, 2018

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

Image
UNITY 2D LEVEL DESIGN (...continued part II) The Map Editor Build a Level The Build a level tutorial was merely a review of prior sessions.  Ultimately, I had to setup the scene folder and file.  Afterwards, I merely selected the Tile Map option that was setup within the prior tutorials.  From there, I painted a few of the textures and added the astronaut (Player) prefab onto the stage.  Furthermore, I made the astronaut the target of the Main Camera.  By doing this, it enables the camera to follow the player as they move around the level.  However, it is important to note that the textures currently on the stage do not have any collision detection so the astronaut simply falls through everything.   Add Collisions The lack of 2D Collision will need to be remedied.  In order to make the tile picker options to be more robust, I had to modify a C# script, specifically TileMapEditor.  The goal is to include a "solid" checkbox prior ...

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

Image
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 ...

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

Image
UNITY 5: 2D BUILDING A TILE MAP EDITOR  (...continued part III) CREATING A TILE BRUSH Create the Tile Brush Remember the days in class in which the teacher is up there with the lesson and suddenly breaks into a quick burst of information with no follow-up?  This lesson was like that, only because it focused on creating the initial setup for the Tile Brush.  Ultimately, this script does absolutely nothing because there aren't any game elements referencing the script.  At this point, it is an unused asset.  Nevertheless, below is the script to create/setup the Tile Brush. Instantiating the Tile Brush in the Scene In efforts to continue documentation, the screenshot below follows the same thread from the lesson prior.  Meaning, it is still a part of the initial setup without any game elements referencing the script(s). Customizing the Tile Brush I'm kind of amazed how the subtitles for each lesson seems to be a bit off.  This less...

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

Image
UNITY 5: 2D BUILDING A TILE MAP EDITOR  (...continued part II) Displaying a Texutre2D in a Window In order to display the selected texture within the Tile Picker window, a custom script was created.  This script focuses on determining if there is a selected tile.  From there, it then displays the texture withing the Tile Picker window.  It is important to note that their can be a bit of a rendering delay.  However, once the script catches up, it will immediately display the selected texture withing the Tile Picker window Scaling the Texture 2d Now that the selected texture is displaying correctly, it is time to improve the experience by allowing the texture to scale within the Tile Picker window. In order to accomplish this, I had to setup a script to be able to scale the texture.  In addition, the Tile Picker window will now be able to zoom in on the texture up to x5 the original size. Adding Scrolling to the Window In order to im...