Giter Club home page Giter Club logo

olcpgemac's Introduction

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!

olcpgemac's People

Contributors

mumflrfumperdink avatar mumflr avatar linnydude3347 avatar tso996 avatar tiansongyu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.