Seed Game Engine - JavaScript Game Engine using WebGL2

in #utopian-io6 years ago (edited)

GitHub PR (for this blog)
GitHub Repo (Seed Engine)
GitHub Repo (Seed Engine Game Boilerplate)

Hello! It's been a while since my last post. Over a month ago I wrote about the first steps of development of Adventurer Simulator, an Idle MMO RPG based in a browser. Today, I am reintroducing the core part of Adventurer Simulator; the Seed Game Engine. The game part of Adventurer Simulator, now known as Kingdom of Eloria, will be posted about in the future.

This is the first post about Seed Engine. Unfortunately, since functionality is still heavily limited, using the Engine to make a game now may be a bit of a let down. You can create objects and one basic shape with various colors, and logic for movement, rotation, and scaling. I hesitated on writing this introductory post until the core structure of the ECS system was complete. Now that it is, Seed Engine is able to take contributions without it interfering with other core code changes.

What is the Seed Game Engine?

The Seed Game Engine, or Seed Engine for short, is a JavaScript game engine designed to work with Seed. The Seed Engine is an Object Orientated (OO), Entity Component System (ECS) which follows similar patterns to Unity. The engine is written in ECMAScript6, uses WebGL2 for rendering, and GLSL shaders for multiple linear computations, such as collisions. The engine is only handling 2D at this time, there are plans for 3D. Contributions are welcome to convert the Engine to 3D rendering. The engine has been designed to keep in mind 3D rendering without changing any of the current systems.

5,000 Separate SceneObjects at ~51fps. See boilerplate to run your own!

To begin development with the engine, you can clone the Engine from GitHub, or use NPM: npm install seed-engine. There is also a bolierplate project here, which will let you jump right in to development.

Seed Engine Structure

Documentation

You can view the documentation here, there is some missing documentation on members. The Seed Engine is documented using ESDocs, a documentation framework for ECMAScript.

Roadmap

The Seed Engine scope is only as large as KOE needs to finish its development. All systems that have to be completed to allow KOE to run are integrated into the Engine. In other words, the Engine will contain fewer features until later development (late 2018), but will not take shortcuts in design, allowing future features to be seamlessly implemented.

The documentation contains much of the engine structure already, and you can see more about the Engine structure and game design in this document.

Engine Features:

ECS System
  • Core Game Loop
  • Baseclasses
  • Scenes and Scene Management
  • Game Objects
    • Scene vs Persistent Objects
  • Viewports
  • BaseComponent
Components
  • Renderable, Renderable2D, RenderableSprite, RenderableShape
  • Audio
  • Collider, Collider2D, CircleCollider, BoxCollider
  • Transform
  • Input
    • Controllers
  • Physics
Rendering (2D for now):
  • Multiple Views per Scene
  • Matrix transformations
  • Camera per view
  • Multiple Lights per view
  • Multiple Shapes
  • Textures (Sprites)
  • Animations (SpriteSheet Textures)
  • Particles & Particle Systems
  • Effect shaders (Shadow, fire, water)

Systems

All systems are managed by a central "Manager" singleton class. All Managers in the engine derive from the base class Manager. Managers focus on one system of the Engine; if an object type needs (for example) a centralized calculation or reference list, one manager should handle all this for that object and the object's descendants.

Below is a list of all systems and a short description. More details can be found on their documentation pages.

  • AudioManager - Unimplemented. Will manage the audio components and handle playing audio with the WebAudio API.

  • DOMManager - Manages the connection between the DOM and the Engine, by gathering and modifying the DOM elements when required, and holding reference.

  • EngineManager - Core engine management. Calls control functions such as setup, update, teardown, and pause functions for the other Managers.

  • InputManager - Unimplemented. Manages keyboard and mouse input.

  • NetworkManager - Unimplemented. Plugs into another external system for communicating with Seed, the decentralized network.

  • PersistentManager - Manages all Persistent Game Objects. All Game Objects follow an Updateable pattern (with added functionality for components). The PersistentManager manages the updateable calls for any object that is to exist across scenes, a PersistentObject.

  • PhysicsManager - Unimplemented. Centralized physics calculations using GLSL computation shaders. My proposal contains a quick test on optimizations with GLSL shaders.

  • ProgramManager - Manages WebGL programs so that Renderables may swap out programs without recreating them.

  • RenderManager - Manages setup, rerendering, and cleanup of the WebGL2 canvas context.

  • SceneManager - Manages scenes on a stack, and contains helper functions to retrieve scenes and register scene-scope classes to them.

  • UpdateableManager - Manages all Updateables. Anything which derives from Updateable will be registered with this manager to get a global ID.

Contributing

The GitHub readme links to the contributor section, where feature requests can be viewed. The Seed Engine is open source under the MIT license, anyone may contribute. At this time, features or updates must follow the guidelines of the request.

Sort:  

Thanks for the contribution, @jaegar! It would've been great if you could've made it more clear which part of the code was created by yourself since the PR contains 339,535 additions!

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Oh yea, sorry I didn't clean that up. Those extra lines were from the generated documentation. I think I'll compile those on a different branch next time.

Thanks!

Hey @jaegar
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.29
TRX 0.11
JST 0.033
BTC 63945.57
ETH 3135.76
USDT 1.00
SBD 4.00