diff --git a/README.md b/README.md index 4cb7411bb..b171455ea 100644 --- a/README.md +++ b/README.md @@ -8,28 +8,27 @@ [![windows-vs2022](https://github.com/sniper00/moon/actions/workflows/windows-vs2022.yml/badge.svg)](https://github.com/sniper00/moon/actions/workflows/windows-vs2022.yml) -# Demo -- [MoonDemo](https://github.com/sniper00/MoonDemo.git) - # Moon -Moon is a lightweight online game server framework implement with actor model. One thread may have 1-N luaVM, they use message queue communication. There are many features for game server development: +Moon is a lightweight online game server framework implement with actor model. One thread may have 1-N service(luaVM), they use message queue for communication. There are many features for game server development: - Less core code, easy to learn - Cross-platform (Windows, Linux, MacOS) - Optimized networking - - tcp - - websockets - - http + - Tcp + - Websockets + - Http - Lua coroutine based asynchronous - - coroutine-socket - - timer - - inter luaVM communication - - inter cluster(process) communication - - redis/mysql/pgsql/mongodb async driver + - Coroutine-socket + - Timer + - Service-to-service communication + - Interprocess(cluster) communication + - Redis/Mysql/Pgsql/Mongodb async client driver - High performance and optimized Lua Json library - Lua protobuf library - Lua filesystem - Recast Navigation +- Lua zset library for ranklist + # OverView ## Framework @@ -58,13 +57,20 @@ Moon is a lightweight online game server framework implement with actor model. O https://github.com/sniper00/moon/releases ```shell -# run echo server -./moon example/helloworld.lua -# another terminal run client(coroutine socket writed) -./moon example/helloworld_client.lua -# input any string +# This is an example show put different services in one process +./moon example/main_game.lua + +# Run test +./moon test/main_test.lua + +# Run script in the example directory, e: +./moon example/example_timer.lua + ``` +## Demo +- [MoonDemo](https://github.com/sniper00/MoonDemo.git) + ## Manual Build 1. Make sure your compiler(msvc2019, gcc 9.3+, clang 9.0+) support for C++17 or [Install `C++17` Compiler.](https://github.com/sniper00/moon/wiki/Build#%E5%AE%89%E8%A3%85c17%E7%BC%96%E8%AF%91%E5%99%A8)。 diff --git a/test/aoi.lua b/test/aoi.lua index 0f1828008..0512e8271 100644 --- a/test/aoi.lua +++ b/test/aoi.lua @@ -1,4 +1,5 @@ local moon = require("moon") +local test_assert = require("test_assert") local aoi = require("aoi") local AOI_WATCHER = 1 @@ -40,7 +41,7 @@ local function test(space) aoi_erase(space, 2) aoi_insert(space,2,42,5,0,0,0,AOI_MARHER) - moon.exit(-1) + test_assert.success() end local function run()