Sen descrición

tanghai ee7c4ea1cd Create LICENSE %!s(int64=7) %!d(string=hai) anos
Config 8feb5ac169 整理了代码 %!s(int64=7) %!d(string=hai) anos
Doc 225f6ff846 1.修复一个TimerComonent的bug %!s(int64=8) %!d(string=hai) anos
Excel d2ce74c290 修复读取配置错误,加上一个console插件 %!s(int64=8) %!d(string=hai) anos
FileServer 2bf92b6553 1.增加打包工具 %!s(int64=8) %!d(string=hai) anos
Proto ecc0429e37 1.actor进行了一次更新,location中保存actor的instanceid,actorproxy获取location得 %!s(int64=7) %!d(string=hai) anos
Server 7fc9924ed0 优化了下定时器的实现,保存最小时间,不用每次都去MultiMap取最小值 %!s(int64=7) %!d(string=hai) anos
Tools 8af45a35fc 1.actor做了一次大修改,主要把名字命名得更规范一些,因为有些命名与erlang对应的概念不 %!s(int64=7) %!d(string=hai) anos
Unity c8083a7383 增加unity Log重定向功能。author: NOW %!s(int64=7) %!d(string=hai) anos
.gitattributes 870f80fd54 加入服务端代码 %!s(int64=9) %!d(string=hai) anos
.gitignore 6b9da7a227 减少IpEndpoint的创建 %!s(int64=8) %!d(string=hai) anos
Build.sh df62d16eb8 彻底解决了vs中不能添加cs文件的bug %!s(int64=8) %!d(string=hai) anos
CMakeLists.txt 172ec9d951 1.提供将所有App功能合并到一个进程的功能,AppType=AllServer表示这个进程可以充当所有server,调试非常方便 %!s(int64=9) %!d(string=hai) anos
Client-Server-Mac.sln ed04e8e500 1.Unity Hotfix工程语言限制为C#6.0 %!s(int64=7) %!d(string=hai) anos
Client-Server-Mac.sln.DotSettings ed04e8e500 1.Unity Hotfix工程语言限制为C#6.0 %!s(int64=7) %!d(string=hai) anos
Client-Server-Mac.sln.DotSettings.user ed04e8e500 1.Unity Hotfix工程语言限制为C#6.0 %!s(int64=7) %!d(string=hai) anos
Client-Server.sln 7a7d58b604 1.去掉消息继承机制,主要是很多序列化库无法继承,包括ILRuntime端的protobuf %!s(int64=7) %!d(string=hai) anos
Client-Server.sln.DotSettings 9235accef0 修复工程引用dll路径错误 %!s(int64=7) %!d(string=hai) anos
Client-Server.sln.DotSettings.user c4930ded5d 1.每个Component都增加了一个InstanceId,这个id每个对象是唯一的,区分开来逻辑Id跟对象Id,比如Player对象的Id在整个游戏期间都是不变的,但是每次登录Player的InstanceId都应该不一样,actorid应该用InstanceId来处理。例如erlang的进程id是actorid,但是erlang进程中的玩家id不会是进程id。 %!s(int64=7) %!d(string=hai) anos
LICENSE ee7c4ea1cd Create LICENSE %!s(int64=7) %!d(string=hai) anos
README-EN.md 43dc946192 更新readme,增加斗地主demo链接 %!s(int64=8) %!d(string=hai) anos
README.md 220abeaa0f ET3.2 %!s(int64=7) %!d(string=hai) anos
Run.sh df62d16eb8 彻底解决了vs中不能添加cs文件的bug %!s(int64=8) %!d(string=hai) anos
Start.sh df62d16eb8 彻底解决了vs中不能添加cs文件的bug %!s(int64=8) %!d(string=hai) anos

README-EN.md

中文

Chinese Tencent QQ group : 474643097
google group

1.A distributed server, can use visual studio debugging,N->1

Generally speaking, distributed server starts a lot of processes, once the process is more, single step debugging becomes very difficult, leading to server development basically rely on log to find the problem. Common development has opened a lot of game logic process, not only the slow start, and find the problem and not convenient to log pile check problem in a pile, this feeling is very bad, so many years no one can solve the problem. The ET framework uses a component design similar to the watch pioneer, and all server contents are disassembled into components, and the components that need to be mounted according to the type of server are started. It is a bit like a computer, the computer module is split into memory, CPU, motherboard parts and so on, collocation of different parts can be assembled into a different computer, such as home desktop CPU, motherboard, memory, graphics, display, hard disk. And the company uses the server does not need the display and graphics card, the Internet bar computer may not need hard disk, etc.. Because of this design, the ET framework can be all server components are linked in a server process, the server process has all the functions of the server, a process can be used as a whole set of distributed servers. It's also like a computer, which has all the computer components, and it can be used as a company server or as an Internet cafe.

2.A Distributed server, can freely split function,1->N

