TASK:
How to play "Raiden 2".
CHECK UP:
Watch the video below to learn how to set up "Raiden 2".
CHALLENGE EXERCISE
- Play a round or two or three yourself here.
- Create an intro with an appropriate background.
- Create a game loop that runs for one iteration.
- Create an outro loop with a background image.
TASK:
Set up the framework for the game using comments.
HINT:
Every 2D game follows the same basic structure: create and initialize
variables, create objects, game loop, read user inputs, update the sprites/surfaces, adjust the location of the sprites.
here we will start by outlining this using comments.
CHECK UP:
Watch the video below to check that you completed the task.
TASK:
Load the level into a 2D array.
HINT:
We will be building a level that
has a camera that follows the ship around. In order to accomplish this, we will
need to build the level using a 2D array of characters that each represent a surface
that is 32 by 32 pixels.
CHECK UP:
Watch the video below to check that you completed the task.
TASK:
Define the Platform class.
HINT:
You will need to define a class that has an image and a rect.
The dimensions of the image will be 32 by 32 pixels. You will need to take in the x and y position as parameters
to the constructor.
CHECK UP:
Watch the video below to check that you completed the task.
TASK:
Create the Platform objects.
HINT:
You will need to have a nested for loop
that will iterate through your 2D array. For each character "P" in the arrays
you will need to create an object of type Platform and pass it's x and y position to the constructor.
CHECK UP:
Watch the video below to check that you completed the task.
CHALLENGE EXERCISE
- Draw the platform objects to the screen using the Sprite class.
TASK:
Review the map building algorithm.
CHECK UP:
Watch the video below to check that you completed the task.
CHALLENGE EXERCISE
- Add a ship to the game.
TASK:
Create a container and use it determine the ship’s initial position.
HINT:
A container is a rect that describes the world the ship
exists in. If we create one, we can use it to more easily set boundaries for
the ship and initialize the ship's position at the start of the game.
CHECK UP:
Watch the video below to check that you completed the task.
Congratulations!
You have completed "Creating the Map"!
You have completed "Creating the Map"!