服务端源码及官方网站
KBEngine: A mmog engine of server.
(server sources and kbengine-home)
http://kbengine.org
Demo sources:
unity3d : https://github.com/kbengine/kbengine/kbengine_unity3d_demo
ogre : https://github.com/kbengine/kbengine/kbengine_ogre_demo
html5 : https://github.com/kbengine/kbengine_html5_demo
warring : https://github.com/kbengine/kbengine/kbengine_ogre_warring
Releases:
sources : https://github.com/kbengine/kbengine/releases
binarys : https://sourceforge.net/projects/kbengine/files/
demo-bin: http://sourceforge.net/projects/kbengine/files/kbengine_(***)_unity3d_ogre_demo_win32.zip
Docs
API : https://github.com/kbengine/kbengine/tree/master/kbe/doc
教程(Tutorial) : https://github.com/kbengine/kbengine/tree/master/tutorial
在线教程(Online tutorial): http://www.kbengine.org/docs/
注意(Note):
解压后不要放在中文文件夹下, 建议放在系统盘根目录。
Windows版本仅用于游戏逻辑测试调试, 不能支持大量处理。
需要测试整体性能请使用Linux版本。
(Windows version only for debugging and game development environment,
Can not support high concurrent processing.
Stress testing and final deployment, use Linux OS (Centos, Debian, Ubuntu, Redhat, etc ...))
* 安装 mysql for win
(install mysql for win)
可以在这里下载http://www.onlinedown.net/softdown/89328_2.htm, (也可以直接在目录下kbengine/installs中双击mysql-essential-5.0.87-win32.msi来安装)
(You can download it from here http://www.onlinedown.net/softdown/89328_2.htm, (You can also double-click to install directly kbengine/installs the mysql-essential-5.0.87-win32.msi))
* 配置数据库 (Configure mysql)
1: 安装好mysql(Be sure to install mysql)
如果是windows系统则my.ini中加入如下代码使mysql大小写敏感
(If the Windows then add the following code to make my.ini mysql case sensitive)
[mysqld]
lower_case_table_names=0
记得重启mysql服务, 否则不生效(命令行cmd输入):
(Service MySQL restart, CMD input:)
net stop mysql
net start mysql
查看一下是否设置正确, 必须为0:
(Check lower_case_table_names, must be is 0:)
mysql> SHOW VARIABLES like "lower_case_table_names";
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| lower_case_table_names | 0 |
+------------------------+-------+
1 row in set (0.00 sec)
2: 新建一个数据库, 假设数据库名为"kbe"
(Create a new database, the database name is "kbe")
mysql> create database kbe;
3: 创建一个数据库账户, 假设用户名密码都为"kbe"
(Create a database account, username and password is "kbe")
先删除匿名用户
(Delete anonymous user)
mysql> use mysql
mysql> delete from user where user='';
mysql> FLUSH PRIVILEGES;
创建kbe用户
(Create a database account, name is kbe)
mysql> grant all privileges on *.* to kbe@'%' identified by 'kbe';
mysql> grant select,insert,update,delete,create,drop on *.* to kbe@'%' identified by 'kbe';
mysql> FLUSH PRIVILEGES;
在CMD中测试一下是否能使用这个账号登陆mysql(请注意默认mysql端口为3306, 如不一致请修改kbengine_defs.xml->dbmgr-><port>330x</port>),
如果没有提示错误则账号配置完毕, 有错误请google
进入你的mysql安装目录找到mysql.exe所在目录, 然后cmd进入这个目录中执行如下语句:
(Test whether the CMD can use this account login mysql(Note that the default mysql port is 3306, you can modify kbengine_defs.xml->dbmgr-><port>330x</port>),
If an error occurs, please google mysql error code.
Enter your mysql installation directory to find mysql.exe, enter the directory and then execute cmd following statement:)
C:\mysql\bin> mysql -ukbe -pkbe -hlocalhost -P3306
* 启动服务端:(Quick Startup and Shutdown)
启动服务器双击!(win)startdemo_server.bat
(Startup: !(win)startdemo_server.bat)
注意: 第一次启动服务端会自动在mysql建表, 可能需要等待几分钟。
(Note: The initial start(kbengine) mysql will automatically build the table, you may need to wait for some time.)
* 关闭服务端双击!(win)killServer.bat
(Quick Shutdown: !(win)killServer.bat)
* 注意:不同的客户端登陆请使用不同的账号,因为不同的客户端登陆注册后角色被分配到不同的场景中, 不同的场景只有
特定的客户端才可以加载。可以直接输入账号密码快速试玩,服务端会自动注册账号(可配置关闭这个选项), 邮箱账号则必须
注册并进入邮箱激活才可使用。
(Note: different client login to use a different account)
* 启动ogre-demo(Startup: OGRE demo)
启动ogre客户端双击!(win)startdemo_client_ogre.bat
(Startup: !(win)startdemo_client_ogre.bat)
* 启动unity3d-exe-demo.(Startup: Unity3d exe-demo)
启动ogre客户端双击!(win)startdemo_client_unity3d_exe.bat
(Startup: !(win)startdemo_client_unity3d_exe.bat)
* 启动unity3d-Webgame_demo(Startup: Unity3d Webgame-demo)
1: 安装web服务, 这里我们使用python搭建简单的web服务器(你也可以自己安装任意其他web服务端)
(install webserver, We simply use python to build web service)
下载http://www.python.org/ftp/python/3.3.4/python-3.3.4.msi并安装。(也可以直接在目录下kbengine/installs中双击python-3.3.4.msi来安装)
如果python不是安装在C盘, 请修改!(win)startdemo_http_unity3d, 将其中(c:/python33/python -m http.server 80)修改为对应的目录地址
(download http://www.python.org/ftp/python/3.3.4/python-3.3.4.msi or use kbengine/installs/python-3.3.4.msi,
If the python is not installed on the C:/python33, Please modify "!(win)startdemo_http_unity3d.bat")
2: 启动web服务, 双击 !(win)startdemo_http_unity3d.bat
(Startup web service: !(win)startdemo_http_unity3d.bat)
3: 启动webplayer安全验证服务, 双击 !(win)startdemo_Policy_unity3d.bat
(Startup Policy service: !(win)startdemo_Policy_unity3d.bat)
4: 进入游戏, 打开浏览器输入 http://127.0.0.1 即可进入登录界面。
(Enter game: http://127.0.0.1)
* Linux下架设服务端(Linux-kbengine server installation):
请下载源码在您的Linux下编译并安装 :)
http://kbengine.org
转自:http://blog.csdn.net/damagek/article/details/38795511