Making Pacman

50 %
50 %
Information about Making Pacman

Published on October 3, 2012

Author: judenelson165


Making Pacman: Making Pacman In Gamemaker 1 Create the sprites , objects & room: Create the sprites , objects & room Create a new room. Create your sprites, name them as follows: sprFood SprWall sprMonster (1-5) pacman_down pacman_up pacman_left pacman_right The sprites can be found in the folder on moodle 2 Create Objects: Create Objects Create the following objects & link them to the corresponding sprites Object Sprite objWall sprWall objFood sprFood objPacman sprRight objMonster1 sprMonster1 objMonster2 sprMonster2 objMonster3 sprMonster3 objMonster4 sprMonster4 objMonster5 sprMonster5 3 Arrange Objects in Room: Arrange Objects in Room Change the grid size to Snap X: 32 Snap Y: 32 , this is because our sprites are 32 pixels Select objWall and create instances of this object on the room boundary and within to create a maze 4 Place Food Objects in Room: Place Food Objects in Room We need 25 points to progress to the next level, so place at least 25 instances of the food object in the room. 5 Place Monsters in Room: Place Monsters in Room Monsters 1 & 3 will be moving vertically & Monsters 2,4 & 5 will be move horizontally. Place the monsters in the maze so that they will be able to move in these directions. Place objPacman in the bottom left hand corner. 6 STEP 3: Creating Sounds: STEP 3: Creating Sounds We need sounds for collisions between the Pcaman object and The food object The wall object The monster objects. Load suitable sounds and save them as sndFood sndWall sndMonster 7 PROGRAMMING EVENTS & ACTIONS: PROGRAMMING EVENTS & ACTIONS You have already planned the events and actions for the Pacman & Monster object. Now it is time to complete the objects. The Monster Object When a monster object is created it must move at a certain speed in a certain direction When a monster collides with the wall, it must reverse its direction When a monster collides with Pacman , it must reverse its direction 8 Create objMonster1 – vertically moving Monster: Create objMonster1 – vertically moving Monster Open objMonster1 Add Event> Create and drag in Move Fixed icon. 9 ObjMonster1 : Collision with Wall: ObjMonster1 : Collision with Wall Add Event -> Collision with objWall & drag in the ReverseVertical icon. Leave setting as self & Click OK 10 ObjMonster: Collision with Pacman: ObjMonster : Collision with Pacman Select AddEvent > Collision with the Pacman object & drag in the ReverseVertical icon. Leave setting as self & Click OK 11 Events for Monster 1: Events for Monster 1 12 Save & Test: Save & Test Save the game and run the game to test it. Check that motion is reversed when Monster1 collides with wall Check that motion is reversed when Monster1 collides with pacman 13 Duplicate Monster 1: Duplicate Monster 1 Monster3 behaves in exactly the same way as Monster1 so instead of building all the events & actions again we can simply duplicate it. Delete the existing Monster3 object Right click on Monster1 & select Duplicate, name this one objMonster3 & set the sprite to sprMonster3. Place Monster3 in the room. Test & Debug Again 14 Create Monster 2- Horizontally Moving Monster: Create Monster 2- Horizontally Moving Monster Open objMonster2 Add Event>Create & drag in move fixed icon Select move left arrow & set speed to 2, click OK Add Event>Collision & select objWall Drag in ReverseHorizontal & click OK Add Event>Collision & select objPacman Drag in ReverseHorizontal & click OK. Duplicate Monster2 as Monster4 & Monster5 and re-place in the room. RUN & TEST 15 PROGRAM PACMAN: PROGRAM PACMAN EVENT ACTION Create Set score to 0 Set Lives to 3 Display score & lives Keyboard Events Move in direction of cursor and change sprite to face correct direction Collison With Wall Stop movement, Play sound Collision with objFood Play sound, increase score Test score If score > 25 display a message and enter next level Collision with Monster Play sound, decrease lives by 1 Test lives If lives <3 display a message and restart game 16 Pacman Object – Set & display Score & Lives: Pacman Object – Set & display Score & Lives Open objPacman Add Event> Creats Drag in Set Score, leave as zero and click OK Drag in Set Lives, set to 3and click OK Drag in the Score Caption, change he show lives option to show & click OK 17 PACMAN OBJECT: KEYBOARD EVENTS : PACMAN OBJECT: KEYBOARD EVENTS Add Event > Keyboard>Right Drag in Move Fixed from the move tab, select the right arrow & set speed to 3, click OK Drag in Change Sprite from main1 & select sprRight , set the speed to 3. 18 PACMAN OBJECT: KEYBOARD EVENTS : PACMAN OBJECT: KEYBOARD EVENTS In a similar way create events & actions for up, down & left arrow keys. Finally we need to create an event that will stop Pacman moving when we release one of the arrow keys. Click on Add Event> KeyRelease <Any Key> Set horizontal & vertical speed to zero. Drag in the Speed Horizontal icon from the move tab, set speed to zero and click OK. RUN & TEST 19 STEP 6: PACMAN WALL COLLISION EVENT: STEP 6: PACMAN WALL COLLISION EVENT Open Pacman & Add Event > Collision > ObjWall Drag Speed Horizontal & set to zero Drag Speed Vertical & set to zero Drag in Play sound & select sndWall Click ok 20 STEP 6: PACMAN FOOD COLLISION EVENT: STEP 6: PACMAN FOOD COLLISION EVENT Open Pacman & Add Event > Collision > ObjFood Drag DestroyInstance from main1 Select Other, (we want food to be destroyed not Pacman ) Click OK Drag in Set Score from the Score tab, Enter 1 as the new score and click relative (so that 1 will be added to existing score) 21 PACMAN FOOD COLLISION EVENT CTD: PACMAN FOOD COLLISION EVENT CTD Drag in Test Score from score Enter 25 as the value. Click OK Now we need to start a block ** From Control drag in Start Block** Under this drag in Dsisplay Message & enter a suitable message such as NEXT LEVEL etc , click OK Now drag in the Next Room icon from main1 & click OK Now drag in End Block Underneath the end block drag in Play Sound 22 PACMAN FOOD COLLISION EVENT: PACMAN FOOD COLLISION EVENT 23 Now Run & Test Collision between Pacman & Food Is the food object destroyed? Doe the Score Increase? Does the sound play? PACMAN MONSTER COLLISION EVENT: PACMAN MONSTER COLLISION EVENT Add Event > Collision >objMonster1 Drag in the Play Sound icon & select the Monster Sound Drag in the Set Lives icon from the score tab Set new lives = -1 & tick the relative checkbox ( this takes one away from remaining lives) & click OK Drag in the Test Lives icon Leave the value at zero & click OK Drag in the start block icon from control tab Drag in the display message & enter a suitable message like “no lives left!” & click ok Drag in Restart Game icon Drag in the End Block icon & click OK 24 Duplicate the collision event with Monster 1: Duplicate the collision event with Monster 1 Duplicate the collision event with Monster 1 and insert the other Monster objects Right click on the collision event with objMonster 1 event and select Duplicate Event Click on Collision & s elect objMonster2 Repeat for Monsters 3-5. RUN & TEST IF YOU MANAGE TO SCORE 25 POINTS YOU WILL GET AN AN ERROR AS THERE IN NO NEXT LEVEL CREATED 25 CREATE NEW ROOM : CREATE NEW ROOM Duplicate the room and rename it Duplicate each monster object and rename them to objMonster1_2, objMonster2_2 etc Duplicate objPacman & rename it objPacman2 Change the collision event with objMonster1 to objMonster1_2 etc , do this for all monsters Change the collision event for each level 2 monster to collide with objPacman2. Put the new monster objects in the second room Now make changes to make the level more difficult- make the monsters move faster, redesign the room making it more difficult to get food and avoid monsters, add more monsters, make pacman go slower etc etc 26 PILLS!: PILLS! Think about what you would need to do to add pills to the game! & see if you can make a table showing events & actions for the pacman objects when he eats a pill. 27

