cocos2d-x

android cocos2d-x 2.2 box2d setup

梦想的初衷 提交于 2020-01-24 01:02:07
问题 I have made a cross platform box2d cocos2d-x project and it works on ios and blackberry but I am not able to get it to work on android. I have looked at tutorials and all of them are from 2.15 and before. I added all the debug code in android.mk and I still get errors related anything to box2d saying it cannot be resolved LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := cocos2dcpp_shared LOCAL_MODULE_FILENAME := libcocos2dcpp LOCAL_SRC_FILES := hellocpp/main.cpp \ ../..

《iOS 5 cocos2d游戏开发实战(第2版) 》国内首本基于iOS5 cocos2d开发图书

会有一股神秘感。 提交于 2020-01-20 11:25:32
书 名: iOS 5 cocos2d游戏开发实战(第2版) 书 号: 9787302303039 出 版 社: 清华大学出版社 定 价: 59.80元 出 版 日 期: 2012-10-01 作 者: (美)伊特海姆 (德)勒夫 译 者: 同济大学苹果俱乐部 系 列书 名: 清图程序设计系列 开 本: 16 开 页 数: 456 印 刷 时 间: 2012-10-15 字 数: 694千字 版 次: 2 包 装: 平装 样章试读: http://www.tupbook.com/BookView.aspx?id=104 内容简介: 《iOS 5 cocos2d游戏开发实战(第2版)》将引导您开发富有吸引力的2D游戏。书中展示了如何使用cocos2d这款强大的游戏引擎来开发iPhone和iPad游戏,此外还介绍了游戏中的瓦片地图、虚拟摇杆、Game Center等。 本书主要内容: • 移动游戏开发的过程和最佳实践,包括精灵批处理技术、纹理图册、视差滚动、触屏以及加速计输入。 • 使用Box2D、Chipmunk物理引擎以及其他cocos2d相关的库和工具提升游戏性能。 • 在cocos2d应用中添加UIKit视图,以及在UiKit 视图中添加cocos2d。 • 详细介绍Kobold2D开发环境及其预配置库,包括cocos3d和Lua。 最重要的是,《iOS 5

cocos2d 游戏开发实战

喜夏-厌秋 提交于 2020-01-20 11:25:01
文章转自:http://uliweb.clkg.org/tutorial/read/40 6 cocos2d 游戏开发实战 6.1 创建cocos2d项目 6.2 cocos2d v3 "hello world" 6.2.1 显示一个飞船 6.3 精灵 6.4 開始 space viking 之旅 6.4.1 添加 sneakyinput 6.5 精灵的移动效果,旋转效果 6.6 定时器效果 6.7 启动 cocos2d,默认竖屏 6.8 检查精灵 碰撞參考 演示样例 6.9 粒子效果 6.10 纹理图片的提取 安装: http://www.cocos2d-iphone.org/ 下载安装 下载解压缩后: https://s3.amazonaws.com/spritebuilder/Cocos2D+Installer+3.0.0.rc.4.zip 解压缩后出现以下的图标,点击图标进行安装: 本书教材其它网址: 游戏下载: http://itunes.apple.com/us/app/space-viking/id400657526?mt=8 分章节源码: http://cocos2dbook.com/cocos2d/sourcecode/ 全部的源码: http://cocos2dbook.com/projects/LearningCocos2D_Resources

[ios5 cocos2d游戏开发实战] 笔记4 socket

二次信任 提交于 2020-01-20 11:23:44
socket 连接 SOCKET sock_client; sock_client = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (INVALID_SOCKET == sock_client) { std::cout << "Invalid socket." << std::endl; WSACleanup(); return 0; } sockaddr_in addr_sev; addr_sev.sin_family = AF_INET; addr_sev.sin_port = htons(PORT_SERVER); addr_sev.sin_addr.s_addr = inet_addr("127.0.0.1"); if (SOCKET_ERROR == connect(sock_client, (sockaddr *)&addr_sev, sizeof(addr_sev))) { std::cout << "Failed to connect." << std::endl; WSACleanup(); return 0; } 使用 POSIX创建线程 参见ios笔记 线程 socket文件描述符 参考链接:http://blog.csdn.net/kjing/article/details/6962440

