有没有人遇到他们对更高分辨率的游戏在cocos2d-的Andr​​oid? [英] Has anyone run their game on Higher Resolution in Cocos2d-android?

查看:218
本文介绍了有没有人遇到他们对更高分辨率的游戏在cocos2d-的Andr​​oid?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CCScene不显示在更高分辨率的什么?

我的一个项目工作中,我使用cocos2d_android.jar和4.3版本的屏幕变为空白和音乐/ ccTouches /其他的东西做工精细。

I am working on a project in which I'm using the cocos2d_android.jar and on the 4.3 version the screen goes blank and music/ccTouches/others things working fine.

即使我改的jar文件API级别18(4.3版本),添加到我的项目并没有在进口时没有错误,并使用自己的班级,但在 RunTimeError发生这样的:

Even after I change the jar file with the API level 18(4.3 version), Add into my project and there is no error in the import time and uses their classes but in the RunTimeError occurred like :

09-14 07:49:49.890: E/AndroidRuntime(1282): FATAL EXCEPTION: GLThread 102
09-14 07:49:49.890: E/AndroidRuntime(1282): java.lang.NullPointerException
09-14 07:49:49.890: E/AndroidRuntime(1282):     at      org.cocos2d.nodes.CCAtlasNode.calculateMaxItems(CCAtlasNode.java:86)
09-14 07:49:49.890: E/AndroidRuntime(1282):     at org.cocos2d.nodes.CCAtlasNode.<init>(CCAtlasNode.java:80)
09-14 07:49:49.890: E/AndroidRuntime(1282):     at org.cocos2d.nodes.CCLabelAtlas.<init>(CCLabelAtlas.java:41)
09-14 07:49:49.890: E/AndroidRuntime(1282):     at org.cocos2d.nodes.CCLabelAtlas.label(CCLabelAtlas.java:36)
09-14 07:49:49.890: E/AndroidRuntime(1282):     at   org.cocos2d.nodes.CCDirector.setGLDefaultValues(CCDirector.java:600)

修改3:

这些错误,当我改变API级18的Cocos2D-android的主要图书馆,但我在这之后发现,这个问题是不是属于API级别17/18比我改变了库$ P $来pvious和问题是涉及到高分辨率

我调试的项目,但不能理清这个问题。

I debugged the project but couldn't sort out this problem.

修改1:

我检查了两款游戏是通过了cocos2d-的android.jar,同样的事情发生了发在一场比赛中像CCScene不显示任何内容,另一个是工作的罚款。

I checked two game which is made through cocos2d-android.jar and The same thing happened in one game like CCScene doesn't display anything and another one is working fine.

编辑2:

的Nexus 7分辨率为1280 * 1920,高度为许多改变屏幕尺寸后,接受了我发现的是1735的最大高度起飞经的cocos2d-机器人。 有什么办法来增加高度的尺寸

Nexus 7 resolution 1280*1920 and The height is acceptable after many changes in screensize what I found is 1735 is maximum height take by cocos2d-android. Is there any way to increase the size of height

什么是做它的工作的可能性。有人建议的方式

What is the possibility to make it working. Somebody suggest the way

推荐答案

解决方法:此问题是

改变gluPerspective使用1662,而不是1500 CCDirector(setProjection法)。这将与工作分辨率高达1920星系S4等。

change gluPerspective to use 1662 instead of 1500 in CCDirector(setProjection method). This will work with resolutions up to 1920 galaxy s4 etc.

这篇关于有没有人遇到他们对更高分辨率的游戏在cocos2d-的Andr​​oid?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