Giter Site home page Giter Site logo

xubingyue / cocos_lua Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yestein/cocos_lua

0.0 2.0 0.0 22.35 MB

It is a pure Lua framework contains Game Logic for mobile game developing. It can works on cocos2d-x 3.0~3.2, and can easiy suit for furture versions

Home Page: http://yestein.com/?cat=76

Lua 99.56% Python 0.44%

cocos_lua's Introduction

cocos_lua

This Framework can work on Cosos2d-x 3.0, cocos2d-x 3.1, cocos2d-x 3.2 Now.

And it can easiy updated for furture versions, reason is below.

Why choose it?

####* Do never modify core code of cocos2d-x, so you can upgrade your cocos2d-x version easily. (Please forget those endless conflicts when updating version.)

####* Supply a Game Logic Framework besides make cocos2d-x suit for Lua developing.

####* Need only write Lua script but no C++ code in your game developing.

####* Support Scene Reload, Script Reload(now only in windwos), and no need to reboot your application.

For more documents and tutorials

You can visit my blog: http://yestein.com ^_^ or click here directly.

欢迎关注微信订阅号:yestein_developer

How to Use it on cocos2d-x?

  • Step 1: Create a Project with Lua by project-creator which supplied by cosos2d-x.
  • Step 2: Copy the framework folder to the script folder.(Eg: In Cocos2d-x 3.x, copy to ...\src)
  • Step 3: Enter the framework folder, execute the "install.py"
  • (Step 4: Add the folder framework and script into your xcode project resource if cocos2d-x version is old)
  • (Step 5: You can Modify the project.lua, change the project name you wish, its mean which folder framework will luanched, default is script.)

Now, You can start your journey by editing the script/game_mgr.lua and preload.lua ^_^.

PS:

  • "game_mgr.lua" contains 1 function which called "GameMgr:_Init"

  • function "GameMgr:_Init" will be called once when the game was luanched success, and you need to load your first scene in your game world.

  • "preload.lua" declare the script files and orders which you want to load. And you can add files like this:

	AddPreloadFile("script/main_scene.lua")

or you can write it like this, then you no not write the project folder path.

	AddProjectFile("main_scene.lua")

you can find the samples in framework/preload.lua

cocos_lua's People

Contributors

yestein avatar ringofthec avatar

Watchers

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