Code Monkey home page Code Monkey logo

Comments (3)

NaturalTangent avatar NaturalTangent commented on July 19, 2024

I'm using Linux Mint Debian Edition (amd64). As far as I can remember, I made the following changes to build;

Part1
Edit olcPGEX_Graphics3D.h. Add the following to the includes near the top;
#include <cstring>

I had to install some dependencies by executing the following, I'm not sure if all of the open gl libs are required - I was too lazy to investigate (you may have to install more dependencies because I'm not sure what I already had installed);

sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev libpng-dev

Build using;

g++ -o CarCrimeCity cCarCrimeCity.cpp -lX11 -lGL -lpthread -lpng -I.

Part2
Edit olcPGEX_Graphics3D.h. Add the following to the includes near the top;

#include <cstring>

Edit olcPGEX_Graphics3D.h, around line 206 and add an extra '1.0' to the dir parameter;

void SetLightSource(uint32_t nSlot, uint32_t nType, olc::Pixel col, olc::GFX3D::vec3d pos, olc::GFX3D::vec3d dir = { 0.0f, 0.0f, 1.0f, 1.0f }, float fParam = 0.0f);

The version of lua in the repo appeared to be incomaptible with my system, so I installed the following;

sudo apt-get install liblua5.3-dev

Build using;

g++ -o CarCrimeCity cCarCrimeCity.cpp cAutomata.cpp cCell_Building.cpp cCell.cpp cCell_Plane.cpp cCell_Road.cpp cCell_Water.cpp cCityMap.cpp cGameSettings.cpp main.cpp olcPixelGameEngine.cpp -lX11 -lGL -lpthread -lpng -llua5.3 -I.

from olcpixelgameengine.

jesusrp98 avatar jesusrp98 commented on July 19, 2024

Thanks, that helped!

from olcpixelgameengine.

lunaneff avatar lunaneff commented on July 19, 2024

I had to add -lstdc++fs to the g++ arguments (Manjaro, G++ 9.3.0)
Edit: I just tried to run it. It segfaults before rendering the first frame

from olcpixelgameengine.

Related Issues (20)

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.