Giter Club home page Giter Club logo

eclipse's Introduction

Eclipse

An experimental primarily 2D game engine written in Nim. Not ready for official use.

I wrote this primarily because other game engines had too many problems ranging from:

  • little to no documentation / outdated documentation
  • unneccesary complication in simple tasks
  • outdated
  • etc

Requirements

  • Nim programming language (ver 2.0.0 recommended because thats what I use)
  • Nim sdl2 library (nimble install sdl2)
  • SDL2 lib files in your Path (or local directory) (SDL2, SDL2-TTF, SDL2-MIXER, SDL2-IMAGE)

The design

Eclipse uses the following Architecture for games:

Game

Every Game has a Game object. This object houses the basics:

  • Whether the game should be running (running)
  • A list of Scenes
  • The current Scene

And also the SDL2 Window and Renderer

Scenes

Every Game needs a Scene, or a list of Scenes, which are used to know what should be updated, rendered, drawn, etc.

A Scene has the following properties:

  • id: The scene is referred to by this ID for simplicitys sake (i.e. "main_scene", "tutorial_scene", etc)

Entities

Entities are members of a Scene, which (usually) are drawn in accordance to their position, scale, sprite, etc.

A Entity has the following properties:

  • id: Similar to before with Scene, used to easily refer to an entity.
  • position: A Vec2 for its X and Y coordinate positions
  • scale: A Vec2 for a Width and Height scaling of its Rect.
  • rotation: A float for deciding the rotation of an entity in a scene.

eclipse's People

Contributors

okzyrox avatar

Stargazers

 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.