• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

NoahGameFrame: A fast, scalable, distributed game server framework for C++, incl ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

NoahGameFrame

开源软件地址:

https://gitee.com/kytoo/NoahGameFrame

开源软件介绍:

NoahGameFrame

  • developBuild Status
  • masterBuild Status
  • chatJoin the chat at https://gitter.im/ketoo/NoahGameFrame

#####QQ群:330241037 NF开源服务器引擎2群

Tutorial && Documents

https://github.com/ketoo/NoahGameFrame/wiki

What is NoahGameFrame?

NoahGameFrame (NF) is a lightweight, fast, scalable, distributed plugin framework. NF is greatly inspired by OGRE and Bigworld.

Features

  • Easy-to-use, interface-oriented design
  • An extensible plugin framework that makes getting your application running quick and easy
  • A clean, uncluttered design and stable engine that has been used in several commercial products
  • A high performance actor model (by a safe thread pool)
  • Event and attribute-driven, making it clear and easy to maintain your business
  • Based on standard C++ development, ensuring cross-platform support
  • An existing C++ and C# game client for rapid development
  • Cross-platform support

Tutorial && Documents

https://github.com/ketoo/NoahGameFrame/wiki

Architecture

App Architecture:

App Architecture

Server Architecture

Server Architecture

Get the Sources:

git clone https://github.com/ketoo/NoahGameFrame.git

or

svn checkout https://github.com/ketoo/NoahGameFrame

Dependencies

  • libevent
  • easylogging++
  • google protobuf
  • hiredis
  • ajson
  • concurrentqueue
  • RapidXML
  • LuaIntf
  • navigation
  • lua

Tutorial && Documents

https://github.com/ketoo/NoahGameFrame/wiki

IF YOU CAN NOT BUILD THE DEPENDENCIES THEN PLEASE RUN THE CMDS BELOW TO SET UP THE ENVIRONMENT:

  • sudo apt-get install g++
  • sudo apt-get install cmake
  • sudo apt-get install automake
  • sudo apt-get install zip unzip

Supported Compilers

  • GCC >= 7 (Tested on Ubuntu 16.04)
  • MSVC >= VS2019 (Tested on Win10)

Build and Install

FOR WINDOWS, MSVC >= 2019

  1. Git pull all source
  2. Run the script file named build_dep.bat where located /Dependencies(墙内上网的同学请点击:墙内下载依赖库.bat)
  3. Build the solution(if u build failed, please build again(not rebuild all))
  4. Run the binary file by _Out/rund.bat

FOR LINUX(UBUNTU, CENTOS) ---- please use administrator(or sudo) to do these:

  1. Git pull all source
  2. Run install4cmake.sh to build NF (or run cd /Dependencies ./build_dep.sh then run buildServer.sh)
  3. Run the binary file by _Out/rund.sh

IF YOU LIVING IN A COUNTRY CANNOT ACCESS GITHUB FASTLY PLZ BUILD NF WITH VPN

HOW TO RUN HELLO WORLD

https://github.com/ketoo/NoahGameFrame/wiki/How-to-run-the-Helloworld

HOW TO DEBUG WITH UNITY3D

https://github.com/ketoo/NoahGameFrame/wiki/How-to-debug-with-unity3d

Unity Multiplayer Demo

WebSite: https://github.com/ketoo/NFUnitySDK

Showcase

Tutorial && Documents

https://github.com/ketoo/NoahGameFrame/wiki

License

The NFrame project is currently available under the Apache License.

Tutorial:

01-Hello world, add a module

// -------------------------------------------------------------------------//    @FileName      	:    HelloWorld1.h//    @Author           :    ketoo//    @Date             :    2014-05-01 08:51//    @Module           :   HelloWorld1//// -------------------------------------------------------------------------#ifndef NFC_HELLO_WORLD1_H#define NFC_HELLO_WORLD1_H#include "NFComm/NFPluginModule/NFIPluginManager.h"class HelloWorld1    : public NFIModule{public:    HelloWorld1(NFIPluginManager* p)    {        pPluginManager = p;    }    virtual bool Init();    virtual bool AfterInit();    virtual bool Execute();    virtual bool BeforeShut();    virtual bool Shut();protected:};#endif#include "HelloWorld1.h"bool HelloWorld1::Init(){    // Use this for initialization	    std::cout << "Hello, world1, Init" << std::endl;    return true;}bool HelloWorld1::AfterInit(){    // AfterInit is called after Init	    std::cout << "Hello, world1, AfterInit" << std::endl;    return true;}bool HelloWorld1::Execute(){    // Execute is called once per frame	    //std::cout << "Hello, world1, Execute" << std::endl;    return true;}bool HelloWorld1::BeforeShut(){    //before final	    std::cout << "Hello, world1, BeforeShut" << std::endl;    return true;}bool HelloWorld1::Shut(){    //final	    std::cout << "Hello, world1, Shut" << std::endl;    return true;}

02-Hello world, test data driver

  • how to use the world's most advanced data engine

03-Hello world, test heartbeat and event system

  • how to use the synchronous events

04-Hello actor, test actor model(async event system)

  • how to use the asynchronous events
  • use multiple cpus to get high performance

How to Create a New LuaScriptModule

Step 1

Create a Lua Script File, and Must Contain following functions

  • awake()

  • init()

  • ready_execute()

  • after_init()

  • before_shut()

  • shut()

Mostly like this

test_module.lua

test_module = {}register_module(test_module,"test_module");function test_module.awake()endfunction test_module.init()endfunction test_module.after_init()endfunction test_module.ready_execute()endfunction test_module.before_shut()endfunction test_module.shut()end

##Step 2Add your LuaScriptModule Infomation into script_list.lua

ScriptList={    {tbl=nil, tblName="TestModule"},    {tbl=nil, tblName="TestModule2"},}load_script_file(ScriptList)

##Hot fixAdd your lua script file name on here script_reload.lua


New Feature in future: Blue Print System

Demo:

Showcase


About The Author


Amazing open source projects:

breeze

gce

  • Auther: nousxiong
  • GitHub: https://github.com/nousxiong/gce
  • Description: The Game Communication Environment (GCE) is an actor model framework for online game development.

moon

Tutorial && Documents

https://github.com/ketoo/NoahGameFrame/wiki


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap