How to Make a Fighting Game in Game Maker

by Katrina Matterhorn ; Updated September 22, 2017

Game Maker is a software application distributed by YoYo games that allows you to create games with little to no programming experience. Advanced users can create complex games with Game Maker's built-in scripting language. Fighting games are considered a complex game to make as they are normally 2D. Even with Game Maker, it will require some background in making games to create one.

Navigate to the "YoYo Games" website. Download and install "Game Maker 8" onto your computer. Reboot the computer if necessary.

Browse through and read all the tutorials on the site to understand how to create games with Game Maker 8.

Construct a basic fighter game to begin with. This will help you get familiar with the features of Game Maker 8. You can create one by entering the following code into the Game Maker 8 create page and clicking the "Launch" button:

self.maxhp = argument0; self.hp = argument0; self.rate = argument1; self.team = false; self.root = 0; self.pari = 0; self.poison = 0; self.alarm[0] = 30; self.pointadd = argument2; self.targetset = false; self.moving = false; self.mvspd = argument3; self.mvspdorg = argument3; self.energy = 100; self.energyrec = argument4 self.cooldown = 0; self.atkmode = 0; self.selected = false; self.slow = 0; self.nearby = 0; self.nearby2 = 0; self.invisible = false; self.attackvisi = true; self.automove = true; self.test = false; self.virus = 0; self.inview = true;

Click the "Launch" button again and enter the following code as well:

if self.root > 0 {self.root -= 1} if self.pari > 0 {self.pari -= 1} if self.slow > 0 {self.slow -= 1} if self.virus > 0 {self.virus -= 1} if self.slow > 1800 {self.slow = 1800} if self.root > 1800 {self.root = 1800} if self.pari > 1800 {self.pari = 1800} if self.cooldown > 0 {self.cooldown -= 1} if self.pari > 0 if self.cooldown = 0 self.cooldown = 1 if self.energy < 100 if self.cooldown = 0 {self.energy += self.energyrec} if self.selected = true {obj_select.x = x; obj_select.y = y} if self.hp < self.maxhp if self.cooldown = 0 if self.poison = 0 if self.virus < 5400 {self.hp += self.maxhp/1600} if self.energy > 100 self.energy = 100 if self.hp > self.maxhp self.hp = self.maxhp self.depth = -y/(room_height) if self.targetset = true if keyboard_check(vk_shift) = false {obj_follow.x = x; obj_follow.y = y} if self.poison > 0 if random(90) < 1 self.poison -= 1; if self.poison > 10 if random(30) < 1 self.poison -= 1; if self.slow > 0 self.mvspd = ((self.mvspdorg)/2); else self.mvspd = self.mvspdorg;

Press "Enter" and click "OK."

Create a basic attack with the following code:

self.tarid = -1; with(mob_parent) {if distance_to_object(other) < 32*3 {if self.selected = true {if self.id != other.id {other.tarid = self.id;}}}} if self.tarid != -1 {with(self.tarid) {self.hp -= 32; {if self.pari < 120 {self.pari = 120;}} instance_create(x,y,dark_strike);} self.energy -= 65; self.cooldown = 30;}

Click "OK" and then, click "Test Game."

About the Author

Katrina Matterhorn is experienced in technology consulting for two of the largest technology companies in the world. Since 2009 she has specialized in technology, business and home and garden articles. She has a double major in English and political science from Austin College in addition to Microsoft and IBM certifications.