GithubHelp home page GithubHelp logo

pioneer's Introduction

Pioneer

Build statuscodecov


ATCS with network sync framework in pure C#.

Pioneer includes two concepts: ATCS development framework and Network synchronize framework.

ATCS Development Framework

ATCS composes the public ECS and the classic MVC develop pattern, and abstract the kernal thought:

Actor is a container; Data (Trait) and Logic (Control, System) are separated.

  • Actor is only a container.
  • Data (Trait) is attached to Actor.
  • Logic component can't contains Data.
  • Control is single Actor's logic component, and System is a group of Actors' logic component.

ATCS (Actor + Trait + Control + System) could compose different development solutions:

  • Actor + Trait + System equals ECS pattern.
  • Actor + Trait + Control equals GameObject + Component pattern in Unity.

Of cause you could compose two type patterns in one project as well.

Network Synchronize Framework

Network Synchronize Framework is based on the purpose that same code run anywhere. It hides the low level network transfer and could define the data synchronize over network in application level.

Please refer to UE4 replication server framework.

Quick Start

A quick sample show how to implement ECS pattern.

Create IWorld

IWorld world = Pioneer.Pioneer.New()
...
// Update world with frame delta time.
world.Update(deltaTime);
...
// Dispose the world.
world.Dispose();

Create IActor

IActor actor = world.CreateActor();

Add Trait

public class MyTrait : Pioneer.Trait
{
    public string Name;
}

actor.AddTrait<MyTrait>().Name = "User";

Add System

pubic class MySystem : Pioneer.System
{
    private IGroupFilter filter = null;

    public override void OnInit(IWorld world)
    {
        // Define filter conditions.
        IMatcher matcher = world.NewMatcher().HasTrait<MyTrait>();
        this.filter = world.GetFilter(this, TupleType.Job, matcher);
    }

    public override void OnUpdate(IWorld world, float deltaTime)
    {
        foreach (var a in this.filter.Actors)
        {
            // Handle actors that satisfy the conditions.
        }
    }
}

world.AddSystem<MySystem>();

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.