Giter Club home page Giter Club logo

artemis-odb-contrib's Introduction

artemis-odb-contrib

Build status Discord Chat License

Drop-in extensions for artemis-odb. Event bus, scheduled operations, deferred systems, profiler, abstract and prefab systems, components and networking. Well, eventually anyway.

When to use this

If you want to quickly prototype a game without getting bogged down by the details of entity component systems, this package will help get you started.

I use this toolkit for jam games. You are welcome to use it for whatever you need!

Alternatively, if you want to properly set up artemis-odb + libgdx or playn with all fancy features, check out these instead:

Library Versions

Artemis-odb 2.4.0-SNAPSHOT, (Optional) LibGDX 1.9.14.

License

This work is licensed under MIT License except some small snippets from LibGDX are licensed under Apache 2.0. Apache 2.0 license can be found under contrib-core\LICENSE.libgdx.

SPDX-License-Identifier: MIT AND Apache-2.0

Download

Maven

<dependency>
  <groupId>net.mostlyoriginal.artemis-odb</groupId>
  <artifactId>contrib-core</artifactId>
  <version>2.4.0-SNAPSHOT</version>
</dependency>

<dependency>
  <groupId>net.mostlyoriginal.artemis-odb</groupId>
  <artifactId>contrib-eventbus</artifactId>
  <version>2.4.0-SNAPSHOT</version>
</dependency>

Gradle

dependencies { 
    compile "net.mostlyoriginal.artemis-odb:contrib-core:2.4.0-SNAPSHOT"
    compile "net.mostlyoriginal.artemis-odb:contrib-eventbus:2.4.0-SNAPSHOT"
}

artemis-odb-contrib's People

Contributors

daanvanyperen avatar greghib avatar junkdog avatar laurencewarne avatar namek avatar piotr-j avatar schosin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

artemis-odb-contrib's Issues

Proper dispatch strategy

Currently we only have BasicEventDispatcher, which isn't much more than a proof of concept. Implement something based on bukkit or guice style event busser, but without the static references.

Asynchronous events

Asynchronous events: Artemis doesn't seem to be particularly well suited for asynchronous activity, so we currently do not support it. It does have plenty of advanced use cases though.

drop-in basic networking for artemis-odb

Authoritive server/client setup.

Leverage Artemis' design and make networking accessible out of the box for ecs/networking newbies. High level convention/annotation based networking of components, on top of some networking systems with a nice example or two, client/server system reuse. The actual networking framework can be completely outside ECS.

Take an existing network framework, integrate it in Artemis ECS pattern like you would any externalized framework, and provide enough sauce so it both becomes a drop in solution and a great reference for prototype networking with Artemis.

junkdog/artemis-odb#103

Epic ticket, break up as we go!

** Reworked list **

  • udp (lossy) channel
  • tcp (robust) channel
  • client packets
    • keyboard input packet
    • network event
      • refusal handling (client futures, basically a rollback request)
  • mirror entity + component to clients
    • create from archetype
    • transfer component state
      • developer codes component <-> packet
      • subscribing clients to components
        • configurable lossy attributes
        • configurable lossy update interval.
        • configurable robust attributes
        • configurable robust update interval.
    • removeFromWorld
  • subscribing clients to entities

Core

  • authoritative listener server on client.
  • component delta updates (server to client)
  • scoping (what entities to network)
  • entity network-id
  • entity level networking metadata (what fields do we sync, how do we sync)
    • manual entity serialization helper & dirty state detection
    • automated reflection based (de)serialization helpers & dirty state detection
  • dispatching networked events (see #4)
    • remote entity instancing
    • remote entity destruction
  • customizable lifecycle management.

Not right now:

  • Component or template level networking metadata.
  • support for diverging systems, where client and server have different implementations of the same component.
  • dedicated server
  • component level networking metadata
  • Interpolation
  • Extrapolation
  • gain/loss, min/max caps on fields.
  • UDP support (error correction on lossy protocol)
  • GWT support
  • Ready system
  • Lobby system
  • Component recording (rollback for hitscanning)
  • Client agnostic networking frameworks / swappable networking frameworks

Support limited state rewinding

Support (temporary) rewinding of monitored components to a past reference frame. Typical use case would be rewinding position and animation state to perform hit detection to network clients reference frame, but could be used for non-network purposes as well.

see #5

Delayed/polled event dispatcher

Instead of dispatching events synchronously and possibly causing a stack overflow, run a queue between system calls.

Also reconsider asynchronous events, might be useful across world instances.

see #11

Artemis on Rails

commandline/UI tool iterative scaffolding generator for:

  • components + systems
  • factories

@junkdog mused:
DSL-like configuration is too brittle, but an efficient UI could probably do the job + suggest sane defaults. Powered by FreeMarker, it should be pretty easy to stub a lot of things.

As for UI framework - I'd shy away from the graphical ones and instead use a text UI - Lanterna is pretty nice and works with real terminals + can fall back on emulating its own.

junkdog/artemis-odb#194

Consider drop in support for lock-step networking

While it runs somewhat contrary to the client/server setup we're going for, consider if there is a practical way to achieve drop in artemis plugin for lock-step networking for situations where basic client/server solution would break down (high unit count RTS for example).

http://www.gamasutra.com/view/feature/3094
http://answers.unity3d.com/questions/568206/rts-multiplayer-lock-step-simulations-and-fixed-ga.html
http://clintonbrennan.com/2013/12/lockstep-implementation-in-unity3d/

see #5

BOX2D System

Delegating things like child/parent to Box2D might be a useful route to take.

DeferredEntitySystem into SuperSystem/SubSystem

SuperSystem / SubSystem - transform DeferredEntitySystem from contrib into an easier to understand setup. This'll be the first step towards render pipelines and such.

  • Look at @junkdog's super secret stuff.
  • Talk it over with the rest!
  • Replace subscriptions with ODB subscriptions (faster).

Icebox โ„

These tickets are too much effort right now or need a sponsor.

  • [Serialization] Entities lazy loading
  • #29 clean keyboard/joystick control scheme.
  • #18 Annotation assisted libgdx widget/component wiring.
  • #25 Consider drop in support for lock-step networking.
  • #26 Cumulative transformations
  • #27 Entity hierarchy (parent/child)
  • #66 smoothcam
  • #84 Fire and forget systems.
  • #65 System grouping and custom delta.
  • #19 Examples for artemis-odb core functionality
  • Advanced Networking
    • #23 Client/Server world matching.
    • #24 Support limited state rewinding.
    • #3 GWT REST
    • #16 Asynchronous events
    • #21 Refactor networking to support local (networkless) marshaling
    • #22 Support world lifecycle surviving connections.

[Cleanup] Merge component packages

The split between libgdx and vanilla component packages is just causing a lot of work without much benefit, just merge into the libgdx package!

Client/Server world matching.

In a multiworld setup we need to ensure both parties are in a sane world state. Can't have a client in a lobby syncing with a server in gamemode.

Drop-in event bus for artemis-odb

Implement low throughput synchronous immediate delivery event system. Like all modules in this package, should provide drop-in and go functionality. Main reason to code this feature now is the potential synergy with the networking module.

junkdog/artemis-odb#17
junkdog/artemis-odb#102

Planned Features

Now:

  • EventManager to register and dispatch events.
  • @Subscribe in managers and systems on methods with one event argument to denote event handlers.

Nice to have:

  • gwt support using the reflection tools available to us.
  • Priority option on events. Otherwise order by system priority.
  • Support to register eventhandlers and dispatch events outside artemis systems and managers.
  • Event priority
  • Event cancellation

Not right now

  • High throughput
  • Asynchronous events: Artemis doesn't seem to be particularly well suited for asynchronous activity, so first version will not support it.
  • Event Polling: https://github.com/apotapov/gdx-artemis has a polling event system. I'm not convinced this is the way to go, regardless of the benefits (no reflection, process() inline execution). Need some better use cases for events in a system as opposed to using reflection. I'm confident we can emulate subscription in gwt, and it's a system I like the most, so we'll just go with that for now.
  • Pooling: We'll get there if GC becomes an issue.

Support world lifecycle surviving connections.

network connections will probably need to last longer than the world does. (lobby world to game world). Maybe nested worlds? Different worlds can share the same network profile, but not the same networking systems.

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.