gamemaker breakout remake




Information about object:
Sprite: spr_ball
Solid: true
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object




Create Event:
execute code:

motion_set(random(180),3);//start ball moving
Collision Event with object obj_wall_tlr:
execute code:

move_bounce_all(true);//bounce off walls
Collision Event with object obj_wall_bottom:
execute code:

show_message("Game Over");//die when hit bottom
game_restart();
Collision Event with object obj_player_bat:
execute code:

move_bounce_all(true);//bounce off the bat



Collision Event with object obj_stone_blue:
execute code:

move_bounce_all(true);//bounce off brick


Information about object: obj_player_bat
Sprite: spr_player_bat Solid: false Visible: true Depth: 0 Persistent: false Parent: Children: Mask:
No Physics Object
Step Event:
execute code:

//simple movement code
if (keyboard_check(vk_left))  {x-=5;} 
if (keyboard_check(vk_right))  {x+=5;} 


Information about object: obj_stone_blue
Sprite: spr_stone_blue Solid: true Visible: true Depth: 0 Persistent: false Parent: Children: Mask:
No Physics Object
Collision Event with object <undefined>:
execute code:

instance_destroy();
Draw Event:
execute code:

draw_sprite(spr_stone_blue,0,x,y);

No comments:

This will make you a better decision maker | Annie Duke (author of “Thinking in Bets” and “Quit”, former pro poker…

Annie is a former professional poker player, decision-making expert, author, and special partner at First Round Capital.  ͏     ­͏     ­͏   ...

Contact Form

Name

Email *

Message *