Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to make ball moment smoother in andengine
    primarykey
    data
    text
    <p>I am developing a maze and ball game with 20 levels. All the issues are fixed in my game except one problem. I am stuck at making balls moment smoother. the ball moment is good in all levels, except animated levels. I am not able to find where the mistake was. </p> <p>In all levels balls are sprites and level images are sprites and animated sprites. I have animated sprites for level images along with balls in 6 levels. In remaining levels level images and balls both are sprites only. </p> <p>all animated sprites are having 1024x1024 size textures. I used the following code to create animated sprites. </p> <pre class="lang-java prettyprint-override"><code>this.multipleImagesTexture = new Texture(1024,1024,TextureOptions.BILINEAR_PREMULTIPLYALPHA); this.multipleImagesTextureRegion = TextureRegionFactory.createTiledFromResource(this.multipleImagesTexture, this, getResources().getIdentifier(m_level.m_levelImages.get(j), "drawable", "com.andmaze.mobile"),0, 0, col,row); this.mEngine.getTextureManager().loadTexture(this.multipleImagesTexture); multipleimagesdragon = new AnimatedSprite(5, 83, this.multipleImagesTextureRegion); multipleimagesdragon.animate(1000); scene.getFirstChild().attachChild(multipleimagesdragon); </code></pre> <p>and following is the code to create sprites for balls </p> <pre class="lang-java prettyprint-override"><code>for(GoliMeta g : metalist) { balls_Array[index] = new Sprite(g.X , g.Y, ballTextureRegion); Body body = PhysicsFactory.createCircleBody(mPhysicsWorld, balls_Array[index], BodyType.DynamicBody, FIXTURE_DEF); scene.getFirstChild().attachChild(balls_Array[index]); mPhysicsWorld.registerPhysicsConnector(new PhysicsConnector(balls_Array[index], body, true, false)); index++; } </code></pre> <p>In all levels in which there is normal sprite for maze the ball moment is good. and in other levels i.e where i have animated sprites, there the ball moment is unusual. I have changed the physicsworld object code to</p> <pre><code> mPhysicsWorld = new FixedStepPhysicsWorld(30, new Vector2(0,SensorManager.GRAVITY_EARTH), false); </code></pre> <p>instead of </p> <pre><code> mPhysicsWorld = new PhysicsWorld(new Vector2(0, SensorManager.GRAVITY_EARTH), false); </code></pre> <p>there is a slight change in ball moment but not as much smoother in other levels( non animated levels). it is still getting bounced lightly. and because of that problem not able to play the game.</p> <p>Can any one help me if aware about this. any response would be appreciated.</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload