Sign in to follow this  
ronnie_o

Allegro -- Trying to Double Buffer, Crashing

Recommended Posts

This is my first post. I'm trying to get into 2D games with C++ & Allegro. I've studied C++ for the past year or two in my free time, and I'm very into OOP. I'm trying to make a simple game of checkers. I can draw the checkerboard directly to the screen, but I can't get double buffering to work. Of course when I draw to the screen it flickers like crazy. When I try to make and blit a buffer, my program shows a black screen for one second then crashes. I am compiling with Dev-CppPortable which runs on a Kingston 1Gb USB drive. Can someone help me? The entire code can be found at: http://telenetwork.com/~ronald.oburke/checkers_gamedev.txt The main issue is in the graphics object located at the bottom of the code. A lot of the the design (especially the singleton Game object) is copied from tutorials on the web. (I think the tutorial was by Joost Ronke?) I DO NOT claim this to be my original work. However, the idea to make a checkers game was mine. And the checker and checkerboard are pretty much my own creations.

Share this post


Link to post
Share on other sites
For the time being, I'm creating a new project with the sole purpose of double buffering anything at all to the screen. Maybe If I start that way instead of adding DB into an existing project I'll learn what the problem is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this