Distributed server to develop various types of server processes, such as Login server, gate server, battle server, chat server friend server, a server, the traditional development mode need to know in advance the function which should be put in the server, when more and more functions, such as chat on a central server then, need to split out into a separate server, this will involve a large number of code migration work, tired. The ET framework does not really need to be concerned about what kind of functionality the current development will place on server, and only uses one process to develop it, and the function is developed into a component. Is it convenient to use a multi process configuration to publish it into multiple processes when you publish it? How do you split the server?. You can split it with very few code changes. Different server hangs different components on it?!

3.Cross platform distributed server

ET framework uses C# as server-side, and now C# is completely cross platform, install.Netcore on Linux, you can do without modifying any code, you can run. Performance, now.Netcore performance is very strong, faster than Lua, python, JS faster. The game server completely be nothing difficult. We usually use VS to develop debugging on windows, and release it to Linux on the time of release. ET framework also provides a key synchronization tool, open unity->tools->rsync synchronization, you can synchronize the code to the linux

./Run.sh Config/StartConfig/192.168.12.188.txt 

You can compile and start the server.

4.Provide Coroutine support

C# naturally supports asynchronous variable synchronous syntax async and await, much more powerful than Lua and python, and the new version of Python and JavaScript language even copy the C#'s co - operation grammar. There is no asynchronous syntax to support remote calls between distributed servers and a large number of servers, and development will be very troublesome. So Java does not have asynchronous syntax, doing single service is OK, not suitable for large-scale distributed game server. For example:

// Send C2R_Ping and wait for response message R2C_Ping
R2C_Ping pong = await session.Call<R2C_Ping>(new C2R_Ping());
Log.Debug("recv R2C_Ping");

// Query mongodb for a ID of 1 Player and wait for return
Player player = await Game.Scene.GetComponent<DBProxyComponent>().Query<Player>(1);
Log.Debug($"print player name: {player.Name}")

It can be seen that with async await, asynchronous operations between all servers will become very coherent, without disassembling into multiple sections of logic. Greatly simplifies the development of distributed servers

5.Provide actor message mechanism similar to Erlang

One of the advantages of Erlang language is the location transparent message mechanism. The user does not care about which process the object is in, and when you get the ID, you can send the message to the object. The ET framework also provides a actor message mechanism, the entity object need only hang ActorComponent components, the object becomes a Actor, any server only needs to know the object ID can send a message to it, totally do not care about this entity in which server, in which physical machine. This principle is actually very simple, the ET framework provides a location server, all mounted ActorComoponet object will own ID with location registration to the location server, the other server when sending the message object if you don't know the real position of the object, will go to the location server query, query to the position to be transmitted.

6.Provide server with dynamic update logic function

hotfix is an indispensable component of game server function, design using the ET framework, the design can be made to watch the pioneer, only component members, no way, all the way into an expansion method in hotfix DLL, when reload DLL can reload all logic more hot.

7.Client can hotfix

Because of the IOS restrictions, the previous unity hot update generally use Lua, leading to unity3d developers to write two kinds of code, trouble to death. Fortunately, the ILRuntime library comes out, using the ILRuntime library, unity3d can use the C# language to load the hot update DLL for thermal update. One drawback of ILRuntime is that it doesn't support VS debug at development time, which is a little uncomfortable. The ET framework uses a pre compiled instruction ILRuntime to seamlessly switch. ILRuntime is not used when developing, but using Assembly.Load to load the hot update dynamic library, so that it can be easily used VS single step debugging. At the time of release, defining the precompiled instruction ILRuntime can seamlessly switch to using ILRuntime to load the hot update dynamic library. So it's easy to develop and convenient

8.The client server uses the same language and shares the code

Download the ET framework, open the server project, you can see that the server referenced a lot of client code, through the client code approach to achieve a double end shared code. For example, the network message between the client and server can share a file on both sides, adding a message only needs to be modified.

9.The UDP TCP protocol seamlessly switches

The ET framework not only supports TCP, but also support the reliable UDP protocol, UDP support is a package of ENet library, using the ENet and hero alliance network library, its characteristic is rapid, and the performance of the network packet loss situation is also very good, that we tested TCP in packet loss 5%, MoBa game card no, but the use of ENet, 20% packet loss still don't feel a card. Very powerful.

10.there are many, I will not detail

A. and its easy to check CPU occupancy and memory leak check, vs comes with analytical tools, no longer worry about performance and memory leak check
B. uses NLog library, hits log and its convenience, when develops normally, may hit all the server log to a document, also does not need each document search log again
C. unified the use of Mongodb bson serialization, the message and configuration files are all bson or JSON, and later use mongodb to do the database, and no longer need to format conversion.
D. provides a powerful AI behavior tree tool
E. provides a synchronization tool
F. provides command line configuration tools, configuring the distribution is very simple The server side of the ET framework is a powerful and flexible distributed server architecture, which can fully meet the needs of most large games. Using this framework, the client developer can complete the double end development by himself, save a lot of manpower and material resources, and save a lot of communication time.

Usage method:
start-guide
component-design
network-design

Chinese Tencent QQ group : 474643097
email: egametang@qq.com