Game Maker Evil Clutches Learning Objectives Create a
Game Maker Evil Clutches
Learning Objectives • Create a game that includes shooting, scoring, music, spawning and top scores list.
Advanced Group Call it Your. Name. Advanced. Clutches • • • Create a Game with the Following Controlling the Hero The Hero can shoot at targets/Enemy The hero is damaged by running into something The game ends/hero dies when hitting something An Enemy that moves and randomly shoots damaging things at the hero An entity that is trying to escape from the enemy that you want to catch and not kill. You will need to keep score You will need to keep a Top Scores list Include background music Include sounds for … shooting/ Catching/…
Evil Clutches!!! • For today’s game you can use the images in resourceschapter 02
The Game • You are a mother dragon trying to save her hatchlings from an unpleasant band of demons • You can move up and down using the arrow keys • And you can shoot fireballs using the space bar • The game ends if the dragon (Good) is hit by a demon (Bad)
The Characters (Sprites/objects) Create Sprites for each of these • Dragon. gif (spr_dragon) • Boss. gif (spr_boss) • Demon. gif (spr_demon) • Baby. gif (spr_baby) • Fireball. gif (spr_Fireball) Go to ResourcesChapter 02 And load the above sprites. Click on the Pacman Click on Load Sprite.
The Characters (objects) Create Objects for each of these • Obj_Dragon • (spr_dragon) • Obj_Boss (spr_boss) • Obj_Demon (spr_demon) • obj_ Baby • (spr_baby) • Obj_Fireball (spr_Fireball) Click on the blueball Hit the down menu to select the corresponding sprite. We’ll add Events and Actions for each as we go on.
Boss Object (obj_boss) Add a Create Event Start moving up at speed 8 Drag the move fixed action into the actions screen Click on the up arrow Add Event Create Give a speed of 8.
Add event Other Intersect boundary
Boss reverses vertical direction when it hits the boundary
Obj_dragon Add event Keyboard Up Start moving up at speed of 16.
Obj_dragon continued Add events for down arrow and for no key pressed (stop).
Room Name it room_first, Titled “Evil Clutches”
Add the Dragon and Boss Test here to make sure the dragon can move and the boss is going up and down.
Fireball Object Add a create event that has the fireball fly to the right at a speed of 32.
Destroy the fireball when it goes beyond the room Add Event Other Outside room
Destroy the fireball when it goes beyond the room
Get the dragon to shoot the fireball Add Event Key Press <Space>
Create a Fireball Create Obj_fireball Set x to 100 Set y to 10 Click the relative box Test the game after this to make sure the dragon is shooting fire.
Demon Object Add a create event. Move Fixed Note the 3 Left Directions 12
Bounce Add Event Other Intersect Boundary Reverse Vertical
Destroy when it leaves the room Add Event Other Outside room Destroy instance
Demon Collides with Fireball!
Destroy the instance
Add 100 to the score! Set Score 100 Relative (So it will be added to the score)
Demon Collides with Dragon Add Event Collision With obj_dragon Show Highscore…
And restart the game
Flying Demons From obj_boss Add event Step
1 in 50 chance of creating a demon Test Chance 50 sides
Create the instance Create an instance Of Obj_demon At x=0, y=0 Click the relative box Test
Baby Dragon Create obj_baby. Dragon Add Event Create Move fixed Left with a speed of 8
Destroy when it leaves the room Add Event Other Outside Room Destroy the instance Self
Collision with fireball Destroy instance -300 points, relative
Collide with dragon Destroy instance Gain 500 points
Random creation of baby dragons Open obj_boss Add event Step
Test chance 1 in 100
Create instance Baby Dragon Relative
Create Backgrounds Name it background_cave Load the Background. bmp
Put the background in the room Open the room_first Select Backgrounds tab Select background_cave
Test it
Add Background Music: Create Sound Create a Sound Resources -> Create Sound OR Ctrl-Alt-U OR Hit the Speaker Icon
Load the Sound Load Sound Go to the Assignments Folder -> Resources -> Chapter 2 And select the music file
1) Name the Sound_Music Name the Sound 2) Click the OK
Create Music in Boss Object 1) Open the Boss Object 2) Select the Create Event 3) Select the Main 1 tab Drag over the Play Sound icon.
Select Sound and Loop 4) Test it Click on the Pull Down Menu Select the Sound 3) ‘OK’ Select the pull down menu and set the loop to true.
Adding Interest with Sounds for Actions • Hitting Demon • Hitting Baby • Add other Sounds – Shooting – Scoring – When new demons is created –…
Hitting Demon Sound 1) Create Sound 3) Find the ‘Demon’ sound in the Chapter 2 Resources 4) Open 2) Load Sound
Name and OK 1) Name the sound Sound_Demon 2) Click ‘OK’
Play Sound • Played when the demon has a collision with a fireball
Tying the Sound to the Collision 3) In the 1) Select the Demon object 2) Select the Collision with Fireball event ‘main 1’ tab select the ‘Play Sound’ icon 4) Select the sound_Demon 6) Test it 5) ‘OK’
Finishing and Extending • Add sounds for hitting the baby • Find a sound add it for shooting the fireballs • Add a sound for when Demons and Babies are spawned. • …. • Test and Turn is as Your. Name. Evil. Clutches
- Slides: 51