[ios5 cocos2d游戏开发实战] 笔记1

*爱你&永不变心* 提交于 2020-01-20 11:23:28
1  ios设备加载文件区分大小写,模拟器不会,习惯使用统一的文件命名方式,统一小写字母。 2  避免使用固定位置,以适应不同屏幕尺寸。 3  不要魔鬼数字,定义常量 数学类: ccp 系列:CCPoint 加减乘除,投影,距离,旋转 CCARRAY_FOREACH,CCARRAY_FOREACH_REVERSE CCArray, CCDictionary CCRelease系列:   CC_SAFE_DELETE(p); // 当p不为NULL,delete p 并且将 p 赋为 NULL CC_SAFE_DELETE_ARRAY(p); // ...delete[] p.. CC_SAFE_FREE(p); // ...free p ... CC_SAFE_RELEASE(p); // 当p不为NULL,p->release() CC_SAFE_RELEASE_NULL(p); // 当p不为NULL,p->release() 并且将 p 赋为 NULL CC_SAFE_RETAIN(p); // 当p不为NULL,p->retain() CC_PROPERTY系列: 这些方法的声明全部都是virtual的,即便是内联,声明为virtual的方法也不会产生内联函数 class Ship: public cocos2d::CCNode { // 定义一个int类的属性m

android studio emulator crashing after 3.0 update

喜欢而已 提交于 2020-01-20 06:00:50
问题 I have been messing around with android studio and I ended up installing cocos2dx and using an arm cpu emulator to work with cocos2dx. I have recently seen a message prompting for an update for the android emulator service so I installed it and now my emulator crashes while trying to boot and gives this error in the logcat - this is the error it gave me 19:36 Emulator: ** 19:36 Emulator: ERROR:/buildbot/src/android/emu-3.0-release/external/qemu/fpu/softfloat.c:486:round_canonical: code should

android studio emulator crashing after 3.0 update

夙愿已清 提交于 2020-01-20 05:59:24
问题 I have been messing around with android studio and I ended up installing cocos2dx and using an arm cpu emulator to work with cocos2dx. I have recently seen a message prompting for an update for the android emulator service so I installed it and now my emulator crashes while trying to boot and gives this error in the logcat - this is the error it gave me 19:36 Emulator: ** 19:36 Emulator: ERROR:/buildbot/src/android/emu-3.0-release/external/qemu/fpu/softfloat.c:486:round_canonical: code should

How can I make an online 2 player game in Cocos2d X? [closed]

不羁岁月 提交于 2020-01-17 23:08:15
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I've made a platform game like Megaman and want people to be able to connect with eachother to play it together. It must work on Android and Iphone. I'm using Cocos2d X so it's hard to find good information that

How can I make an online 2 player game in Cocos2d X? [closed]

不打扰是莪最后的温柔 提交于 2020-01-17 23:06:27
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I've made a platform game like Megaman and want people to be able to connect with eachother to play it together. It must work on Android and Iphone. I'm using Cocos2d X so it's hard to find good information that

how to use box2d for collision detection in cocos2d-x

一笑奈何 提交于 2020-01-17 08:30:32
问题 my two sprites are roll and hero. i want to detect their collision using box2d in cocos2d-x i have got both the sprites moving on the screen (roll automatically, hero manually). all i want to do is call the function intersection(); when the two sprites collide. (sprites are declared globally in the *.h file) #include "GameScene.h" #include "HomeScene.h" USING_NS_CC; CCScene* GameScene::scene() { // 'scene' is an autorelease object CCScene *scene = CCScene::node(); // 'layer' is an autorelease