Game Design Creating a game called PING Phase 3: Steps for building basic game.

Post on 11-Jan-2016

223 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

Transcript

Game DesignCreating a game called PING

Phase 3:Steps for building basic game

Creating the Ping Game: At the end of this Unit students will have

created a: Two player game called Ping Inserted active objects and modified those

active objects Added movement to objects and conditions

for those movements Added scoring objects Provided a winner for the game

Step One: At the end of this section students will

have learned: How to create a new game in MMF How to rename applications and frames How to change background colors

Step One: Creating the New Game

Setting up the new game file:

Formatting the game frame

CHECK POINTS You will see these check points at

varying times in lesson. These will confirm what the frames

should look like and what should be completed at this point in the lesson.

If your game looks different go back in the lesson to complete.

CHECK POINT #1

Step Two: At the end of this section students will

have learned: How to create active objects for games How to open the animation editor to

modify objects Changed dimensions, colors and

placements of objects on game frame.

Step Two: Creating active objects

Creating Active Objects:

Modifying active objects

Creating the Center Line:

Change objects color:

Finalizing Center Line

1. Right click to select object

2. Choose Align in Frame

3. Choose Horz Center

4. Choose Vert. Center

Creating Ball object

1. Create another active object

2. Double click to modify object and open animation editor

Change dimensions of ball

Change the color:

Finalizing the ball object

1. Right click to select object

2. Choose Align in Frame

3. Choose Horz Center

4. Choose Vert. Center

Creating the paddle 1 object

1. Create another active object

2. Double click to modify object and open animation editor

Change dimensions for paddle 1

Change the color of paddle 1:

Creating the paddle 2 object

1. Create another active object

2. Double click to modify object and open animation editor

Change dimensions for paddle 2

Change the color of paddle 2 (This should be different than #1:

Finalizing the paddle objects

1. Right click to select each paddle 2. Move to the edge of each player’s side3. Choose Vert. Center

CHECK POINT #2 Check the next frame and be sure that

your game looks the same. If your game looks different go back to

the steps of this lesson and make the needed changes.

CHECK POINT #2:

Step Three: Giving Movement to Objects

This lesson will show how to add movement to the objects you have created

Follow the steps as directed to give movement to the: Ball object Two paddles

Giving Movement To Objects

Give movement to the ball

Give ball movement direction

1. Be sure to click on initial direction

2. Clear all arrows3. Click on boxes to select

the direction for the ball to move

Giving Movement To Paddle objects

Giving Movement To Paddles

Setting up Player 2 to the Paddle 2 object

1. In the movement properties for paddle two

2. Click on the number 1 and choose player 2

Setting up keyboard controls

Choose the keys you want to use to control each paddle

Keys to control paddles

CHECK POINT 3 Movement has been given to the ball

and both paddles Paddle 1 is set to move with W and S

keys Paddle 2 is set to move with up and

down arrow keys Paddle 1 is set up for Player 1 Paddle 2 is set up for Player 2

Step Four: At the end of this section students will

have learned: What the event editor is used for How to set up conditions and events for

objects How to test their game

Setting up Conditions and Events

Click on this button to open up the Event Editor

Setting up Conditions and Events

Setting up Conditions and Events

Collision event with ball and paddles:

1. Right click on the ball object and choose a collision with another object.

2. Select the paddle 1 object3. Find the event space under the ball object and

right click under the space4. Choose a movement event and select a bounce

event 5. You will see a check mark if set up correctly.

Using the Event List Editor

Using Event List editor to confirm collision events

Keeping objects in game frame

Keeping paddle 1 in game frame.

1. Right click to create a new condition2. Right click on paddle 13. Choose the option Position4. Then choose test position5. Select the up and down arrow keys 6. Find the empty space under paddle 1

and right click7. Select the movement and have the

paddle bounce

Keeping paddle 2 in game frame.

1. Right click to create a new condition2. Right click on paddle 23. Choose the option Position4. Then choose test position5. Select the up and down arrow keys 6. Find the empty space under paddle 2

and right click7. Select the movement and have the

paddle bounce

Using the Event List Editor

Use the Event List Editor to confirm paddle conditions

Keeping the ball in the game frame Create a new condition by right clicking Right click on the ball object Choose test position Select the top and bottom arrow keys Right click under ball object and select

a bounce movement

Confirm event and condition

Testing position of ball when it leaves frame to right or left

You need to set up conditions for testing the ball when a player misses the ball to the right or left.

It should leave the playing field and reappear

Testing position of ball when it leaves frame to right or left

1. Right click to create a new condition2. Right click on ball3. Choose position and then test position4. Choose the right arrow to test when it

leaves to the right5. Create a second condition to test when

the ball leaves to the left

Testing position of ball when it leaves frame to right or left

1. Under the ball object right click and choose position from this menu

2. Then choose select position3. Choose at actual X, Y coordinates4. Click OK5. You will see the position of the ball with

a dotted flashing X at the center line6. This will make the ball reappear at this

coordinate

Repositioning ball on frame

Moving ball when it is repositioned on game frame.

1. Under the ball object right click to add a second event to this condition

2. Choose the option Direction3. Then choose select direction4. For balls that exit to the right. Move

the ball to the left (see next slides)5. For balls that exit to the left. Move ball

to the right (see next slides)

Selecting Direction for ball to move

Setting direction for ball to move

Check Point #4Several conditions and actions were created to provide the steps for a functioning game they include:

• Bouncing ball condition (off paddles, and game frame)• Test position conditions (to test of the paddles and ball are

on the frame)• Reset ball condition (to re-position the ball onto the game

frame when it leaves from either side)• Be sure to review the Event List Editor to confirm your

events and conditions were set up correctly (see next slide).

• Go back to the Event and Conditions steps to make any corrections.

Check Point #4- Event List Editor

Step Five:

At the end of this section students will have learned: Create score objects for player 1 and

player 2 Add to the score for players Create a winning player text and display

that text.

Creating a Score Object

Creating a Score Object

Creating a Score Object

Creating a Score Object

Creating a Score Objects

Adding to the Score Objects

Ending the game

Creating string text

Creating string text

Setting up Conditions for displaying string text

Click on this button to open up the Event Editor

Step 6: Creating Conditions for ending the game

Step 6: Creating Conditions for comparing a player’s score

Creating events to end the game

Creating events to end the game

1. Follow same steps to set up another compare to PLAYER 2’s score.

2. Set up same events but display PLAYER 2 wins!

Check Point #5Several conditions and actions were created to provide the steps for a functioning game they include:

• Creating score objects for player 1 and player 2• Adding points to either player 1 or player 2’s score• Having the ball reappear on opposite player’s side that it

left the playing field• Comparing a player’s score to the value of 13• Displaying hidden text to declare a winner for the first

player to reach 13

Check Point #5

top related