Game Development Reference
In-Depth Information
Prior to Unity 4.3, we actually would have wanted a perspective camera for the
simple fact that we could make use of its depth information for easy parallax
scrolling , or a visual effect where things further from the camera move slower
(much like how they would in real life). Even in Version 4.3, if you plan to make
a 2.5D game (or a 2D game that uses full 3D meshes), then you probably still want
to use the perspective camera. Otherwise, for a 2D game in Unity 4.3, make sure
that the camera is set to orthographic—which it should have already defaulted to by
setting your project defaults to 2D.
We'll talk more about parallax scrolling and z-depth later in this topic.
Getting grounded
OK, we've gone over some of the basics of the camera and models. I think it's time
we started really getting our hands dirty, don't you? Here is the part where we get
to start building a 2D game! Yes, it really is that easy. So, let's get started.
Pro Tip
Images for your video games, as you most likely already know, work
best if they are always a power of two (2, 4, 8, 16, 32, 64, 128, 256, 512,
1024, 2048), because the video card requires image map to be a power
of two. Otherwise, the image map will automatically be resized to be a
power of two by the game engine. While this is not as noticeable in 3D
games with mapped imageries, in a 2D game where the 1:1 art for the
image map is quite important, it can easily look stretched or blurry.
Considering that this is a 2D platformer, the first thing we will want to do is build
the ground. This is because without the ground, our heroes and villains would just
fall through space forever.
This topic comes with asset iles which can be downloaded from the publisher's
website. Once you acquire those assets, follow these simple steps:
1. Find the Textures folder, and inside that, look for the Scenery folder.
2. Import the image labeled Platform.png .
3. To keep things nice and clean, let's also create a folder called Textures
within your project (the Project tab). Inside that, create another folder
called Scenery and put the Platform texture in there.
 
Search WWH ::




Custom Search