Giter VIP home page Giter VIP logo

game's Introduction

Spacepocolypse

Game-Engine Architecture

The game engine architecture will be focused around an entity component system. This system was chosen for its flexibility in creating many unique entities, while alowing for flexible development in the future.

Good resources for learning more about entity component systems follow (in order of helpfulness):

Entity

An entity is just a uid: uint64_t

Components

TransformComponent

Transform data is shared between the graphics and physics systems.

  • Position: x,y,z
  • Rotation: Euler Angle (a, b, y)
  • Scale: scalar

BoxColliderComponent

  • Width
  • Height

MessagingComponent:

The MessagingComponent is used to message other objects in the world. An entity's messaging component tells it what to do when it receives a message. Messages are sent to all nearby entities with a messaging component (broadcast).

Triggers are meant to be used

  • Action: fn(world)
  • Once: bool

PhysicsComponent

  • Velocity: vx, vy, vz
  • Mass: scalar
  • Gravity: bool // if affected by gravity

Graphics

Sprite - file (png?)

UIComponent

Function OnInput decides what to do with a given user-input. This can be things like changing velocity

HealthComponent

The HealthComponent is responsible for keeping track of an entities health. Health is represented as a uin64_t

Systems

PhysicsSystem

The physics system is responsible for:

  • Detecting collisions
  • Updating positions based off of velocity

GraphicsSystem

Engine

The engine is a singleton responsible for running the game (it is the game engine). It has a MainLoop function that holds the "main" function. Rather than using a main function directly this allows other programs to use our engine.

Code Structure

game's People

Contributors

dyv avatar

Watchers

James Cloos avatar  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.