Skip to content

A small pong-clone, which attempts to (ab)use the Entity-Component-System design pattern

Notifications You must be signed in to change notification settings

ezzieyguywuf/pong-ecs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 

Repository files navigation

w and s for player 1

i and k for player 2

Unfocus window to pause (also gives your CPU a break since the game engine runs in real time)

Build

In order to build this, you will need SFML headers installed in your search path

Then, the following should get you going:

mkdir build
cd build
cmake ..
make
./bin/pong

Goals

On of my goals with this project (as with most of my projects) was to keep the depedency footprint small - SFML is a very lightweight (the lightest weight I could find...) library that provides us with a cross-platform method of making a window and "drawing stuff". If you know of something lighter weight let me know.

Overview

This project utilizes the Entity-Component-System design pattern to a fault (I think even the walls are Entities) to simulate a very rough clone of pong.

Some of the main features of this project:

  • Everything is an Entity - I realize that is overkill, but I wanted to really get a firm understanding all the pros/cons of the ECS pattern
  • Based on the fabulous Fix Your Timestep! article, a fixed timestep is used.
  • A custom (very basic) Engine is used: it's simple, but effective (two of my favourite adjectives)
  • Since everything is an Entity, we have some pretty specific systems to operate on them

About

A small pong-clone, which attempts to (ab)use the Entity-Component-System design pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published