Skip to content

Commit

Permalink
实验添加mmorpg功能
Browse files Browse the repository at this point in the history
  • Loading branch information
ubuntu committed Jul 5, 2018
1 parent 4f1111a commit 030ae09
Show file tree
Hide file tree
Showing 135 changed files with 4,213 additions and 1,990,195 deletions.
3 changes: 1 addition & 2 deletions config/item.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
return {
[1] = {id=1, desc = "this is item one"},
[2] = {id=2, desc = "this is item two"},
[10] = {id=10, desc = "this is item ten 2"},
[11] = {id=11, desc = "this is item ten 11"},
[11] = {id=11, desc = "this is item two"},
}

216 changes: 0 additions & 216 deletions config/lifebuilding.lua

This file was deleted.

10 changes: 10 additions & 0 deletions config/monster.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
return {
[1] = {
id = 1,
name = "monster1",
},
[2] = {
id = 2,
name = "monster2",
},
}
10 changes: 10 additions & 0 deletions config/npc.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
return {
[1] = {
id = 1,
name = "npc1",
},
[2] = {
id = 2,
name = "npc2",
},
}
30 changes: 30 additions & 0 deletions config/scene.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

return {
[1] = {
name="scene1",
width=200,
height=100,
tilewidth=10,
tileheight=10,

monsters = {
{1, 15, 25},
{2, 5, 5},
},
npcs = {
{1, 10, 20},
{2, 20, 20},
},
},
[2] = {
name="scene1",
width=200,
height=100,
tilewidth=10,
tileheight=10,

monsters = {
},
},
}

1 change: 1 addition & 0 deletions etc/config → etc/config1
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ bootstrap = "snlua bootstrap"

runconfig = "runconfig"

nodeid = 1
nodename = "node1"

lualoader = skynet_root.."lualib/loader.lua"
Expand Down
1 change: 1 addition & 0 deletions etc/config2
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ bootstrap = "snlua bootstrap"

runconfig = "runconfig"

nodeid = 2
nodename = "node2"


Expand Down
58 changes: 22 additions & 36 deletions etc/runconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,29 @@ return {
--集群地址配置
cluster = {
node1 = "127.0.0.1:2528",
node2 = "127.0.0.1:2529",
--node2 = "127.0.0.1:2529",
},
--通信协议
prototype = "ws", --tcp/ws
protopack = "json", --pb/json
--默认通信协议
prototype = "tcp", --tcp/ws
protopack = "pbc", --pbc/json
--各个服务配置
service = {
--debug_console服务
debug_console = {
[1] = {port=8701, node = "node1"},
[2] = {port=8702, node = "node2"},
--[2] = {port=8702, node = "node2"},
},
--game服务
game = {
[1] = {node = "node1"},
[2] = {node = "node2"},
--[2] = {node = "node2"},
},
--gateway服务
gateway_common = {maxclient = 1024, nodelay = true},
gateway = {
[1] = {port = 8798, node = "node2"},
[2] = {port = 8799, node = "node1"},
--[1] = {port = 8798, node = "node1", prototype="tcp", protopack="pbc"},
[1] = {port = 8798, node = "node1", },
[2] = {port = 8799, node = "node1", prototype="ws", protopack="pbc"},
},
--global服务
global = {
Expand All @@ -37,50 +38,35 @@ return {
[1] = {node = "node1"},
[2] = {node = "node1"},
},
login_common = {
mode="test",
test={},
},
--login服务
login = {
[1] = {node = "node1"},
[2] = {node = "node2"},
--[2] = {node = "node2"},
},
--dbproxy服务
dbproxy_common = {
accountdb = {db_type = "mongodb", host = "127.0.0.1", db_name = "account"}, --host,port,username,password,authmod
gamedb = {db_type = "mongodb", host = "127.0.0.1", db_name = "test"},
gamedb = {db_type = "mongodb", host = "127.0.0.1", db_name = "game"},
globaldb = {db_type = "mongodb", host = "127.0.0.1", db_name = "global"},
logdb = {db_type = "mongodb", host = "127.0.0.1", db_name = "log"},
},
dbproxy = {
[1] = {node = "node1"},
[2] = {node = "node1"},
},
--scene服务
scene = {
[1] = "node1",
--[2] = "node2",
},
--host服务
host_common = {
web = {node = "node1", port = 8111},
console = {node = "node1", port = 8002}, --尚未实现
console = {node = "node1", port = 8002},
}
},
--玩家数据表配置
playerdata = {
baseinfo = true,
},
--具体各个功能逻辑的配置
movegame = {
global = {
[1] = "global1",
[2] = "global2",
},
},
queryboard = {
global = {
[1] = "global1",
--不支持分布式
},
},
lifegame = {
global = {
[1] = "global1",
[2] = "global1",
},
mgr = "global1",
}
}

File renamed without changes.
Loading

0 comments on commit 030ae09

Please sign in to comment.