Giter VIP home page Giter VIP logo

genius-x's Introduction

Genius-x

Genius-x是一个基于以属性为中心的游戏对象模型构建的游戏框架,它基于Cocos2d-x,目前支持使用C++/Lua两种语言进行开发,Genius-x最大的目标是要实现数据驱动,使程序中关于关卡设计的部分可以最大限度地从程序中抽离出来,让设计和程序以及其他相关人员进行更轻易地协同开发。

特别致谢

Genius-x最早于2014年在北京魂世界(SoulGame)的手游项目中使用,并在其授权下将其开源,在此非常感谢魂世界对此项目的支持。

参考资料

  1. 《游戏引擎架构》
  2. 《我所理解的Cocos2d-x》
  3. 《游戏编程精粹(第6卷第4章)》
  4. 《A Data-Driven Game Object System》

怎样使用?

  1. 将根目录的genius-x目录拷贝至你的游戏目录中同cocos2d同级的目录,因为Genius-x会引用Cocos2d-x工程。
  2. 将genius-x/build目录下对应平台的工程文件添加引用至你的项目中。
  3. 添加搜索路径,这样才能找到头文件引用,例如在XCode中设置为$(SRCROOT)/../genius-x/genius。
  4. 添加静态库链接。

特性

  1. based on the Origin Entity Component System idea(Decoupbe the system from component,this make it diff from Component-based design).
  2. automatic attching system to Entity,you only need concern component.So,
  3. it's data-driven.
  4. better performance,we make every Entity has it's own System instance,but still keep auto-attaching,you do not need care about System.
  5. lua and javascript binding support.(progress....)
  6. system ordered.

How to use?

  1. create an Entity: ECSmanager::createEntity();
  2. create you own Component which should be a subclass of ECS::Component , such as 'MyComponent'
  3. create you System which should be a subclass of ECS::System
  4. init the ECSManager: auto ecs=new ECSManager();
  5. put all your system: ecs->addSystem(mySystem);
  6. add component to Entity: ecs->addComponentToEntity(myComponent,myEntity);
  7. call the update methed of ECSManager in your gameloop, such as the visit or update method of HelloWorldScene.
  8. that's it!

讨论

you may leave a message at my blog: http://genius-x.org

Please enjoy this.

genius-x's People

Contributors

elvisqin avatar ldr123 avatar

Watchers

James Cloos avatar 刘鹏 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.