Introduction:
Glenn: “Alright, team, today we’re going back to basics. We’re coding Pong in GameMaker Studio.”
Rob: “Pong? That’s just two paddles and a ball, right? Easy.”
Charlie: “I once played Pong with a pizza slice as a paddle.”
Kaitlin: “That explains the grease stains on your controller.”
Scene 1: Setting Up The Paddles
Danny: “Ah, Pong. I remember when it first came out. Simpler times.”
Charlie: “So, we just draw two rectangles, right?”
Rob: “I got this!” (Types rapidly) “draw_rectangle(50, 50, 100, 200, true);”
Kaitlin: “Rob, that’s just one paddle. And it’s filled in.”
Glenn: “We need it outlined. Set the last argument to ‘false’.”
Charlie: “And let’s use sprite_create_from_surface
for some fancy graphics!”
Rob: “Charlie, it’s Pong. It doesn’t need fancy graphics.”
Kaitlin: “Let’s just get the basics right first.”
Glenn: “We need two paddles, Rob. One for each player.”
Rob: “Right, right. I’ll duplicate the code and adjust the coordinates.”
Charlie: “Can we make one paddle look like a slice of pizza?”
Kaitlin: “No, Charlie. Focus.”
Danny: “Back in my day, we didn’t have these fancy functions. We had to code everything from scratch.”
Glenn: “And now we have GameMaker Studio. Let’s make the most of it.”
Scene 2: Making the Ball Move
Charlie: “Now, the ball. It’s like the sun, right? Big and round.”
Rob: “It’s just a circle, Charlie. I’ll use draw_circle
.”
Kaitlin: “We’ll use the speed
and direction
variables. Simple physics.”
Rob: “I’ll set the speed to 5 and direction to 45 degrees. That should make it bounce diagonally.”
Glenn: “Good. Now, for the bouncing, we’ll use the collision_rectangle
function.”
Charlie: “Why not use place_meeting
? It sounds friendlier.”
Kaitlin: “Because we’re dealing with rectangles, Charlie. Not friendly meetings.”
Rob: “Okay, I’ve set up the collisions. Let’s test it.”
Danny: “And… the ball’s stuck in the paddle.”
Charlie: “It’s having a friendly meeting!”
Kaitlin: “We need to adjust the collision detection.”
Glenn: “Let’s add some if
statements to check the ball’s position and adjust its direction.”
Rob: “Got it. If the ball hits the top or bottom, we’ll reverse its vertical direction.”
Charlie: “Like a pinball machine! Can we add flippers?”
Kaitlin: “One step at a time, Charlie.”
Scene 3: Scoring and Game Over
Glenn: “We need a scoring system. Every time the ball passes a paddle, the other player scores.”
Kaitlin: “We can use the draw_text
function to display the scores.”
Rob: “I’ll set up two variables, player1_score
and player2_score
.”
Charlie: “And when someone reaches 10 points, they win! And get a pizza.”
Danny: “Always with the pizza, Charlie.”
Glenn: “We’ll use an if
statement to check the scores and display a ‘Game Over’ message.”
Rob: “And then restart the game?”
Kaitlin: “Yes, but let’s add a ‘Play Again’ option. Use the keyboard_check
function to wait for a key press.”
Charlie: “And if they press the ‘P’ key, they get a pizza?”
Danny: “Sure, Charlie. A virtual pizza.”
Rob: “I’ve added the scoring system. Let’s test it out.”
Glenn: “Looks good. Just a few more tweaks and we’ll have a working Pong game.”
Kaitlin: “And no pizza, Charlie.”
Launch Time
Kaitlin: “Alright, we have a basic Pong game. Not bad, team.”
Rob: “I still think it needs more graphics. Maybe some explosions.”
Charlie: “And pizza power-ups!”
Glenn: “Let’s stick to the basics for now. We can always add more features later.”
Danny: “Just like the good old days. Start simple, then build on it.”
Credits/Outro:
Glenn: “Thanks for joining us on this coding adventure. If you want to see more coding challenges, let us know.”
Charlie: “And send pizza!”
Kaitlin: “Don’t forget to like, share, and subscribe. And maybe send Charlie a pizza so he stops asking.”
Rob: “Till next time, keep coding!”
Danny: “And reminiscing about the good old days.”