theAdmin10 / olcCGEMac

A port of the Console Game Engine by One Lone Coder to Mac

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

olc::CGE for Mac

This is a port of the ConsoleGameEngine, by OneLoneCoder to Mac. The dependencies that you must have are:

  • Carbon (Installed with developer tools)

Compiling

There is a makefile premade! Just type in the terminal:

$ cd olcCGEMac/
$ make

And it should make a file called 'ouput'.

Differences and Possible Optimisations

The original Console Game Engine utilises the fact that the Windows Command Prompt's charachter buffer can be accessed directly with the <windows.h> header file. Of course, the same cannot be done on Mac. Instead of that, this implementation uses escape sequences that allow many different things. The most important here is the Force Cursor Position sequence, which allows to place the cursor back at the top left of the terminal.

This is much slower than the Engine on Windows, but I could not find any way to access the terminal charachter buffer directly. If someone can manage that, then the speed might rival the original Engine (please contact me if you figure out, I'm really curious how you did it).

About

A port of the Console Game Engine by One Lone Coder to Mac


Languages

Language:C++ 99.3%Language:Makefile 0.7%