cloudwu / skynet

A lightweight online game framework
MIT License
13.33k stars 4.2k forks source link

About Skynet #963

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hello, I have a few questions about Skynet.

1) Is Skynet a framework for MMO server supporting Master/Slave server? 2) Have English language support? 3) Can Skynet be used on Windows? (not Linux) 4) How can I test Skynet in practice on my MMORPG game? 5) Will there be C ++ support? 6) Why did updates come out once a year?

cloudwu commented 5 years ago
  1. Skynet is created for our game, and it is mainly used in online game domain. But it is also used in other places, such as video broadcast service, manager service in router , etc. Actually, there is few exclusive modules for game in the codebase. It's just an actor framework.

  2. It's language independent , but the document is only available in Chinese now. I plan write an English version in future.

  3. No official windows version, but there is a community version https://github.com/dpull/skynet-mingw .

  4. Skynet is only a simple actor framework, there are a lot of work to create a mmorpg server .

  5. Lua is the recommended language, and C API is available. So you can use C++ to write the skynet service (but not recommend).

  6. Skynet is an active project (See the commits in github) , and dozens of game run on it. It just doesn't publish the release often.

ghost commented 5 years ago

I understand, but I still have not found good examples on "C" on how to create a server for the MMORPG, at least a simple server for sending several packages. I want to understand how Skynet works and how to use it. Wiki in Chinese gives me a hard time. What is the network library used in Skynet? How fast is he?

cloudwu commented 5 years ago

If you need a simple server for sending several packages, just lunch skynet by

./skynet examples/config

And type testsocket in the console . You will get an echo server on 127.0.0.1:8001 . See https://github.com/cloudwu/skynet/blob/master/test/testsocket.lua for detail. testsocket is a simple skynet service for receiving and sending packages.

You can also write service on C by C Api, but it is not recommended. Using C to implement lua lib for external C modules or for the performance hot spots.