Advertisement
From Scratch

Build a Classic Pong Game From Scratch

by

In this screencast tutorial, I'll show you how to use Construct 2 to make a basic Pong game that can be played either against another person or against a simple computer AI. No previous programming or game development experience is required -- all you need is a copy of Construct 2 (which has a free edition).


Introduction

The game we'll build here is a pretty basic version of Pong that allows you to either play versus a human player on the same computer or against a very basic AI. You can play the finished demo here.

You probably know how Pong works, but just in case:

  • The two paddles are controlled either by the CPU, the arrow keys, or the S and X keys.
  • There is a constantly moving ball that rebounds on walls on top and bottom of the game field.
  • Each time the ball goes beyond a player's paddle, their opponent scores a point.
  • The first player to 10 is considered the winner.

Also, pressing P pauses the game.


What to Download

For this tutorial, you'll need a copy of Construct 2 (C2). The free edition is more than enough for the game we will make here, and is not a limited in time which makes it a perfect choice for beginners.

There are two versions of C2 to consider: Stable and Beta. The latest Beta version is always the most recent version released, and bring new features. However, the Beta versions might introduce new bugs, and are considered to be experimental versions. Stable versions offer bugfixes and an assurance that most of the features are bug free and should work as expected no matter what you do with them. They are not a different branch of the development, but simply milestones labelled as having fixed all the bugs reported in the past.

The development cycle for C2 is quite quick, with new Beta releases roughly once per week and new Stable version releases about every 6 weeks. One thing you should be aware of is that projects saved with an older version (no matter if it is Beta or Stable) can be opened in new versions. The opposite is not true though (you can't open a project saved with r99 in r95).

As I show the use of the Image Editor Tools that were implemented after the latest Stable version (r95) I'd advise you to download this version (r99). If at the time you are reading this tutorial a newer Stable version is available, then download that instead. Every aspect of this tutorial should still apply and you should encounter fewer bugs when working on your own projects.

If you would like to download the final game source, you can get it in CAPX format here, or ZIP format here.


Watch the Screencast

Watch in full screen at 720p (use the Cog icon) for best quality.

What Next?

So you've made a basic Pong game - great! Now take it further. Here are some ideas:

  • Improve the graphics. You could go for an oldschool 8-bit look, a Geometry Wars-style neon look, or something totally different!
  • Add more paddles. What if both sides had one human player and one computer-controlled player?
  • Increase the challenge. Try making the ball speed up as the duration of the game goes on.
  • Introduce power-ups. Make paddles shrink or grow, or move faster or slower.

I recommend you check out the official Construct 2 manual and the tutorials on Scirra.com for more help.

Thanks for watching this tutorial!

Related Posts
  • Game Development
    Game Design
    Designing RPG Mini-Games (and Getting Them Right)Designing rpg mini games hires
    The world is on the brink of being uprooted by a megalomaniac hell-bent on destruction. You and your band of merry followers are the only group able to stop him. What better time to head on down to the stables and breed exotic birds? Or not...Read More…
  • Game Development
    From Scratch
    Make a Megaman-Inspired Game in Construct 2Megaman 400px
    I am going to walk you through the creation of a Megaman-inspired shooter/platformer game. We will be more focused on the shooting aspects of the gameplay rather than the platforming. In this tutorial I will be using Construct 2 as the tool to make the game, but I will explain the logic using pseudocode so that you can follow this tutorial in any language or engine of your choice.Read More…
  • Code
    Corona SDK
    Corona SDK: Create a Balance Ping-Pong GameCoronasdk balance preview@2x
    In this tutorial, I'll be showing you how to create a balance game in Corona SDK. You'll learn more about touch controls and collision detection without physics. The objective of the game is to keep the ball from touching the floor. Read on.Read More…
  • Game Development
    How to Learn
    How To Learn Board Game Design and DevelopmentPreview400
    Over the past decade, board games have gained increased prominence within the game industry. With the growing popularity of Euro-style board games, such as Settlers of Catan, and the constant influx of new games and game types such as Dominion, the popular deck-building game, board games have seen an unexpected resurgence among gamers of all kinds. While board games share many ideas with video games, they are played in a very different way, and often use very different game mechanics. Designing for board games brings about different challenges than designing for video games, but the skills can be applied universally to make all of your games better.Read More…
  • Game Development
    Roundups
    New to Tuts+: Game Development? Start Here.New to game dev
    Welcome to Gamedevtuts+! This site is dedicated to game developers, and we host tutorials, tips, and articles about game design, coding, and working in the industry. Whether you've never made a game before or you're a long-time developer looking to learn something new, this guide will help you find the best of our content.Read More…
  • Game Development
    Game Design
    Old Game, New Twist: A Great Way to Practice Your Gamedev SkillsOld game new twist hires
    So you're an aspiring new game developer, you've made a few simple programs, and you're itching to make an actual game. You probably have lots of ideas, but making games almost always takes more effort than you think it will, so you need to start off simple. You need a small project to let you test your skills and whet your interest. In which case, what better idea than to remake a classic - but with a twist?Read More…