Git Product home page Git Product logo

engine's Introduction

engine

Engine is a work in progress entity-component-system based 3D game engine.

Some highlights:

  • Physics support
  • Deferred rendering used to optimize for many light sources
  • Support for loading .obj models

Sample

// We are going to use render, physics and input systems
attach(new RenderSystem("monkey"));
attach(new PhysicsSystem());
attach(new InputSystem());

// Set up the controllable player
Entity *player = new Entity();
player->attach(new Transform(0.0, 2.0, 0.0));
player->attach(new PhysicsCharacter());
player->attach(new InputController());
player->attach(new Camera(CAMERA_DEFAULT));
attach(player);

// Set up a point light
Entity *light = new Entity();
light->attach(new Transform(1.0, 2.0, 0.0));
light->attach(new Light(LIGHT_POINT, Color(255, 255, 255)));
attach(light);

// Set up a monkey
Entity *monkey = new Entity();
monkey->attach(new Transform(2.0, 1.0, 0.0));
monkey->attach(MeshLoader::load("monkey.obj", Color(200, 150, 50)));
monkey->attach(new Physics(PHYSICS_DYNAMIC));
monkey->attach(new Renderer());
attach(monkey);

// Set up the ground
Entity *ground = new Entity();
ground->attach(new Transform(0.0, 0.0, 0.0));
ground->attach(ShapeGenerator::plane(Color(200, 50, 50), 50.0, 50.0));
ground->attach(new Physics(PHYSICS_STATIC));
ground->attach(new Renderer());
attach(ground);

The sample code above produces the following scene:

Sample screenshot

Build

The following libraries are required to build:

To build the library along with the samples, just run make.

engine's People

Contributors

rools avatar

Watchers

Alexis Lavaud 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.