How to make a game like Pong with Felgo

Tutorial Chapters

  1. Overview
  2. Creation of a Felgo game
  3. GameWindow, Scenes and Physical Worlds
  4. The Level and the Ball
  5. Level Boundaries
  6. Paddles
  7. HUD
  8. Menus
  9. AI
  10. Special Effects
  11. Music and Sound
  12. Further Perspectives


In this tutorial, you will create a simple Pong game step by step, complete with collision detection, a ball bouncing with physics effects between paddles which can be dragged via touches. If you are new to Felgo, it may help to see Getting Started with Felgo and Qt Creator before proceeding with this tutorial.

Pong is a very popular game created by Atari in the 1970s. "Pong is a two-dimensional sports game that simulates table tennis. The player controls an in-game paddle by moving it vertically across the left side of the screen, and can compete against either a computer controlled opponent or another player controlling a second paddle on the opposing side. Players use the paddles to hit a ball back and forth. The aim is for a player to earn more points than the opponent; points are earned when one fails to return the ball to the other." - Citation from Wikipedia. More background information can be found on The Pong Story.

After a small brainstorming you might have an idea what will be needed in the game. This is a small list of components which are necessary for the game:

  • GameWindow with a Scene
  • Level
  • Ball
  • Wall
  • Goal
  • Paddles
  • HUD
  • In-game Menu
  • Main Menu
  • MenuButton
  • Music & Sounds

Now you know what might be necessary when building the game. So let's start and build VPong.

This game is also available with full source code when you download the Felgo engine in the <installation directory>/Demos/VPong directory. The online version is available here: VPong Demo.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support