Giter Site home page Giter Site logo

ngn's Introduction

Another Game Engine

Just another rudamentary game engine to experiment with rendering pipelines in OpenGL.

Quick start

Options

  • run with built-in local server

    build/ngn --local We can run with a built in server on a seperate thread, this is just quick way of hosting. The game will also share some memory with the server

  • join a target server

    build/ngn --join <ip> To join a server you need to target a valid ip address

  • host a standalone server

    build/ngn --server <ip | optional> To host a standalone server without a game client you can run this command. omitting the ip will default to loopback interface, which is likely what you would be running on anyway.

Pre-requisite

Linux

We use raylib in the backend NOTE: remember to build it so that it can be dynamically linked

git clone https://github.com/raysan5/raylib.git raylib
cd raylib/src/
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED # To make the dynamic shared version.
sudo make install RAYLIB_LIBTYPE=SHARED # Dynamic shared version.

to compile and run the engine

./build.sh && build/ngn

Windows

Windows build does not statically link raylib, recommend using x64-mingw-gcc, alternatively you can compile a binary using the docker image in .Dockerfile

Debugging

The build.sh file builds with debug symbols so that you can run ./build.sh && gdb build/ngn if you want to run it in GDB. This can be nice, also particularly because we often times want to hot-reload the engine while testing. (Keep in mind there are some clear limits to the hot-reload feature)

NOTE: If you find it annoying to leave and enter gdb everytime, you can build and source the new binary from within gdb as well

gdb
shell ./build.sh && file build/ngn

Logging

At the moment the best way to change logging is to change the LOG_LEVEL in the logging initializer in src/main.c

	initialize_logging(NLOG_LEVEL); // log level is lowest level logged, inclusive

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.