Giter VIP home page Giter VIP logo

jinvei / noahgameframe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ketoo/noahgameframe

0.0 0.0 0.0 27.06 MB

A fast, scalable, distributed game server engine/framework for C++, include the actor library, network library, can be used as a real time multiplayer game engine ( MMO RPG/MOBA ), which support C#/Lua script/ Unity3d, Cocos2dx and plan to support Unreal.

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

License: Apache License 2.0

C++ 55.35% C 32.21% HTML 0.35% C# 6.82% Lua 0.14% Batchfile 0.05% Shell 0.09% Makefile 0.30% Java 0.24% M4 0.02% CMake 0.64% SAS 0.02% CLIPS 0.06% Pascal 0.77% Ada 0.98% Assembly 1.52% DIGITAL Command Language 0.30% Module Management System 0.02% Perl 0.04% Roff 0.08%

noahgameframe's Introduction

NoahGameFrame

  • develop Build Status
  • master Build Status
  • chat Join the chat at https://gitter.im/ketoo/NoahGameFrame

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

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

Client (Unity3D && Cocos2d)

Client

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

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 in Ubuntu 16.04)
  • MSVC >= VS2019 (Tested in Win10)

Build and Install

FOR WINDOWS, MSVC >= 2019

  1. Git pull all source
  2. Open the solution: NoahFrame.sln, build FileProcessTool project
  3. Run GenerateConfigXML.bat to generate configuration files
  4. Run the script file named build_dep.bat where located /Dependencies
  5. Build the solution(if u build failed, please build again(not rebuild all))
  6. Run the binary file by _Out/rund.bat

FOR LUNUX(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

License

The NFrame project is currently available under the Apache License.

Tutorial:

// -------------------------------------------------------------------------
//    @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;
}

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

  • how to use the synchronous events

  • 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

  • reload()
  • awake()
  • init()
  • ready_execute()
  • after_init()
  • before_shut()
  • shut()

Mostly like this

test_module = {}
register_module(test_module,"test_module");

function test_module.reload()
end

function test_module.awake()
	reload();
end

function test_module.init()
end

function test_module.after_init()
end

function test_module.ready_execute()
end

function test_module.before_shut()
end

function test_module.shut()
end

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

ScriptList={
    {tbl=nil, tblName="TestModule"},
    {tbl=nil, tblName="TestModule2"},
}

load_script_file(ScriptList)

##Hot fix Add your lua script file name on here script_reload.lua


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

noahgameframe's People

Contributors

ketoo avatar tangyu1018 avatar flyicegood avatar windzxa avatar johance2 avatar xinst avatar ifivebig avatar nickyang4github avatar xiaolanpingguo avatar xiaomingfun avatar lizho avatar bluesky7290 avatar yss-al avatar superzmy avatar sniper00 avatar sherlockpei avatar sl-sandy avatar schwantz avatar jamesjba avatar kemibai avatar xitontong avatar zhxilin avatar wangzhione avatar smallant avatar gajin2 avatar fvsfvs123 avatar fnstanc avatar echocolate avatar gitter-badger avatar huiliu avatar

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.