Shooters in GameMaker J Parker.

Slides:



Advertisements
Similar presentations
Create a Simple Game in Scratch
Advertisements

The essentials managers need to know about Excel
Paragraph Formatting Lesson 4.
In this tutorial, we are going to create: A race car that the user can control with the arrow keys for direction and speed. A simulated road with a striped.
Create a Simple Game in Scratch
FrontPage Express By John G. Summerville Ph.D.©, RN.
Code Club Session 3 Shark Eats Fish. Picture of finished product here.
Using the Unity 98 Cordless Response System Directions : Courtesy of IHC public relations.
GAME:IT Junior Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
GameMaker.  A lot of Different Definitions  Easier to Say What is NOT a Game  Movie is Not a Game  No Active Participation  Final Outcome is Fixed.
Creating a MagicInfo Pro Screen Template
GameMaker Workshop Geoff Cameron Sarah Scialli. What this workshop will teach you GameMaker GameMaker No Programming Required No Programming Required.
Creative Commons Attribution 3.0 creativecommons.org/licenses/by/3.0 Key Abstractions in Game Maker Foundations of Interactive Game Design Prof. Jim Whitehead.
1 iSee Player Tutorial Using the Forest Biomass Accumulation Model as an Example ( Tutorial Developed by: (
Introduction to TouchDevelop
Backgrounds, Inheritance in GameMaker (BrickMania 1 of 2) Foundations of Interactive Game Design Professor Jim Whitehead January 28, 2008 Creative Commons.
PowerPoint Basics Tutorial 2: A Slide Show In this tutorial you’re going to create a presentation from scratch. You will have to keep this presentation.
Introduction to Scratch!
GAME:IT Bouncing Ball Objectives: Create Sprites Create Sounds Create Objects Create Room Program simple game.
Game Maker Day 2 Making a Maze Game.
VIDEO GAME PROGRAMMING Video Game Programming Junior – DigiPutt INSTRUCTOR TEACHER’S ASSISTANT.
GAME:IT Junior Learning Game Maker: The Move Tab.
Learning Game Maker Studio:
Art 315 Lecture 5 Dr. J. Parker AB 606. Last time … We wrote our first program. We used a tool called GameMaker. The program we wrote causes a ball to.
Paragraph Formatting Lesson 4.
Art 315 Lecture 6 Dr. J. Parker. Variables Variables are one of a few key concepts in programming that must be understood. Many engineering/cs students.
How to make a Shooting Target game in Scratch!. WE ARE GOING TO MAKE A TARGET GAME. This game will have: A Target that will move when clicked. A Timer.
Photo Story 3 Importing Pictures. When you create a new Photo Story, the first thing that you will do is import pictures. You can import pictures from.
ACTIVINSPIRE TRAINING Tips and tools for creating Flipcharts on ActivInspire.
Test Environment Algorithm Program Requirements/ Enhancements Analyze the Problem and Design a Solution Programming Software Translates the Source Code.
GAME:IT Helicopter Objectives: Review skills in making directional sprites Create objects that shoot and destroy for points Create random enemies on the.
Game Maker Terminology
Game Maker – Getting Started What is Game Maker?.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Game Maker Galactic Mail Advanced Group: Complete Galactic Mail, then start developing an independent project.
Game Maker Tutorial.
2D Platform Game Game Maker Terminology. Object  Item in a game that has behavior, such as a main character who can move.
Create a Halloween Computer Game in Scratch Stephanie Smullen and Dawn Ellis Barb Ericson October 2008.
Tutorial for Arrays and Lists. Description This presentation will cover the basics of using Arrays and Lists in an Alice world It uses a set of chickens.
2D Design – A Guide! SECTION 1.
Open a new Flash File Action Script 2.0. Create a button like you did last lesson and name it Click to Play.
Galactic Mail Part 2. Winning and Losing Exploding Asteroids Including Scoring Adding Levels And more.
Game Maker Evil Clutches.
How to create a basic game in Scratch. The Scratch Stage The Scratch stage is 480 pixels wide and 360 pixels high x increasesx decreases.
+ This step by step tutorial demonstrates drawing a keyboard illustration using rectangles, grids, move and transform effects.
PowerPoint Basics Tutorial 2: A Slide Show In this tutorial you’re going to create a presentation from scratch. You will have to keep this presentation.
Evil Clown – Quiz 1 Gamemaker Quiz 1. Set up your file Save all finished work to your desktop Final file should be called: “yourlastname_evilclown” Open.
GAME:IT Junior Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a.
GAME:IT Paddle Ball Objectives: Review skills from Introduction Create a background Add simple object control (up and down) Add how to create a simple.
Tank Game Part 2 of 6. Firing Shells Coming up… Players Scores Large Explosions Small Explosions Damage Health Bars Parent Shell Destructible Walls Reappear.
GAME:IT Mario Creating Platform Games Level 4 with GML Game Maker Language (GML) allows users more flexibility in game design. GML is similar to how real.
Creating a Simple Game in Scratch Barb Ericson Georgia Tech May 2009.
Game Maker Tutorials Introduction Clickball IntroductionClickball Where is it? Shooting Where is it?Shooting.
Create a Halloween Computer Game in Scratch
MOM! Phineas and Ferb are … Aims:
Scratch for Interactivity
Game Maker Intro to Programming Game Maker Pop Quiz (Both Groups)
User Interface & Bouncing Ball Game
Competitive Multiplayer Game
BYOB – Costumes.
Intro to GML.
Intermediate game making
Tank Game Part 4 of 6.
Tank Game Part 2 of 6.
Tank Game Part 4 of 6.
Game Maker Intro to Programming Game Maker Pop Quiz (Both Groups)
Transparency & magic pixel
Tank Game Int 10 Unit 3 – Game Maker.
Creating a Simple Game in Scratch
Presentation transcript:

Shooters in GameMaker J Parker

Scrolling Shooter In a scrolling shooter the player controls an object, for example a plane, spaceship, or car, which moves over a scrolling background. Obstacles appear on the background that must be avoided and enemies appear that must be shot. Often bonus objects appear that can be picked up for addition benefits. Examples: Space invaders, Galaxian

1945 The player flies in a plane over a sea and enemy planes try to destroy the player.

Variable A new concept in GameMaker, a variable is a property of an object that can be changed. - The position of an object has an X and Y value The speed of an object has a horizontal and a vertical part The score is a variable The height and width of the room are variables Etc etc etc

Variable A variable can be used to save an important value for later use (EG position of an enemy) A variable can represent a property of an object that is important and needs to be used by the game. A variable can be modified by the game, thus modifying how the corresponding object looks and behaves (EG change object’s speed)

Variable Changing a variable’s value is done as follows: On the CONTROL tab find Testing a value uses the button.

Setting a variable

Testing a variable

1945 Design Description In this game you control a plane flying over a sea. You encounter an increasing number of enemy planes that try to destroy you. You should avoid these or shoot them. The goal is to stay alive as long as you can and to destroy as many enemy planes as you can. Game objects The background is formed by a scrolling sea with some islands. The player’s plane flies over this sea. You can shoot bullets that destroy enemy planes. There are four types of enemy planes: a plane that you encounter and should be destroyed, a plane that fires bullets downwards, a plane that fires bullets towards the player’s plane, and a fast enemy plane that comes from behind rather than from the front.

1945 Game objects The background is formed by a scrolling sea with some islands. The player’s plane flies over this sea. You can shoot bullets that destroy enemy planes. There are four types of enemy planes: a plane that you encounter and should be destroyed, a plane that fires bullets downwards, a plane that fires bullets towards the player’s plane, and a fast enemy plane that comes from behind rather than from the front.

1945 Sounds There are some explosion sounds and there is some background music. Controls The player controls the game with the arrow keys. With the space key you fire a bullet. Only one bullet can be fired every five steps.

1945 Game flow The player immediately jumps into the game. The player has three lives. When all lives are gone a high-score table is shown. Pressing the <F1> (help) key will give a brief explanation. Pressing the <Esc> key will end the game. Levels There is just one level, but more and more enemy planes will arrive: first only the easy type but later the more difficult types.

Motion – An Illusion There are two possibilities for creating the motion illusion: use a tiling background image that moves downwards through the room. build a much larger room but only show part of the room using a so-called view. This view slowly moves upwards over the room. We will use a moving background.

Water We need a background image that looks like a sea viewed from above. We add the following small image as a background resource to the game and give it the name back_water: Filling the background with it will give a nice looking sea.

Water In a scroller, the background image should move. To create a room with a moving background, add a room to the game in the familiar way. At the left click on the tab labeled backgrounds. We need to change three settings here. 1. First of all, because we are going to fill the whole room with the background image, so uncheck the box labeled Draw background color.

Water Second, in the middle click on the menu icon and select the back_water background image. The default setting is to tile the whole room with it so this is what we want. Finally, we need to make the background move. To this end, at the bottom, set the Vert. speed to 2. Now try it.

Motion, water, islands, ... To enhance the feeling of motion we are going to add a few islands to the sea. An easy way would be to create a larger background image and add the island to this background. Iislands will appear in a regular pattern, which the player soon notices. (Bug Bunny) So we choose a slightly more complicated approach and add the islands as objects.

Motion, water, islands, ... Create three sprites with the following images We will never use them for collision checking so uncheck the box Precise collision checking. For each of the islands we create an object. In the creation event we give the object a vertical speed that is the same as the scrolling speed of the background.

Motion, water, islands, ... To make sure that all other objects will stay above the islands we give the island objects a Depth of 10000. (You must run Game Maker in advanced mode to be able to do this!) Instances of objects are drawn in the order of the depth. The instances with highest depth are drawn first. Instances with lower depth are drawn on top of them. So by giving the islands a high depth they will always be drawn first and lie below the other objects.

Now – a trick! When the island disappears below the bottom of the room we want to make it reappear at the top. In the Step event of the island we test whether the island disappeared below the screen and, if so, let it reappear at the top. Note that the variable y indicates the vertical position of the instance.

...... a trick! A value of 0 corresponds to the top of the room. The variable room_height indicates the height of the room. So the island disappears below the bottom of the room when y is larger than room_height. We can use the action to test variable values to see whether the island lies below the room...

...... a trick! So: When the island moves off of the screen at the bottom, and can not be seen any longer, it causes a copy of itself to be made above the screen (where it can not be seen) and at a random horizontal position. It will then move down, onto the screen (becoming visible) and off again, repeating... Only one instance will be seen at a time. This is actually computer programming!

...... a trick! Motion Motion

...... a trick! You can use a variable name, and can actually type full expressions here.

So the process is: In Island object select a STEP event and choose the ‘If a variable has a value’ action. The room (what you can see) has a vertical size (in pixels) of room_height, and starts at a value of 0. This is the ‘y-axis’ as they told us in high school. The position of the island is the variable y. So if y > room_height then we want to move the island.

Where to move to? Negative values of y are above the screen (room). Move islands to y = -65 Moving to the same x position is dull. Select a random x within the room random (room_width) This is in a jump to a given position box in the same STEP event.

The player’s airplane Is controlled by keys. The sprite we’ll use is a small GIF animation. Makes it look like the propellers are moving. Can shoot – space key. Should look like the shooting comes from the centre of the plane. Sprite is 65 pixels, centre is 32,32

Player Motion events (initially) are the arrow keys. Plane must not leave the room, so check! <left> if X is larger than 40 Jump to given position -4, 0 relative to current.

Player Similar for the other 3 directions: <right> if X is smaller than room_width-40 Jump to 4, 0 relative to current. <up> if Y is larger than 40 Jump to 0, -3 relative to current. <down> if Y is smaller than room_height-120 Jump to 0, 3 relative to current.

The player’s cannon We need a bullet sprite. We put its origin in the centre as we did for the main plane. To make it a bit spectacular we use a rather large bullet. Exaggerating things is often important in games. Create an object with this sprite. Creation even: give it a vertical speed of –8 to make it move upwards. Destroy it once it leaves the room - in the step event we test whether the variable x is smaller than –16.

The player’s cannon In the plane’s object box, make an event for pressing the <space> key. This event creates a new bullet instance. An idea: only create one if there are no others. Use the TEST INSTANCE COUNT as we did with diamonds before.

The player’s cannon We don't want too many bullets too fast. How about two bullets every second? This is one bullet every 15 steps. Use a variable can_shoot This is created in a create event for the plane by using a set variable command box. We initially set can shoot to 1 (true)

CAN SHOOT Now in the event, keyboard, space key event: Is CAN SHOOT equal to 1? If so, create a new bullet in front of the plane (0,1-6) set CAN SHOOT to 0. Set alarm0 to 15. alarm0 ???

Alarms An alarm is an ‘automatic’ event that happens when a specified number of game steps have taken place. It is like a timer. If we set alarm0 to 15, then it becomes 0 in 15 steps. At that time and alarm0 event happens, and we can use that to set the CAN SHOOT variable back to 1 again. Thus we can shoot every 15 steps.

Blocks We also need to group actions in the <space> event.

Enemy Planes Type 1: It is a small plane that simply flies downwards. It does not shoot but when it hits the main plane the game is lost. Create sprite, read it in. Create object, assign sprite, vertical speed=4 When plane hits the botton it redraws at randome above the room. Needs: collision with bullet, with player.

Enemy 1 Collision with bullet: it explodes and vanishes Use ADD SOUND and load an explosion noise. These are WAV files, prerecorded. Need a sprite for the explosion, origin 16,16. It is a small animation. Once it finishes playing there is an event called ANIMATION END that we use to destroy the sprite (actually, we’ll MOVE it) Bullet action,collision with plane1: delete self

Enemy 1 Collision with player: it explodes and vanishes Use an explosion noise. Game is over: print message and stop.

High Score

The Game should get harder... We start with one enely plane, and spawn more and more, and different kinds. How do we do that? Using a game agent. We create one more object: controller_enemy. It will control the creation of enemy planes. We make the object invisible during the game by unchecking the box labeled Visible. A sprite is not required for it.

The Game should get harder In its creation event we create an enemy place at a random location just above the room. (the first enemy) We also set the alarm clock to 200. In the event for this alarm clock we create another enemy plane and set the alarm clock again, but this time to 500. The effect is that at the beginning of the game there is one enemy plane. After 200 steps, that is, about seven seconds, a second enemy plane appears. After about 15 seconds, a third plane appears, etc.

High Score