Giter VIP home page Giter VIP logo

hxgame's Introduction

HXGame

目的:使用cocos2dx实现一个手机游戏的基本框架

  • 使用cocos2dx 3.0 alpha

  • HXModules文件夹自己主要需要完成的模块,包括手游中需要完成的通用代码都在此以模块的方式实现. 其中HXLuaModules.cpp是tolua++生成的文件.用于实现通用模块,比如在lua中重启lua脚本.

  • libs文件夹拷贝自cocos2dx工程,减去了js相关的文件,里面的工程文件也做了相应的修改(现在完成了安卓工程和linux的编译和运行).

  • proj文件夹拷贝自cocos2dx例子里的工程文件,修改了android工程和linux工程.在ubuntu13.04上完美编译运行.

  • Resources文件夹用于存放资源和lua脚本.lua脚本目录格式也是有规则的.每个lua模块一个文件夹,并在include中包含他们.

  • tools文件夹中的tolua++用来将cpp类或者c函数注册到lua中。

为何这样设计

  • 这样修改cocos2dx的工程结构,并不是觉得cocos2dx的工程结构不好,只是只想把cocos2dx当做一个库来使用,而不是将cocos2dx作为主工程, 在cocos2dx中添加许许多多的工程。

  • 也正是cocos2dx的工程做的相当完美,才有了其他人可以更好的配置工程结构。

框架设计来源


涵曦个人博客


hxgame's People

Watchers

 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.