You are not logged in.

#1 2007-09-05 08:24:51

pecan
Member
Registered: 2007-04-06
Posts: 93

Pong in C++

The other day i wanted to play pong like it was originally designed but discovered that most of the current versions are either quick demo apps or have to many features that make them nothing like the original. This gave me the idea of designing my own pong in c++. So with the help of a tutorial where I took some ideas http://www.cppgameprogramming.com/cgi/nav.cgi?page=pong
I started writing it. I came across two problems, firstly the engine that tutorial uses, allegro, seems pretty old and incredibly buggy with modern video cards. THe other was the stucture that tutorial follows seems an odd way of going about it. So I have two questions
Firstly, whats a lightweight engine I can use to control the graphics (programming in C++) It needs to run on windows and linux
And does anyone have any pointers on how to start the project.

Offline

#2 2007-09-05 08:56:42

wu.soldier
Member
From: Poland
Registered: 2006-12-19
Posts: 22

Re: Pong in C++

Try SDL (http://www.libsdl.org/index.php). It supports windows and linux, works with C++ and has a lot of tutorials.
I've also found tutorial how to write Pong in SDL - http://www.linuxdevcenter.com/pub/a/lin … tml?page=1

Offline

#3 2007-09-06 04:14:40

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: Pong in C++

Allegro has worked fine for me in the past, but SDL is probably even easier for a task of this magnitude. Drawing to a bitmap is really the only graphically hairy part of SDL, and you won't need to do that for pong.

Offline

#4 2007-09-06 11:40:30

bwalk
Member
Registered: 2007-03-21
Posts: 177

Re: Pong in C++

Use plain old OpenGL. It's portable, it's fast. Maybe you want a toolkit. Once you get the basics, the possibilities are endless.

Offline

Board footer

Powered by FluxBB