• Advertisement
  • entries
  • comments
  • views

Going backwards - Digital adventures of the second dimension

Sign in to follow this  



Hello! It has been a long time since my last journal entry here on GameDev. I have been extremely busy, but I hope everyone has had a great Christmas/New Year/Other Holidays!

Newton's Enigma is still under active development. I recently downloaded the December UDK and I am excited to begin playing around with some of the new features.

Today's post is going to focus on a different project of mine. As part of my research project I happen to work with middle school students in order to teach them game creation. We accomplish this task by using the Game Maker program by YoYo games. The challenge that we present to the middle school students is during a school year they are to develop their very own Game Maker game in teams after having been taught basic game design/programming concepts.

While I have game development experience in other languages, and Game Maker experience, I have never developed a full game in Game Maker. I decided that if I was to ask my students to create a game in Game Maker, I must create a game of my own. In my mind confidence in an instructors abilities must be demonstrated and not assumed.

The project

So I decided that I needed a game project to develop and I settled on creating a generic two dimensional side scrolling platform game. This type of game demonstrates a number of valuable concepts such as scrolling, enemy AI, and variables without a lot of other potentially more complicated issues such as layering and coordinate transformations (which would be present in top down/isometric perspectives).

The goal is to create the entire set of graphics, animations, and programming code (in game maker) myself. I am using royalty free music and sound effects from the internet (properly credited) because such things are beyond my scope of both time and experience.

I am a huge fan of Dos games such as Commander Keen, and Hocus Pocus, and so I decided that I would like to involve some similar elements but under my own style. In terms of design principles the entire game is to be made up as I go along but I want the game to grow organically. What this means is that every feature is to be heavily tested and prototypes and nothing is to be added for the sake of adding it, but because it is directly needed by the game. For instance I would not add springs soley because another game has springs. I would only add such elements if I had a level or a design that required them.

The game is designed and created in Game Maker 8 Pro, using the sprite editor for all graphics and designed with a 320x240 view.



When possible the Game Maker visual scripting system is being used for the game. However there are some situations in which this system becomes unwieldy to use. In this situation we make use of the GML script ability.

One script that was written was to display helpful messages to the user. This piece of script is draw_info_box.

sign_x = argument0;
sign_y = argument1;
sign_txt = argument2;


border_size = 2;
sign_width = string_width(sign_txt) + border_size * 2;
sign_height = string_height(sign_txt) + border_size * 2;

draw_rectangle(sign_x - sign_width / 2,sign_y,sign_x + sign_width/2, sign_y + sign_height,false);
draw_rectangle(sign_x - sign_width/2 ,sign_y,sign_x + sign_width/2, sign_y + sign_height, true);

draw_text(sign_x + border_size ,sign_y + border_size, sign_txt);


Another script that was used is when it comes to getting the player out of a platform. We check for collision with a platform base (making use of the parent system of Game Maker which is a lot like Inheritance in other languages) and we move the player up a pixel until we are no longer overlapping the platform.

ypos = y;
col_id = collision_rectangle(x + sprite_width/4,y+sprite_height,x + (sprite_width*0.75),y+sprite_height+1,platform_base,false,true);
if(col_id >= 0 && vy > 0)
vy = 0;
while(collision_rectangle(x + sprite_width/4,ypos+sprite_height-2,x + (sprite_width*0.75),ypos+sprite_height-2,platform_base,false,true)>=0)
ypos = ypos -1;
jump = 0;

col2_id = collision_rectangle(x,y,x+sprite_width,y+1,ladder_bottom_obj,false,true);
if(col2_id >=0 && climb)
climb = false;
ypos = ypos -2;
y = ypos;

if(x+vx < 0 || x+sprite_width + vx > room_width)
vx = 0;

The Orb count is dynamically drawn like so:

x1 = view_xview[0] + view_wview[0] - 20;
y1 = view_yview[0] +2;
orb_txt = string(orb_cnt-instance_number(orb_obj))+'/'+string(orb_cnt);
if(orb_cnt - instance_number(orb_obj) == orb_cnt)
draw_text(x1,y1, orb_txt);

The orbs above the door rotate around and increase every time an orb is collected. This is also done using a script:

total_orbs = hero_obj.orb_cnt-instance_number(orb_obj);
orb_ang = 0;
if(total_orbs > 0)
orb_ang = 360.0 / total_orbs;

for(orbIdx = 0 ; orbIdx < total_orbs;orbIdx+=1)
orb_x = x +8+cos((rotate+orbIdx*orb_ang)*(3.14159/180))*20;
orb_y = y - 20- sin((rotate+orbIdx*orb_ang)*(3.14159/180))*6;

What I have learned so far

One thing that I have been enjoying about this project is the fun of creating a random game. It is nice to create a game in a stress free manner and my game development experience in other languages/technologies has helped me make good use of Game Maker features. I also feel more confident in my ability to use the Game Maker technology to teach Game Programming.

While the game is still under development, you are all welcome to download the full Game Maker 8 Pro files and a demo exe from my website: CGame Demo.

My only restriction on using the file is that if you use anything from it, please credit me for the use. You are welcome to use the graphics, borrow pieces of the code, or whatever you would like to do, so long as I get a mention. The graphics are not great but I know that even programmer art can be difficult to come by.

Thank you for reading!
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement