An distributed game server framework based on [Socket4Net](https://github.com/lizs/socket4net)

lizs ef33860b75 Update README.md 1 year ago
.nuget 2e55095f37 V0.0.1 released 1 year ago
Editor 349940eced modify proj depedency 1 year ago
Pi.Editor a2decbefda Configuration module(csv, txt, key-value) 1 year ago
Pi.Framework a2decbefda Configuration module(csv, txt, key-value) 1 year ago
Publish 349940eced modify proj depedency 1 year ago
Sample 349940eced modify proj depedency 1 year ago
.gitattributes be8dc40d38 :octocat: Added .gitattributes 1 year ago
.gitignore 0a90f9644f liscense(MIT) 1 year ago
Pi.docx cd9fed49d4 Architecture doc 1 year ago
Pi.sln 2269ec2aec reconstruct projects 1 year ago
README.md ef33860b75 Update README.md 1 year ago
Server160628.vspx 2269ec2aec reconstruct projects 1 year ago
license.txt 0a90f9644f liscense(MIT) 1 year ago
rebuild_all.bat e3d3bf6487 Nuget support 1 year ago

README.md

#C# game server framework(based on socket4net)

####Features

  • Easy to use
  • Distributed
  • Automatic codes generation supported
  • Configurable

####Getting Pi To install Pi, run the following command in the Package Manager Console

PM > Install-Package Pi

####Framework Pi consists of 3 parts:Node/ECS/Editor #####Node Your server cluster may have multiple processes to work together, every process can perform as a server or an client or both.In pi, We call a server or an client as a Node. So, one process may have serveral Nodes, they are managed by NodesMgr.

Node can communicate with others(remote) by a set of Push/RequestAsyn interfaces. Node and NodesMgr has their own configuration(standard xml), for example:

  <!--single node-->
  <node name="Chat server"
    type="Chat"
    guid="{12B3E06E-6CFF-4BC8-8DF9-67F03273C299}"
    ip="127.0.0.1"
    port="6001"
    pwd="">
  </node>
  
  <!--multiple server nodes-->
  <servers>
    <node .../>
    ...
  </servers>
  
  <!--multiple client nodes-->
  <clients>
    <node .../>
    ...
  </clients>

You can also config Redis nodes, for example:

  <redisnodes>
    <node name="Redis client"
    type="Redis"
    guid="{D49A172A-00DD-4E8D-AB21-490F35A560A2}"
    ip="127.0.0.1"
    port="6379"
    pwd="" />
  </redisnodes>

#####ECS ECS is an Entity/Component/System implementation.

Entity indicates what data does an object have. Component indicates what can an object do.
Entity may has serveral Component, and it's codes could automatic generated by Pi.Editor.exe. Component is freedom, you can write the game driver logic in these Components.

#####Editor It's main goal is to make Entity definition visually, but it's just a commandline tool in current development. Editor generate Pi.Gen.dll finnally, which contains the game protocol, constants and entities.

######Protocol define Standart google protobuf message.

######Entity define Json file, for example:

{
  "Comment": "实体定义",
  "Name": "Ship",
  "Properties": [
    "One",
    "Two",
    "Three"
  ],
  "Components": [
    "ModifierComponent",
  ]
}

####Question QQ group:Click to join
e-mail : lizs4ever@163.com