####Introduction: This is a simple but complete example project that demonstrate skynet game framework's usage. It implements a multi room server, that many client can connect to this server, switch between rooms, talk in the room publicly or send private message to specific user privately. User will got exp in each room and can give exp to other user, the user have highest exp will be auto elected as the room manager, who has the power to kick other member out of the room. Hopes skynet will be much more prosperous.
mysql server listen on 3306, root with empty password create a database named: skynetdemo, and import skynetdemo.sql
redis server listen on 6379
LAMP enviroment, and make sure web/auth.php can visited as http://127.0.0.1/auth.php
git clone https://github.com/greathqy/mud_build_on_skynet.git
cd mud_build_on_skynet
git submodule update --init --recursive
cd skynet
make linux
modify config/config.game.dev to suit your enviroment
./skynet ../config/config.game.dev
cd 3rd/lua
./lua ../../../client/client.lua loginserver_host loginserver_port gameserver_host gameserver_port username password
then you can use these command to act with server: login
listrooms
enterroom roomid
leaveroom
listmembers
say content
sayto userid content
kick userid
sendexp to_userid points
logout
这是一个简单但是完整的项目,展示了[skynet](https://github.com/cloudwu/skynet/)框架的用法。这个项目实现了一个多房间服务器,多个客户端可以同时连接到这个服务器,在不同的房间中切换,在房间里公开发言或者单独向某个用户发送信息。玩家呆在房间里时可以获得经验值,经验值最多的用户将自动成为房间管理员获得踢其他用户出去的权限。希望skynet使用越来越广泛。
mysql服务器监听于3306端口,空密码的root账户 创建一个叫skynetdemo的数据库,并导入skynetdemo.sql
监听于6379端口的redis服务器
LAMP环境, 确保web/auth.php能通过http://127.0.0.1/auth.php被访问到
git clone https://github.com/greathqy/mud_build_on_skynet.git
cd mud_build_on_skynet
git submodule update --init --recursive
cd skynet
make linux
modify config/config.game.dev to suit your enviroment
./skynet ../config/config.game.dev
cd 3rd/lua
./lua ../../../client/client.lua loginserver_host loginserver_port gameserver_host gameserver_port username password
成功连接上后可以使用以下命令与服务器交互:
login
listrooms
enterroom roomid
leaveroom
listmembers
say content
sayto userid content
kick userid
sendexp to_userid points
logout