cocos2D-x
文章平均质量分 83
wanglang3081
这个作者很懒,什么都没留下…
展开
-
cocos2d
http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Downloadcocos2d-x离线文档cocos2d_API-1.0.1.rar转载 2013-05-10 11:38:08 · 601 阅读 · 0 评论 -
Setup win32 development environment
Using Cocos2d-x version 2.15 in VS20101. PreparationBefore create your game with Cocos2d-x in Windows, setup your environment first. You should have installed VS2010 , download Cocos2d-x version 2转载 2013-12-12 18:36:53 · 625 阅读 · 0 评论 -
在mac上配置cocos2d-x开发环境
一、下载cocos2d-x最新安装包在终端中cd到本地将要存放目录,执行git命令git clone https://github.com/cocos2d/cocos2d-x.git二、如果开发ios程序,需要配置xcode模板下好后,cd到cocos2d-x目录,执行里面的sh脚本,安装cocos2d-x模板sudo ./install-templates-xco转载 2013-12-13 07:29:10 · 673 阅读 · 0 评论 -
Cocos2d-x Application Wizard for Visual Studio User Guide
Cocos2d-x Application Wizard for Visual Studio User Guide0. Overview1. Frist of all, get the cocos2d-x source code from github2. Build Cocos2d-x SolutionWin323. Install the cocos2d-x applica转载 2013-12-20 15:40:47 · 1152 阅读 · 0 评论 -
cocos2dx box2d 添加debugDraw
1.首先我们需要拷贝GLES-Render.cppGLES-Render.h到我们工作的目录,这个两个文件可以在coco2d-x的示例代码中的tests\Box2DTestBed中可以找到。2.你的layer里面添加[cpp] view plaincopyGLESDebugDraw *debugDraw; 并且重写layer的dra转载 2014-06-23 20:20:01 · 704 阅读 · 0 评论 -
Cocos2d-x中2.x和3.x的粒子系统的比较
CCParticleBatchNode和ParticleBatchNode相似的地方:继承图:两个类都继承自Node(v2.x中的CCNode,PS:官网又弄反了)和TextureProtocol(v2.x中的CCTextureProtocol)。(注意:后面将全部用V3.0的概念,即不会再加入类名的CC前缀)ParticleBatchNode类似于一个批处理节点,它将转载 2014-07-01 11:15:49 · 708 阅读 · 0 评论 -
cocos2dx添加文本的三种方法及适用情况CCLabelTTF,CCLabelBMFont,CCLabelAtlas
今天白白继续跟大家分享一下cocos2dx添加文本信息的方法。cocos2dx中有三个类可以添加文本信息:CCLabelTTF,CCLabelBMFont,CCLabelAtlas。1、CCLabelTTFCCLabelTTF适合于一次性创建文本后基本上不再改变其显示信息的情况。因为CCLabelTTF可以使用setString()函数改变文字内容,而这个时候会创建一个新的open转载 2014-06-29 17:30:14 · 3384 阅读 · 0 评论 -
cocos2d-x学习笔记02:绘制基本图元
第一部分:基本图形绘制cocos2dx封装了大量opengl函数,用于快速绘制基本图形,这些源代码在,cocos2dx\draw_nodes\CCDrawingPrimitives.cpp文件里面注意,该方法是重载node的draw方法实现的,在智能机上,并不推荐直接绘制几何图形,因为大量的坐标编码会极大降低工作效率,应尽量使用Image。而且cocos2dx的渲染机制会造转载 2014-06-29 22:06:23 · 554 阅读 · 0 评论 -
CCAnimation can NOT be run in CCLayer
CCAnimation can NOT be run in CCLayer , today I add some adction like CCMove, CCRoateBy to a CCLayer, that's no issue happen ,it works, bu原创 2014-07-23 13:20:16 · 487 阅读 · 0 评论 -
Lua的C++封装
前段时间由于公司项目需要,做了LUA的C++封装,为此看了LuaPlus(感觉过于庞大,挺混乱的..)跟LuaTinker(一个韩国人写的,只有两个代码文件,实现了大多数需要的功能)的代码,在实现LUA与C++的交互中最重要的功能莫过于实现在LUA中注册任意类型的C++函数和类,现将自己所得到的一些方法简单说下,如有不对的地方还请各位多多指正 注册C++函数当Lua 调用C 函数的时转载 2014-07-10 22:50:15 · 1640 阅读 · 0 评论 -
使用tolua++创建基于C\C++语言的lua脚本
使用tolua++创建基于C\C++语言的lua脚本2005年12月27日23:07:59一.tolua++简介 tolua++是一种第三方的软件包,可以为Lua提供面向对象的特性,这样我们就可以使用Lua来编写使用C++语言库的脚本文件.二.tolua++的编译. tolua++的主页在http://www.codenix.com/~to转载 2014-07-10 16:19:12 · 880 阅读 · 0 评论 -
cocos2dx setDisplayStats
82 <-- number of draw calls0.016 <-- time it took to render the frame60.0 <-- frames per secondThe first number (82) is the number of draw calls (which is fairly high). Typically each node th转载 2014-07-10 10:19:32 · 2480 阅读 · 0 评论 -
cocos2dx中lua实现继承详解
环境:cocos2dx版本为2.1.4目标:游戏中一般有玩家和怪物,他们都有相同的动作状态,如:idle、walk、attack、defense等,我们需要抽象出玩家和怪物的代码实现中中相同的部分方法:cocos2dx中其实已经提供了类继承的一下工具函数,在sdk中的samples/Lua/TestLua/Resources/luaScript目录下有一个名为“转载 2014-07-10 12:25:06 · 6807 阅读 · 0 评论 -
【COCOS2DX-LUA 脚本开发之四】使用tolua++编译pkg,从而创建自定义类让Lua脚本使用
http://blog.csdn.net/xiaominghimi/article/details/8770396转载 2014-07-10 16:15:11 · 616 阅读 · 0 评论 -
cocos2dx 2.0版本在android下的安装配置问题
最近因工作需要,要在XP下在配置android以及cocos2dx。虽说也曾在大学的时候搞过java用过Eclipse,但属android小白的那种,上网找了不少安装教程来看,并严格按照教程步骤一步一步弄,但是人算不如天算,不管怎么弄各种error还是如期而至,最后费了九牛二虎之力一一给解决了,今特记载如下,以便不时之需或他人参考。一、首先要安装android,这个按步骤来就行了,具体步骤转载 2014-08-20 21:34:18 · 494 阅读 · 0 评论 -
【cocos2d-x + Lua(1) 绑定Lua并使用tolua++】
为什么要使用Lua进行游戏开发?转载请注明出处http://www.cnblogs.com/zisou/p/cocos2dx-lua1.html上面一个问题我觉得在我们使用Lua之前需要深入思考的,Lua有何优点?缺点又是什么?先找准自己的项目定位在什么时候使用是很必要的;经过自己一番摸索之后有如下结论:优点:1,嵌入式脚本开发可以跳过平台市场进行独立的游戏资源更新;2,在转载 2014-08-10 12:57:38 · 1591 阅读 · 0 评论 -
cocos2d-x 精灵遮罩
cocos2d-x 精灵遮罩转自:http://bbs.9ria.com/thread-220210-1-4.html首先得理解一些东西。1.理解颜色混合。精灵有个成员函数:setBlendFunc(),这个函数以一个ccBlendFunc类型的变量为参数。这个ccBlendFunc是个结构体。这个结构体中有两个变量:src 和 dest. 举个例子:代码:ccBlendF转载 2014-08-10 16:50:51 · 604 阅读 · 0 评论 -
【COCOS2DX-LUA 脚本开发之四】使用tolua++编译pkg,从而创建自定义类让Lua脚本使用
【COCOS2DX-LUA 脚本开发之四】使用tolua++编译pkg,从而创建自定义类让Lua脚本使用分类: 【Cocos2dx Lua 脚本开发 】 2013-04-08 01:177957人阅读 评论(14)收藏 举报本站文章均为 李华明Himi 原创,转载务必在明显处注明:(作者新浪微博: @李华明Himi ) 转载自【黑米GameDev转载 2014-08-10 12:58:48 · 559 阅读 · 0 评论 -
【Cocos2dX(2.x)_Lua开发之三】在Lua中使用自定义精灵(Lua脚本与自创建类之间的访问)及Lua基础讲解
主页 >Cocos2dx-Lua 脚本开发 > 【Cocos2dX(2.x)_Lua开发之三】在Lua中使用自定义精灵(Lua脚本与自创建类之间的访问)及Lua基础讲解【Cocos2dX(2.x)_Lua开发之三】在Lua中使用自定义精灵(Lua脚本与自创建类之间的访问)及Lua基础讲解本站文章均为 李华明Himi 原创,转载务必在明显处注明:(作者新浪微博:@李华明H转载 2014-08-10 12:57:56 · 562 阅读 · 0 评论 -
(译)如何使用CCRenderTexture来创建动态纹理
(译)如何使用CCRenderTexture来创建动态纹理 免责申明(必读!):本博客提供的所有教程的翻译原稿均来自于互联网,仅供学习交流之用,切勿进行商业传播。同时,转载时不要移除本申明。如产生任何纠纷,均与本博客所有人、发表该翻译稿之人无任何关系。谢谢合作!原文链接地址:http://www.raywenderlich.com/3857/how-to-create-dynamic-转载 2014-08-10 16:50:20 · 584 阅读 · 0 评论 -
How to Enable Multi-Touch
How to Enable Multi-TouchHow to Enable Multi-TouchiOSAndroidOther platformsMulti-touch Test CaseThe Multi-touch features have been available on both iOS & Android since the first version o转载 2014-08-23 22:23:08 · 795 阅读 · 0 评论 -
EventDispatcher Mechanism
EventDispatcher Mechanismversion: since cocos2d-x v3.0 alpha0IntroductionCocos2d-X 3.0 introduces a new mechanism for responding to user events.The basics:Event listeners encapsulate y转载 2014-08-23 22:21:40 · 670 阅读 · 0 评论 -
Sprite Sheet Animation
You can create an animation from a series of image files, like this:123456789101112 Vector animFrames(15); char str[100] = {0}; for(int i = 1; i 15; i++) { sprintf转载 2014-08-12 21:17:46 · 1401 阅读 · 0 评论 -
How to Build an Android Project with Eclipse
How to Build an Android Project with EclipseEnvironment RequirementsA Supported OS (Ubuntu 12.10+, OS X 10.7+, Windows 7+)Cocos2d-x v3.0 (https://github.com/cocos2d/cocos2d-x/)JDK/SDK 1.6+NDK转载 2014-08-12 21:04:20 · 863 阅读 · 0 评论 -
How to run cpp-tests on Android
How to run cpp-tests on AndroidEnvironment RequirementsA Supported OS (Ubuntu 12.10+, OS X 10.7+, Windows 7+)Cocos2d-x v3.0 (https://github.com/cocos2d/cocos2d-x/)JDK/SDK 1.6+NDK r9d+Apache An转载 2014-08-12 21:03:56 · 997 阅读 · 0 评论 -
Render To Texture
Render To TextureOverviewTextures are used to be loaded from file or other IO streams. Besides this, we provide a new mechanismRenderTexture to generate a texture runtime. Then you can get the转载 2014-08-12 21:22:26 · 809 阅读 · 0 评论 -
Detailed explanation of Cocos2d-x Multi-resolution adaptation
Detailed explanation of Cocos2d-x Multi-resolution adaptationDetailed explanation of Cocos2d-x Multi-resolution adaptationOverviewEvolution from Retina to design resolutionResource resolution,转载 2014-08-12 21:45:50 · 942 阅读 · 0 评论 -
How to use CCache to speed up cocos2d-x android compilation
How to use CCache to speed up cocos2d-x android compilationCCache is a compiler cache for C/C++. It speeds up recompilation by caching the result of previous compilations and detecting when the same转载 2014-08-12 21:11:28 · 744 阅读 · 0 评论 -
OpenGL View
OpenGL ViewOverviewThe cocos2d-x engine use GLView and GLViewImpl to creating window with OpenGL/OpenGL ES context and receiving input and events.GLView is an abstract class and GLViewImpl is转载 2014-08-12 21:28:08 · 1022 阅读 · 0 评论 -
Introduction to New Renderer
Introduction to New RendererOverviewThis article is mainly a overview of cocos2d v3.x rendering pipeline from a developer's view. It is not a substitution of the originalroadmap provided by转载 2014-08-12 21:34:34 · 438 阅读 · 0 评论 -
How to run cpp-tests on iOS
How to run cpp-tests on iOSEnvironment RequirementsMac OS X 10.8+ (this article uses 10.9)Cocos2d-x v3.0 (https://github.com/cocos2d/cocos2d-x/)Xcode 4.6.2+ (the version this article used is 5转载 2014-08-12 21:06:17 · 671 阅读 · 0 评论 -
How to run cpp-tests on Mac OSX
How to run cpp-tests on Mac OSXEnvironmental RequirementsMac OS X 10.8+ (this article uses 10.9)Cocos2d-x v3.0 (https://github.com/cocos2d/cocos2d-x/)Xcode 4.6.2+ (the version this article use转载 2014-08-12 21:06:57 · 612 阅读 · 0 评论 -
How to Start a New Cocos2d-x Game
How to Start a New Cocos2d-x GameThis documentation will show you how to use cocos console to create and run a new project. Runtime RequirementsAndroid 2.3+iOS 5.0+OS X 10.7+Windows 7+Ubun转载 2014-08-12 21:00:35 · 729 阅读 · 0 评论 -
Multi-resolution support
Multi-resolution supportThe APIs used in this document are available since cocos2d-2.0-x-2.0.4.Multi-resolution supportThe principledesignResolutionSizecontentScaleFactorPoliciesEx转载 2014-08-12 21:47:13 · 871 阅读 · 0 评论 -
How to Save a Screenshot
How to Save a ScreenshotOn v3.2 alpha0, utils::captureScreen() is added to save a screenshot.The declaration of utils::captureScreen() is 1void captureScreen(const std::functionvoid(bool, con转载 2014-08-12 21:49:02 · 748 阅读 · 0 评论 -
Overview of new gui¶
Overview of new guiIntroductionIt was difficult to design complex UI before GUI system was introduced. Even if you can design specific UI for specific kind of game, such as MMORPG, still you can转载 2014-08-14 15:17:43 · 1019 阅读 · 0 评论 -
OpenGL ES2.0教程(3):初识MVP
http://cn.cocos2d-x.org/tutorial/show?id=1349OpenGL ES2.0教程(3):初识MVP子龙山人2014-08-19 10:04:28861 次阅读在上一篇文章中,我在介绍vertex shader的时候挖了一个坑:CC_MVPMatrix。它其实是一个uniform,每一个Cocos2d-x预定义的shader都包含有这个uni转载 2014-08-27 22:21:23 · 2926 阅读 · 0 评论 -
Cocos2dx内的坐标系(Coordinate Systems In Cocos2dx)
窗口坐标系:即openGL坐标系,左下角为原点,向右是x正方向,向上是y正方向。纹理坐标系:左上角为原点,向右是x正方向,向下是y正方向。在使用图集时,例如截取其中的某个矩形块来创建一个sprite会用到此坐标系。Window Coordinate System: which uses the openGL coordinate system, has an origin at t转载 2014-08-28 14:08:38 · 720 阅读 · 0 评论 -
UV Texture Coordinates and Texture Mapping - OpenGL / DirectX
UV Texture Coordinates and Texture Mapping - OpenGL / DirectXPosted byCory Grossat9:49 AMBecause I am not in school right now, I have been getting pretty heavy into WebGL graphics trying t转载 2014-08-28 14:09:33 · 2306 阅读 · 0 评论 -
Cocos2d-x 3.0 屏幕触摸及消息分发机制
本文主要学习Cocos2d-x的屏幕触摸及消息分发机制,环境是vs2012+Win7。首先,新建一个项目,并向场景加入一个精灵。新建项目: cocos new -p xxx(包名) -l xxx(语言) -d xxx(保存路径)选择一个精灵,放到resource目录下,并在VS2012中加入资源项。然后,建立一个新的精灵,添加到当前场景Hello转载 2014-09-13 16:57:15 · 3346 阅读 · 0 评论