Game Development Reference
In-Depth Information
Challenges
1. Adding side scrolling to Tick Tick
If you look at the background sky image, you see that it is quite a bit larger than
the actual screen size. One of the reasons for this is that we can use the sky image
as a moving background for side scrolling. The goal of this challenge is to add
side scrolling capabilities to the Tick Tick game.
(a) The first thing you will have to do is extend the game environment frame-
work so that you can define a camera . Using a virtual camera, we can specify
which part of the game world we're seeing. What happens when we're side
scrolling is that we move around this camera so that different parts of the
world are seen. Add a Camera class to the GameManagement library that de-
cides which part of the world we're currently seeing. In order to test your
camera, try to run the program with a few different values for the camera
position. Make sure that the camera works correctly in full-screen mode as
well.
(b) The next step is extending the TickTick... game so that we can read levels
of any number of dimensions. Extend the game so that this works without
problems.
(c) Finally, we want to move the camera around based on the character position.
There are a few different possibilities. Either you can always try to have the
character in the middle of the screen, or you can move the camera when
the character crosses a certain boundary, for example, past two-thirds of the
visible screen. Add the automatically moving camera behavior to the game.
Make sure that it is robust, and that the player never sees beyond the edges
of the defined game world. For example: if the character falls out or jumps
above the screen, the camera shouldn't move along with it.
(d) Parallax scrolling is a way to create the illusion that there is a three dimen-
sional world. You can achieve this effect by having several layers of moun-
tains. The further away a layer of mountains is, the slower it will move when
the viewport is moving. Add parallax scrolling to the game by introducing
three different layers of mountains, each moving at a different speed. Of
course, you don't have to use only mountains. If you find nice other sprites
that could serve as a parallax layer, go right ahead.
(e) Since our levels are now much bigger, extend the game so that for each level,
you can define how much time the player has in the text file. Create a few
different levels that use this ability.
2. Other additions to Tick Tick
(a) Extend the Rocket class so that when the player jumps on the rocket, the
rocket dies.
(b) Add shooting behavior to the player. For example, the bomb could throw
smaller bombs which would kill an enemy if it collides with the bomb.
(c) Add a health indicator for the player. Every time the player touches an en-
emy, or if the player falls down from more than three tiles high, the health
Search WWH ::




Custom Search