Saturday, February 25, 2017

#5 How to make A mario game in Game maker

How to Make a Platform Game in 


This will require a little bit of experience with Game Maker. Don't do this for your first game.

Steps

  1. Image titled Make a Platform Game in Game Maker Step 1
    1
    Make a simple block sprite for your wall. Also make a sprite for your player. For the wall call it spr_wall and the player spr_player
  2. Image titled Make a Platform Game in Game Maker Step 2
    2
    Make an object called obj_wall and check the solid box.
  3. Image titled Make a Platform Game in Game Maker Step 3
    3
    Make sure you select the wall sprite.
  4. Image titled Make a Platform Game in Game Maker Step 4
    4
    Make an object and call it obj_player.
  5. Image titled Make a Platform Game in Game Maker Step 5
    5
    Make sure you select your player sprite.
  6. Image titled Make a Platform Game in Game Maker Step 6
    6
    For obj_player: go to add event and click Step then Step again. Then go to the control tab, and drag and drop the 'execute code' action.
  7. Image titled Make a Platform Game in Game Maker Step 7
    7
    Now in the code box put in
    // simple Platforming code!
    // if place_free(x,y+1) { gravity = 0.7 gravity_direction = 270 } else { gravity=0 gravity_direction = 270 } //the arrow keys<,>,^ if place_free(x-4,y)and keyboard_check(vk_left){x-=4} if place_free(x+4,y)and keyboard_check(vk_right){x+=4} if !place_free(x,y+1) and keyboard_check(vk_up){vspeed=-10}
  8. Image titled Make a Platform Game in Game Maker Step 8
    8
    Just copy and paste.
  9. Image titled Make a Platform Game in Game Maker Step 9
    9
    For obj_player: Go to add event, then Collision, then with obj_wall.
  10. Image titled Make a Platform Game in Game Maker Step 10
    10
    Put in this code (go to the control tab and drag and drop 'execute code':move_contact_solid(direction,12); vspeed=0;
  11. Image titled Make a Platform Game in Game Maker Step 11
    11
    Make a room, call it room_1, make a level design by clicking with the selected object and save the room (click the tick at the top.)
  12. Image titled Make a Platform Game in Game Maker Step 12
    12
    Run the game!

No comments:

Post a Comment