Add a comment

Related presentations

Related pages

Pacman - Play Free Online Pacman Game and Ms Pacman (Pac Man)

Play free pacman game and ms pacman online and learn more about the history and hints of pac man. Pacman-Play Pacman game Free Online What is Pacman.
Read more

PACMAN on Scratch

PACMAN on Scratch by bigB. Create; Explore; Discuss; About; Help; PACMAN. by bigB scripts sprites. See inside. Notes and Credits . This may not be the best ...
Read more

Making Games in Scratch - PacMan - Part 2: Making the ...

In this video you will learn how to make an animated PacMan sprite that shows his mouth opening and closing. Target audience: Key Stage 3 ...
Read more

The Making of PackMan - Episode 3 - YouTube

Episode 3 on how to make PacMan-like game with GameEngine library from ... The Making of PackMan - Episode 1 ...
Read more

30th Anniversary of PAC-MAN - Google

PAC-MAN seems like a natural fit for the Google homepage. They’re both deceptively straightforward, carefully hiding their complexity under ...
Read more

How to Make a Toy Pacman: 14 Steps - wikiHow

How to Make a Toy Pacman. If you love Pacman and you want it to become real, then here is a guide to making your very own toy one! Gather up the things ...
Read more

Pacman - elgooG

Online Pacman game! The famous Pac-Man Game with Google!
Read more

How to Make a Pacman Costume and Matching ... - Coupon Closet

Instructions For Pacman: ... Coupon Closet is dedicated to bringing you the best deals, delicious recipes, and money saving ideas.
Read more

Ultimate Pacman Design - Scalable Game Design wiki

Critical Thinking, Problem Solving, and Decision Making. ... A first version of the AgentSheets pacman was built by Thilo Huebner, now at Electronic Arts;
Read more

Free Pacman

Free Pacman - Play all levels of Pacman. No fuss, totally free.
Read more