andengine

andengine apply force

亡梦爱人 提交于 2019-12-10 05:02:33
问题 does anyone know why applyforce only works on one of my sprites? Also when I press the other sprites it also applies force to the one individual sprite. The nextTile method works fine. enter code here package com.martynnorman.jude; /** * @author Nicolas Gramlich * @since 11:54:51 - 03.04.2010 */ public class MainActivity extends BaseGameActivity implements IOnAreaTouchListener { // =========================================================== // Constants // ====================================

Terrain curve to array of points

谁说我不能喝 提交于 2019-12-10 03:45:24
问题 In my 2D game I'm using graphic tools to create nice, smooth terrain represented by black color: Simple algorithm written in java looks for black color every 15 pixels, creating following set of lines (gray): As you can see, there's some places that are mapped very bad, some are pretty good. In other case it would be not necessary to sample every 15 pixels, eg. if terrain is flat. What's the best way to covert this curve to set of points [lines], using as little points as possible? Sampling

Android accelerometer difficulties

不问归期 提交于 2019-12-09 23:19:58
问题 I'm a beginner in Android game Development, and I developing a small Game. I am facing some difficulties with the Motion Sensor: Accelerometer. this game is in Landscape mode. I want if my phone tilts in right, my character also goes right. ( same thing for left ) And when I stop tilting Character in the game should stop moving. But i don't understand really good the operation of the accelerometer, here is my code: @Override public void onSensorChanged(SensorEvent event) { synchronized (this)

Why IntelliJ Idea doesn't create BuildConfig.java in AndEngine module's \gen folder?

旧街凉风 提交于 2019-12-08 14:00:06
问题 I'm trying to compile module (AndEngine), but Idea doesn't create BuildConfig.java file. Module SDK is set to Android 4.0.3 Platform (java version "1.6.0_10") \src and \gen folders are marked as "Source folders". 回答1: Check the readme.md file in the AndEngine project. Nicolas says if your IntelliJ does not do that, that you can create it manually and put it in the Andegine source folder. To quote that file AndEngine Building Eclipse AndEngine has to be build with ADT-17 or higher! IntelliJ

AndEngine: Fatal exception in GLThread: IndexOutOfBoundsException

允我心安 提交于 2019-12-08 11:20:03
问题 I'm writing a custom dialog window for my AndEngine's BaseGameActivity and sometimes, when dialog have to dissapear, app crashes with this error: 08-15 09:49:16.193: ERROR/AndroidRuntime(1572): FATAL EXCEPTION: GLThread java.lang.IndexOutOfBoundsException: Invalid index 3, size is 3 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251) at java.util.ArrayList.get(ArrayList.java:304) at org.anddev.andengine.entity.Entity.onManagedDrawChildren(Entity.java:1008) at org.anddev

Choreographer(697): Skipped 152 frames! Debug log [duplicate]

安稳与你 提交于 2019-12-08 10:50:34
问题 This question already has answers here : Meaning of Choreographer messages in Logcat [duplicate] (5 answers) Closed 5 years ago . I am building a new game with andengine and for some reason i keep getting this debug statement in the logcat: 01-31 21:29:50.503: I/Choreographer(697): Skipped 152 frames! The application may be doing too much work on its main thread. Im not really sure what is causing this error exactly during my game. I am checking a lot of collisions, but they arent initiated

How to handle Galaxy S4 resolution since it's too high for AndEngine RatioResolutionPolicy

做~自己de王妃 提交于 2019-12-08 07:27:35
问题 I'm starting with AndEngine following this tutorial: http://www.matim-dev.com/full-game-tutorial---part-1.html But this guy looks like it's using a low resolution device for this test, I'm using a Galaxy S4 with a 1920x1080 resolution, yeah, damn high. I know the thing about the RatioResolutionPolicy, but even though I'm using 800x480 in my S4 I got 2 white stripes from both sides (LANDSCAPE) like if it wasn't good resized, do I need to include another wallpaper for very high screen

Disappearing ChangeableText

蹲街弑〆低调 提交于 2019-12-08 06:35:32
问题 I have a problem. When i create a changeable text then some letters disappears. I tried with sever fonts and it's not changing! Piece of code: FONT: FontFactory.setAssetBasePath("font/"); this.mFontTexture = new BitmapTextureAtlas(256, 256, TextureOptions.BILINEAR_PREMULTIPLYALPHA); And the changeabletext: ChangeableText ty = new ChangeableText(20, CAMERA_HEIGHT / 2 - 80, mFont, "Game over!"); this.mScene.attachChild(ty); 回答1: I had it when the BitmapTextureAtlas was too small. Try making it

How to pop up 'new update available' dialogue, when user starts my app(android)

早过忘川 提交于 2019-12-08 05:52:35
问题 I made a game using AndEngine and I have made different updates three times and uploaded in google play store. I see that Google does provide a update notifications, but most of the people don't read the 'available updates' notification Google provides. So When the users start my app, I want it to pop up a dialogue such as "A new version is available. Do you want to update?" and upon clicking the 'yes' button, it will link to the google market of my app. Is there any way I could implement

couldn't find “libandenginephysicsbox2dextension.so”

旧时模样 提交于 2019-12-08 05:51:13
问题 I am making simple android app using andengine and box2d extention. Unfortunately, I got this message: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/es.esy.m3na71jnu5cg5e2.gs14049_bsj_mid-2/base.apk"],nativeLibraryDirectories= [/data/app/es.esy.m3na71jnu5cg5e2.gs14049_bsj_mid-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libandenginephysicsbox2dextension.so" at java.lang.Runtime.loadLibrary(Runtime.java:367) at java.lang.System