cocos2d-android

Android Graphics Memory Limits

跟風遠走 提交于 2019-12-04 12:47:42
问题 I am creating an android game using opengl and a cocos2d port (http://code.google.com/p/cocos2d-android-1). I am targeting a wide range of devices and want to ensure that it performs well. I only test on a nexus one and am hoping to get some input from people with experience on slower devices. Currently the game uses two 1024x1024 textures as well as two 256x256 textures. Is this within the limits of most devices? Anyone have any rule of thumb or experience with graphics memory limits in

How to use the mouse joint in Android?

ぐ巨炮叔叔 提交于 2019-12-04 06:14:50
问题 I want to use the MouseJoint in Java for Android. I am new in box2d and cocos2d. I don't know how to use the mouse joint. 回答1: i recomend you to see this tutorial example. Copy from it (sorry i don't like broken links :) ) ... you drag your body with the help of the MouseJoint, it will collide with the other bodys in the world and apply force to them. Box2d - Manual - http://www.box2d.org/manual.html#_Toc258082974 8.10 Mouse Joint The mouse joint is used in the testbed to manipulate bodies

Android Graphics Memory Limits

本小妞迷上赌 提交于 2019-12-03 08:03:35
I am creating an android game using opengl and a cocos2d port (http://code.google.com/p/cocos2d-android-1). I am targeting a wide range of devices and want to ensure that it performs well. I only test on a nexus one and am hoping to get some input from people with experience on slower devices. Currently the game uses two 1024x1024 textures as well as two 256x256 textures. Is this within the limits of most devices? Anyone have any rule of thumb or experience with graphics memory limits in these cases? If gfx memory is exceeded does it page to normal memory? Afaik the Memory Limits for textures

Cocos2d-x vs cocos2d-android for an Android game

我的未来我决定 提交于 2019-12-03 03:15:33
问题 After using 'cocos2d-iphone' in one of my projects, I am trying to decide which flavor of Cocos2d I should use for an Android game. My personal list of pros and cons: Cocos2d-x pros: it should be easier to bring the game to iOS later, potentially other platforms as well cons/doubts: debugging c++ code on Android (easy or not?), compatibility of NDK app with various Android devices (how much of a problem?), accessing platform-specific functionality (in-app purchases, etc.) cocos2d-android pros

Cocos2d-x vs cocos2d-android for an Android game

一曲冷凌霜 提交于 2019-12-02 16:46:15
After using 'cocos2d-iphone' in one of my projects, I am trying to decide which flavor of Cocos2d I should use for an Android game. My personal list of pros and cons: Cocos2d-x pros: it should be easier to bring the game to iOS later, potentially other platforms as well cons/doubts: debugging c++ code on Android (easy or not?), compatibility of NDK app with various Android devices (how much of a problem?), accessing platform-specific functionality (in-app purchases, etc.) cocos2d-android pros: all Java, easier to setup and access platform-specific functions cons: will have to translate from

how do i create a cocos2d particle effect in cocos2d android 1?

徘徊边缘 提交于 2019-12-02 09:36:21
问题 I'm using the android version of cocos2d located here: https://github.com/ZhouWeikuan/cocos2d I'm an iPhone guy checking out android who already has familiarity with cocos2d iPhone. Ideally i would be able to create the particle from a plist file in the package/bundle. I can't seem to even get the "premade" default style particles working ie CCParticleFireworks (I've only tried in the simulator though). I was disappointed that there is very little sample code out there for cocos2d android so

how do i create a cocos2d particle effect in cocos2d android 1?

ε祈祈猫儿з 提交于 2019-12-02 05:32:15
I'm using the android version of cocos2d located here: https://github.com/ZhouWeikuan/cocos2d I'm an iPhone guy checking out android who already has familiarity with cocos2d iPhone. Ideally i would be able to create the particle from a plist file in the package/bundle. I can't seem to even get the "premade" default style particles working ie CCParticleFireworks (I've only tried in the simulator though). I was disappointed that there is very little sample code out there for cocos2d android so if anyone has a good resource on this I would be interested as well. I'm just learning java as well so

Black Screen on Android Launch Unless using Landscape Orientation

一笑奈何 提交于 2019-12-01 23:31:08
问题 Using a Nexus 5 (and any of the later android handsets such as Galaxy S5 etc) my game which previously worked fine on other devices, simply shows a black screen when launched, the buttons can be clicked (even though you cannot see them) and the sfx plays. Having struggled massively with this problem, I somehow managed to fix it to some degree this is the code that matters regarding the launch; mGLSurfaceView = new CCGLSurfaceView(this); CCDirector.sharedDirector().setScreenSize(CCDirector

How can I use CClistview in COCOS2d Android?

落花浮王杯 提交于 2019-12-01 10:40:19
I am working on a cocos2d game. In this game, I have to display a score level-wise: ================================================== Level Score 1 500 2 600 3 900 I want to use the cclistview in my game. Does anyone have an idea about cclistview and how it's used in Android cocos2d? I think you are confusing cocos2d for android and cocos2d-x as same sdk. I don't know of any cclistview in Cocos2d. There is one CCTableView in cocos2d. You can find its implementation in the cocos2d library itself. The package org.cocos2d.extension.scroll contains a class CCTableView. You can check its

COCOS 2D screen shot is black in Android

瘦欲@ 提交于 2019-11-30 11:50:49
I am using the following code. The image is saved but it is BLACK. Please see my code and tell me where I am doing wrong. I am using this code in the Menu. case R.id.id_menu_Save: Bitmap bmp = SavePixels(0, 0, 800, 400, CCDirector.sharedDirector().gl); File file = new File("/sdcard/test.jpg"); try { file.createNewFile(); FileOutputStream fos = new FileOutputStream(file); bmp.compress(CompressFormat.JPEG, 100, fos); Toast.makeText(getApplicationContext(), "Image Saved", 0).show(); Log.i("Menu Save Button", "Image saved as JPEG"); } catch (Exception e) { e.printStackTrace(); } break; This is my