Code Monkey home page Code Monkey logo

tunm's Introduction

tunm

a game server for rust + lua

Build Status

How to run

git clone https://github.com/tickbh/tunm.git
cd tunm
cargo build

##dependence

  • redis server
  • mysql server

and then modify config/Gate_GlobalConfig.conf and config/Client_GlobalConfig.conf to config your mysql db info, and redis db info

Run these in different console

cargo run --example server    # Launch first tunm node  (Gate server) (default as the standalone option)
cargo run --example client    # Launch a client to connect server

What is tunm?

An open source server engine, the clients and server communications can through the td_ptotocol. Now only has the console client.

Engine framework written using Rust, game logic layer using Lua(Support the hotfix), developers do not need to re-implement some common server-side technology, allows developers to concentrate on the game logic development, quickly create a variety of games.

(tunm is designed to be multi-process distributed dynamic load balancing scheme, in theory only need to expand hardware can increase load-limit, the single machine load-limit depends on complexity of logic of the game itself.)he game itself.)

How To Use (Sorry, Only in Chinese now)

Read Wiki https://github.com/tickbh/tunm/wiki

中文

QQ交流群:432216192

tunm's People

Contributors

tickbh avatar w273732573 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tunm's Issues

cargo run --example server : ------wrong parameter types for callback function arguments_count is 2

[2019-03-15 15:34:20] [trace] add_cloumn sql is "ALTER TABLE user ADD COLUMN ban_end_time int(32) DEFAULT '0' "
[2019-03-15 15:34:20] [trace] add_cloumn sql is "ALTER TABLE user ADD COLUMN vip int(32)"
[2019-03-15 15:34:20] [trace] add_cloumn sql is "ALTER TABLE user ADD COLUMN vip_exp int(32)"
[2019-03-15 15:34:20] [trace] add_cloumn sql is "ALTER TABLE user ADD COLUMN sp int(32)"
[2019-03-15 15:34:20] [trace] xxx

size : 3
{
1:"aaaaaaaa",
2:
size : 3
{
"a":"1111",
"d":
size : 1
{
"a":"xxxx",
},
"c":"xxxxxxxxxx",
},
3:
size : 1
{
"b":"xxxxxxxxxxx",
},
}
[2019-03-15 15:34:20] [trace] after encode is "["aaaaaaaa",{"a":"1111","d":{"a":"xxxx"},"c":"xxxxxxxxxx"},{"b":"xxxxxxxxxxx"}]"
[2019-03-15 15:34:20] [trace] msg_type is 1
[2019-03-15 15:34:20] [trace] name is "aaaaaaaa"
[2019-03-15 15:34:20] [trace] args is "["aaaaaaaa",{"a":"1111","d":{"a":"xxxx"},"c":"xxxxxxxxxx"},{"b":"xxxxxxxxxxx"}]"
[2019-03-15 15:34:20] [trace] name = "aaaaaaaa" un =
size : 2
{
1:
size : 3
{
"a":"1111",
"d":
size : 1
{
"a":"xxxx",
},
"c":"xxxxxxxxxx",
},
2:
size : 1
{
"b":"xxxxxxxxxxx",
},
}
[2019-03-15 15:34:20] [trace] Error:
wrong parameter types for callback function arguments_count is 2

[2019-03-15 15:34:20] [trace] stack traceback:
(1)[C]:-1: in function 'listen_websocket'
(2)[string "ts/server/daemons/connectd.lua"]:79: in function 'init_network_status'
(3)[string "ts/server/daemons/connectd.lua"]:101: in function 'f'
(4)[string "obal/base/global_data_boot.lua"]:17: in function 'post_data_init'
temp_post_init :

size : 1
{
1:,
}
_ : 1
f :
(5)[string "obal/base/global_data_boot.lua"]:32: in function 'finish_one_load_data'
(6)[string "/server/daemons/data_userd.lua"]:26: in function 'callback'
startPos : 0
ret : 0
result_list :
size : 0
{
}
(7)[string "scripts/server/daemons/dbd.lua"]:212: in function 'notify_operation_result'
cookie : 1
ret : 0
result_list :
size : 0
{
}
oper :
size : 4
{
"callback_arg":0,
"begin_time":1552635260,
"callback":,
"sql_cmd":"SELECT rid,name,ban_flag,lv,vip,last_login_time,last_logout_time FROM user limit 10000 offset 0 ",
}
callback :
callback_arg : 0
sql_cmd : "SELECT rid,name,ban_flag,lv,vip,last_login_time,last_logout_time FROM user limit 10000 offset 0 "
(8)[string "ts/global/base/global_comm.lua"]:349: in function ''
cookie : 1
ret : 0
result_list :
size : 1
{
1:
size : 0
{
},
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.