Build COCOS2DX 3.1.1 Lua development environment Vs2012+sublime Text+lua 5.2.3 under Win platform

Source: Internet
Author: User
Tags sublime text

Installing vs2012

Install Python 2.7.3 and environment configuration

Download COCOS2DX 3.1.1 Open test project with vs2012 right-click to run Build Solution


cocos2dx3.1.1 New LUA Project

COCOS2DX 3.1.1 Engine catalog Find the tools Cocos2d-console bin in turn, drag cocos.py to command (CMD) in DOS and continue to enter new project information: New Game-p Com.test.app- L LUA

We can find the new project game in the path indicated on the screen.

(Of course, you can also start by entering the path you want to store before creating a new project.) )

Because COCOOS2DX's LUA uses the engine's own file parsing, we use vs2012 to open the project game right button to run, you can see COCOS2DX's Main.lua Classic farm interface.



——————————————————————————————————————

The reason we want to install LUA 5.2.3 and sublime text is simply to see syntax highlighting for convenience, so use sublime to write LUA files and run them with VS2012.

LUA official website Download 5.2.3

1. I'm using lua-5.2.3,www.lua.org here.

2. Generate Lua compiler, parser, dynamic and static library download links (including files Lua.dll lua.exe Luac.exe lua.lib)

Haha, I have done, children's shoes can take my good direct download to use it.

http://download.csdn.net/detail/u013174689/7765687

3. Copy the files in 2 Lua.dll lua.exe Luac.exe lua.lib to the Lua-5.2.3/src folder

We tested to see if it was normal: open Lua.exe, see the screen shows LUA version information 5.2.3, enter print ("Hello World") to see the output Hello World.

4, set the computer system environment variables, new system variable name "LUA", the Value "D:\COCOS2DX\LUA-5.2.3\SRC" (here according to your own path), and then add "%lua%;" in Path. After setting the command in DOS to verify, direct input lua ...

show "Lua 5.2.3 Copyright (C) 1994-2013 lua.org, Puc-rio" for instructions on setting success

Download Sublime Text 3

This is a fee-for-text editing software, but it can always be tried for free. I am the latest version of the website download

Sublime Text 3 supports LUA, but the LUA compilation environment requires its own:

1. In the Sublime menu bar, click Tools->build System, newbuild system

Edit the modified text as follows and save it as Lua.sublime-buildok. Well, it's a good match for Lua.

{

"cmd": ["Lua", "$file"],

"File_regex": "^ (?: Lua:)? [ \ t] (...):( [0-9]*):? ([0-9]*) ",

"Selector": "Source.lua"

}

2, sublime new file, test whether it can be used properly

Menu select New file, save file Ask Test.lua

menu bar Click Tools->build System, select Lua as the compiled language

File input print (11)

Shortcut key ctrl+b run See output 11, it means the setup was successful

Resources:

http://blog.csdn.net/feng283797821/article/details/9815849 cocos2d LUA Environment Setup
Http://www.360doc.com/content/13/1019/15/14253074_322581758.shtml creating a new LUA project
http://blog.csdn.net/qingye2008/article/details/22267143 Sublime Text 2 Configuring the LUA development environment

Build COCOS2DX 3.1.1 Lua development environment Vs2012+sublime Text+lua 5.2.3 under Win platform

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.