Giter VIP home page Giter VIP logo

balthazar's Introduction

Initial project Objective

Create a game engine based on micro components As final objective, create a visual environment for creating 2d games

Work in progress

minimalistic demo here

Documentation

Gengine documentation here

Description

The engine has three basic classes GameObject, Component, and Sprites.

GameObject

Its the base class of almost all object inside the engine. It's main functionality is to generate an easy way to pass arguments when creating new instances. It provides functionality to establish optional and necesary arguments. Those validation only ocurre during debug mode.

Component

They are mico modules singletons which are injected inside the engine. The idea is to have every part of the engine as a Component: Display, Sound, Input, Scene, AI, etc... Each component is added to the engine, the engine creates the instance, initialize the componend and makes it visible to the rest of the components.

Time

Time is a component which contains:

  • Counter of seconds since the game started
  • Count of miliseconds it took do draw the last frame
  • deltaTime is a inverse relative unit to fps. If the game runs at 60 fps, its 1. If its 30fps then 2. Used to make the movement be independent of frames

Installation

npm install mpm start

Debug Mode

There is a Debug class to log in messages and throw errors.

  • Debug.log
  • Debug.warn
  • Debug.error

Those method only function if debug mode is active, to activate it create a global variable and set it to true:

window.GENGINE_DEBUG_MODE = true;

TODO

  • Fix sprite drawing order
  • Remove tilemap from engine

balthazar's People

Contributors

eugenioenko avatar mpandolfelli avatar

Watchers

 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.