Skip to content

MumflrFumperdink/olcPGEMac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 

Repository files navigation

olc::PGE 2.0 for Mac

The PixelGameEngine 2.0, by OneLoneCoder, has been officially fully ported to Mac in only the header file! Make sure that your mac is at least on macOS 10.15. The dependency that you must have is:

  • libpng (May be installed with brew, use the command brew install libpng)

That's it!

Using the Command Line

Simply go inside the "PGE App.xctemplate" folder - there's a makefile. Use it in the terminal by typing this:

$ cd OneLoneCoder/PGE\ App.xctemplate
$ make

You should end up with a file called 'ouput'. It should open a window like this:

Image4

Xcode Installation

First, make sure you have Xcode, and if not, download it. All you need to get the project up and running in Xcode is to use the Shell script called, "setup.sh". Make sure you have all of the dependencies installed:

$ cd olcPGEMac
$ sudo ./setup.sh

Then, you should open up Xcode (you should quit it if it is already open) and "Create a new Xcode Project". In the macOS tab, you should see a OneLoneCoder section with a PGE app:

Image1

Once you name your app, and save it, you should see a screen like the following. Now, before you can start using this with Xcode, you need to deal with the fact that libpng is unsigned otherwise you will recieve a runtime error. Here are the two ways to do that:

Use Your Own Developer Codesign

This method is preferred because you only need to do this once and then you can make as many projects as you like using libpng.

In the Terminal, execute this command to sign the library:

sudo codesign -f -s "YOURDEVELOPEREMAIL" /usr/local/lib/libpng*.dylib

If you get an ambiguous email error, try adding "Mac Developer: " at the start of the email quotations.

Disable Library Validation

This method will need to be done for every project that uses libpng.

Click the "Signing and Capabilities" tab at the top:

Image2

Once you are there, go down to the "Hardened Runtime" section and click on "Disable Library Validation":

Image3

That's it! You can go to main.cpp in the folder on the left to start coding. Build it first to make sure it works!

About

A port of the PixelGameEngine by OneLoneCoder to Mac

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages