Jelajahi Sumber

move ecs classes into dirs

jstzwj 6 tahun lalu
induk
melakukan
07a7e2717e

+ 5 - 13
README.md

@@ -8,9 +8,9 @@ MineCase
 #### [English](https://github.com/dotnetGame/MineCase/blob/master/README.md) | [中文](https://github.com/dotnetGame/MineCase/blob/master/README-zh.md) 
 
 `MineCase` is a cross-platform application with distributed server of `Minecraft`. 
-The project is designed to create a high-performance, distributed system by using isolating different components through actor mode. 
-Different chunks are managed by different servers so that all players can play in a world. This makes minecraft servers more scalable.
-Anarchy servers can allow more players to join in without waiting in queue by using distributing server.
+The project is designed to create a high-performance, distributed system by using Entity-Component-System and virtual actor mode. 
+Different chunks are managed on different servers so that more players can join in and play in the same world. This makes minecraft servers more scalable.
+Servers like Anarchy servers can allow more players to join in without waiting in queue by using distributing server.
 It written in `C#` with `.NET Core 2.0` env and based on `orleans` framework to work with released [1.12 protocol](https://minecraft.net/en-us/article/minecraft-112-pre-release-6).
 
 **MineCase is not stable and lack of many features now. Please don't use MineCase in production unless you know what you're doing.**
@@ -35,17 +35,9 @@ It written in `C#` with `.NET Core 2.0` env and based on `orleans` framework to
     * **Linux** : Run the `build_and_run.sh`.
     * **Win** : Double-click `build_and_run.bat`.
 
-## Install (Docker)
-* 1 . Download a `Docker for linux` from this [page](https://docs.docker.com/engine/installation/).
-* 2 . Un-zip `Docker for linux` and run the `server` on Linux
+## How it works
+About Virtual ECS: 
 
-	```bash
-	url=https://raw.githubusercontent.com/dotnetGame/MineCase/master/build/docker/linux/docker-compose.yml
-	curl -o docker-compose.yml $url
-	docker-compose up
-	```
-	##### Tips:
-	* You can stop the server by enter `docker-compose stop`.
 
 ## Get Involved
 We need help to make MineCase better. You can help us by fixing bugs, developing new features, improving documents.  

+ 24 - 0
src/MineCase.Engine/Context/Context.cs

@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace MineCase.Engine
+{
+    public class Context
+    {
+        public void AddEntity(Guid guid)
+        {
+
+        }
+
+        public void RemoveEntity(Guid guid)
+        {
+
+        }
+
+        public bool HasEntity(Guid guid)
+        {
+            return false;
+        }
+    }
+}

+ 0 - 0
src/MineCase.Engine/Contexts.cs → src/MineCase.Engine/Context/Contexts.cs


+ 1 - 2
src/MineCase.Engine/Context.cs → src/MineCase.Engine/Context/Matcher.cs

@@ -4,8 +4,7 @@ using System.Text;
 
 namespace MineCase.Engine
 {
-    public class Context
+    public class Matcher
     {
-
     }
 }

+ 0 - 0
src/MineCase.Engine/Entity.cs → src/MineCase.Engine/Entity/Entity.cs


+ 0 - 0
src/MineCase.Engine/ICleanupSystem.cs → src/MineCase.Engine/System/ICleanupSystem.cs


+ 0 - 0
src/MineCase.Engine/IExecuteSystem.cs → src/MineCase.Engine/System/IExecuteSystem.cs


+ 0 - 0
src/MineCase.Engine/IInitializeSystem.cs → src/MineCase.Engine/System/IInitializeSystem.cs


+ 0 - 0
src/MineCase.Engine/ISystem.cs → src/MineCase.Engine/System/ISystem.cs


+ 0 - 0
src/MineCase.Engine/ITearDownSystem.cs → src/MineCase.Engine/System/ITearDownSystem.cs


+ 2 - 1
src/MineCase.Engine/Component.cs → src/MineCase.Engine/System/ReactiveSystem.cs

@@ -4,7 +4,8 @@ using System.Text;
 
 namespace MineCase.Engine
 {
-    public class Component
+    public class ReactiveSystem : ISystem
     {
+
     }
 }

+ 0 - 0
src/MineCase.Engine/Systems.cs → src/MineCase.Engine/System/Systems.cs


+ 23 - 0
src/MineCase.Server.Grains/GameContextGrain.cs

@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+using MineCase.Engine;
+
+namespace MineCase.Server.Grains
+{
+    public class GameContextGrain
+    {
+        private Context _context;
+
+        public Task AddEntity(Entity entity)
+        {
+            return Task.CompletedTask;
+        }
+
+        public Task RemoveEntity(Guid guid)
+        {
+            return Task.CompletedTask;
+        }
+    }
+}

+ 1 - 0
src/MineCase.Server.Grains/MineCase.Server.Grains.csproj

@@ -29,6 +29,7 @@
   </ItemGroup>
 
   <ItemGroup>
+    <ProjectReference Include="..\MineCase.Engine\MineCase.Engine.csproj" />
     <ProjectReference Include="..\MineCase.Server.Interfaces\MineCase.Server.Interfaces.csproj" />
   </ItemGroup>
 

+ 2 - 1
src/MineCase.Server.Interfaces/Class1.cs → src/MineCase.Server.Interfaces/IGameContext.cs

@@ -1,8 +1,9 @@
 using System;
+using Orleans;
 
 namespace MineCase.Server.Interfaces
 {
-    public class Class1
+    public class IGameContext : IGrainWithStringKey
     {
     }
 }