GithubHelp home page GithubHelp logo

konstantintomashevich / emergence Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 0.0 7.27 MB

Flexible set of libraries for gameplay development. Currently under development.

License: Apache License 2.0

CMake 2.81% C++ 96.46% PowerShell 0.30% Scala 0.04% SuperCollider 0.05% JavaScript 0.34%
emergence sober cpp open-source gamedev game-development libraries

emergence's Introduction

Emergence

Test

Emergence is a flexible set of libraries for gameplay development that aims to become modular game engine in the future. Currently under development.

Architecture

Emergence architecture is built upon concept of units: relatively small modular libraries that provide singular feature to the user and depend on one another in order to do it. There is 3 kinds of units:

  • Interface units provide only headers.
  • Concrete units provide headers and one concrete implementation for them.
  • Abstract units provide headers with abstract API and several implementations for them as concrete units.

Every unit is either an object or interface library, therefore it is possible to explicitly control what goes into which output artefact (shared library or executable).

This architecture aims to:

  • Make link time polymorphism easy to use through abstract units.
  • Make modularization straightforward, easy to define and implement.
  • Make it easy to separate modules into several shared libraries.

Features

Core

Resource management

Data management and processing

Celerity

Celerity is an ECS-like game world architecture solution. It provides interface for building modular worlds, that consist of multiple logical parts. For example, tools like unified editor might be modelled as a world with multiple independent sub worlds. It has lots of extensions:

Other

Executables

emergence's People

Contributors

konstantintomashevich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

emergence's Issues

Create 2d platformer with multiple levels to test simple game development pipeline.

We need to create a simple 2d platformer in order to ensure that:

  • We can work with multiple levels without problems.
  • We can easily implement loading.
  • Simplistic UI features is enough for platformer main menu and other menus.
  • Current Celerity features and extensions are suitable enough for game logic.

Also, it is needed to draft architecture for planned game creation framework.

Celerity: Simplistic UI extension on top of ImGUI and RenderBackend.

We need a UI extension for Celerity that is complete enough to make games with medium UI complexity or editors with limited UI complexity. ImGUI looks like a perfect backend for that task, but we need to hide it under service API.

Initial list of required features:

  • Buttons.
  • Labels.
  • Images.
  • Element containers (panels).
  • Linear layout (vertical and horizontal).
  • Free anchored layout.

Better standard way to place cascade removers in graph

Recently I had to start adding comments like this:

// In fixed update, removal is usually done at the end of the frame after mortality feature,
// which is usually dependent on input processing, therefore we need to make these removers
// dependencies of hierarchy cleanup.

Which is awful, because it's just binding engine-level graph layout to gameplay-specific feature -- mortality.

One possible solution to avoid such complication is to create separate common slot for transform-related cascade removal and place all cascade removers there. The same thing can be done for all cascade removers including asset ones.

Implement "world inheritance" through registry sharing

We need to work with assets and configs in "top level" world in order to save them while transitioning from one scene to another. To implement that we need some kind of "world inheritance" through partial sharing of world registries. For example, if parent world has storage for the type we need, we create query on parent world level instead of child world level.

But thinking of game as "multiple worlds" might be incorrect. We can think of one world with data views tree: this will provide the same multiple registries feature and the same registry sharing, but without exposing the problem of calling update multiple times.

Celerity::Render2d: Implement viewports with optional viewport-to-viewport blending.

Currently Celerity::Render2d works with predefined full-window viewport. We need to change that by adding viewports feature:

  • Any number of Viewport instances can be added.
  • Rendering is driven by Viewport's.
  • Viewports are sorted by sort index.
  • Viewport coordinates are configured in pixels.
  • Viewports can overlap each other and can be blended: blending is useful for rendering something like UI in separate viewport.

Virtual File System

We need to use VFS layer across the framework instead of plain file system access. Having VFS provides us with ability to:

  • Mount multiple roots, therefore asset discovery through VFS would be more versatile.
  • Hide actual file access under the hood, therefore we would be able to easily implement read-only packages.
  • Easily configure game assets location without hardcode.

Resource cooking platform and game packaging for Windows.

We need a basic resource cooking platform that:

  • Takes all resources from mount list.
  • Converts yamls to bins.
  • Creates resource provider index.
  • Packages everything into read-only packages with no directories nesting (to save memory).
  • Is easy to extend and add additional steps (like filtering assets and checking whether they are referenced), including game-specific ones.

Also, we need a game packaging script (at least for Windows) that packages game executables and cooked resources into one directory with appropriate mount lists.

Celerity: Extract RenderCommon extension from Render2d extension

Some stuff from Render2d, like textures, materials and material instances, is common for different render extensions. For example, UI may need to use the same texture mechanism as Render2d. We need to extract that common stuff into RenderCommon extension so it is usable for any render-related extension.

Implement RenderBackend service and rework Celerity::Render2d as library that uses RenderBackend.

We cannot hide render backend, like BGFX, under the Celerity::Render2d extension, because other extensions may need to access render backend too. For example, UI needs to render its stuff directly without touching Render2d. In some cases we might want to have UI, Render2d and Render3d working all at once in one window. That means that all render-dependant extensions should be built upon one shared rendering service that will hide real render backend under the hood.

Improve Celerity::RenderFoundation.

Current version of Celerity::RenderFoundation was made as an initial prototype and needs to be updated: we need a proper support for framebuffers, render to textures and other core rendering features.

Serialization rework

Goals:

  • Make resource loading easy and straighforward.
  • Make resource discovery easy and straighforward.
  • Get rid of file separation and make it possible to serialize complex objects.
  • Provide simple interface for async file loading.

Proposed changes:

  • Add VECTOR and PATCH mapping archetypes in order to cover all use cases with StandardLayoutMapping: any object should be mappable even if field projection is not possible.
  • Rework serialization to object loading from StandardLayoutMapping: no more bundles or other special file formats. Everything should be covered by mapping after VECTOR and PATCH addition.
  • Split JobDispatcher jobs into foreground and background, then add ability to limit thread usage by background threads. Otherwise resource loading would be able to capture all threads and pause the application.
  • Create separate ResourceRegistry library for resource discovery and easier resource loading. The main principles are:
    • All possible resource types should be registered.
    • Every resource object consists of {ObjectTypeName}.{UniqueId}.{bin/yaml}. Is {ObjectTypeName} part of {UniqueId}? To be decided.
    • Other resources files can be registered as external binaries.
    • Resource discovery can be run automatically or loaded from binary discovery cache.
    • There is an API for easy loading by type+id pair and easy iteration of all objects of requested type.

Implement Input extension for Celerity

Celerity needs an input processing extension, that can be used both for device input (for now only keyboard) and for external input (for example from UI extension). SpaceShooterDemo already has an input system, we need to rework it in a more-Celerity-way and add proper support of external actions dispatch to it.

Experiment: Consider Model-Logic split in Celerity and its extensions

Data structures definitions are required everywhere, but not logic, connected to them. For example, cooking tool does not need to know about physics implementation, but still needs to convert physics configs and prefabs with physics components.

I'm not sure whether it is a real problem and whether it can be solved in a pretty way or not, but it might be worth to consider different solutions.

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.