Philip Thomas' Consolue Graphical User Interface (PTCGUI)

     I wrote this one my sophomore year in high school. The goal was to make games like pong for the console. The sample project below shows how to use the PT_CGUI class to draw any symbol, in any color, anywhere you want within the console. This can be used in concjunction with the normal iostream commands.

     I also included a function to change the console title and another to get key presses without the characters appearing in the console: you don't want letters showing up in the console if they are commands in a game such as "go left" or "go right"!

     Two of the projects below are for Visual C++ 6.0, and the last is for 9.0. One of the 6.0 versions and the 9.0 version do not include double buffering - rather they are simple projects. One of the 6.0 projects has basic double buffering implemented, which can make writing games easier (you don't want to constantly clear the console between frames, or else it will flash. Double buffering removes this flash by only updating "pixels" that changed). I don't recall when I added the double buffering, but I haven't double checked the code - so no guarantees that it is bug free!

A screenshot of random rectangles:


VC++ 6.0 Project (17.4KB .zip)
VC++ 6.0 Double Buffered Project (20.9KB .zip)
VC++ 9.0 Projects (6.81KB .zip)
Take me home
Created: 6-24-2009. Last Modified: 6-24-2009. © Philip S. Thomas