AndEngine is a free Open Source 2D OpenGL Game Engine for the Android platform.

learn more… | top users | synonyms (1)

8
votes
3answers
737 views

How should I structure my classes to allow for multithreaded simulation?

In my game, there are plots of land with buildings (houses, resource centers). Buildings like houses have tenants, rooms, add-ons, et cetera, and there are several values that have to be simulated ...
7
votes
4answers
2k views

How do I make my rain effect look more like rain and less like snowfall?

I am making a game in that game I want a rain effect. I am little bit far from this right now. I am creating the rain effect like below: particleSystem.addParticleInitializer(new ColorInitializer(1, ...
7
votes
2answers
4k views

How do I find the angle between two vectors?

I have 3 points on my screen: a = a point which is (c.x, 0) makes a line pointing straight up b = a user input touch, can be anywhere on the screen c = a moving object a _______.________ | ...
7
votes
3answers
2k views

Should I move the world or move the player?

I'm about to start developing a sidescrolling game where the players goal is to travel as far as he can in the horizontal axis before touching down. Note that I do not need to ever travel back on the ...
6
votes
2answers
641 views

Show path of a body of where it should go after linear impulse is applied

I am making a game with Andengine and Box2D. I have a dynamic body and I apply linear impulse on the body to move it around when the user have touched the screen. Now I want to show the path where ...
6
votes
3answers
7k views

How to remove a box2d body when collision happens?

I’m still new to java and android programming and I am having so much trouble Removing an object when collision happens. I looked around the web and found that I should never handle removing BOX2D ...
6
votes
1answer
394 views

How do I make a scrolling background out of a sequence of images?

I am new to AndEngine and trying to code a basic sidescroller game using the ParallaxLayer class from this example. (I followed the example and it works.) How would I display multiple images ...
5
votes
2answers
582 views

Whats the physics behind the doodle jump game?

I'd like to know how we can achieve the doodle jump type physics using andengine. I mean the character is not colliding with the ground blocks when he moves upwards but will collide when he came ...
5
votes
2answers
2k views

How do I support variable screen ratios using AndEngine?

When displaying a background, AndEngine produces black bars above the image on certain devices. How do I support variable screen ratios for different devices using AndEngine?
5
votes
2answers
2k views

How do I place a progress bar in andEngine?

I am developing game using andEngine. I need to place a progress bar in my game to denote time remaining in the game. Is there a built-in method for doing this in andEngine? My searches only turned up ...
5
votes
1answer
788 views

Smooth pixels while rotating sprite

I just started with andengine, so this maybe gonna be silly question. How to make my sprites more smooth while I rotate them? Or maybe it because this is screenshot from tablet? Thanks JohnEye it ...
4
votes
2answers
3k views

Programmatically and efficiently create a graphical ripple effect?

I was developing tower of defence game for a long time. It was about to complete but I have to create ripple effect for one of the weapon that I have used. First question I want to ask is that is it ...
4
votes
1answer
698 views

How would I make an air hockey AI?

I am making an air hockey game for Android using AndEngine and its Box2D extension. How would I make an AI for an air hockey game? For it to work the AI would not only need to move its paddle side ...
4
votes
3answers
3k views

Box 2d Level Editor for AndEngine

I am getting started with Box2d in AndEngine. I need to know if there is any level editor to be used with box2d and gives output capatable with AndEngine. Is there any tool which can help me building ...
4
votes
1answer
353 views

Clock hand, how much should I rotate the hand by every frame?

I've got a virtual clock. The clock consists of the actual clock sprite, and a hand to go over it. I'm able to set how long the clock duration is. Say I set it to: 5 seconds. While the clock time is ...
4
votes
2answers
2k views

Rotation angle based on touch move

I want to rotate my stick based on the movement of the touch on the screen. From my calculation I did not able to find correct angle in degree. So please provide guidance, my code snippet for that are ...
4
votes
3answers
4k views

Remove gravity from single body

I have multiple bodies in my game world in andengine. All the bodies affected by gravity but in that I want my specific body does not affected by the gravity. For that solution after research I found ...
4
votes
3answers
2k views

Does AndEngine have a way to manage scenes?

Does AndEngine have a way to manage scenes (for example, main splash, menu, options, main game), and should I use a different scene per activity?
4
votes
1answer
236 views

How can I change width of sprite Dynamically?

I want to change width of sprite dynamically but i can't perform it.!! Here i want to change only my white sprite i want to use these type of facility in my game in using AndEngine I want to display ...
4
votes
1answer
1k views

AndEngine: Density, Elasticity, Friction, Gravity concepts

I am new to AndEngine. I have seen some physics examples from AndEngine Example package. I want to know the role of density, elasticity, friction and gravity while implementing physics. How they ...
4
votes
2answers
5k views

How can I save my game state so it can be resumed when my application resumes?

I've found that after resuming my game the whole engine is reloaded and application is reinitialized. I want to save engine state and in "onResume," resume the game process from where it left off. ...
4
votes
2answers
2k views

Making color of sprite darker or lighter

Is there any way to make a sprite darker or lighter in AndEngine? I dont want to use the alpha thing. Nor I want to loose the texture/design of the image.
4
votes
1answer
2k views

How do I implement an AutoParallax Background in AndEngine GLES1?

I'm using AndEngine GLES1. In my game, I use AnalogOnScreenControl to move a sprite and when it moves vertically, the background image also moves vertically. I want to do something like this: that is ...
4
votes
3answers
558 views

Box2d Collision problem

I'm not good with words so here's a picture to describe my problem: In my game there is this big ball which the user can move on x-axis only. Now, if the ball is falling like the red one, it's ...
4
votes
1answer
234 views

Letting the user draw a Polygon Body and Image

In my game, I want to provide the user with a drawing feature. By free hand drawing, the user creates a polygon shape. Then, in my game implementation, I have to create a body for the found vertices ...
3
votes
1answer
2k views

AndEngine Moving a Connected Texture and Physics Body

In AndEngine, many times we create a TextureRegion for our sprite. We can move this region around the scene but when I connect that region to a physics body I end up being able to use either one to ...
3
votes
3answers
848 views

How to make Box2D bodies automatically return to a initial rotation

I have two long Box2D bodies, that can collide while moving one of them around with MouseJoint. I want them to try to hold their position and rotation. Blue body is moved using MouseJoint (yellow) ...
3
votes
1answer
2k views

Andengine. Put bullet to pool, when it leaves screen

i'm creating a bullet with physics body. Bullet class (extends Sprite class) has die() method, which unregister physics connector, hide sprite and put it in pool public void die() { ...
3
votes
2answers
365 views

How create a respawn area in a tiled map

I'm creating a RPG game, I need to create a monster respawn area like the Pokemon games where if I walk through the long grass areas a Pokemon can appear. I already created the battle scene, I've seen ...
3
votes
1answer
606 views

AndEngine - Dragging a sprite that has a path modifier registered to it

I'm looking to be able to drag a sprite that is currently on a path from a path modifier. Currently, I have sprites on a path, and I have stationary sprites that are draggable. However, simply ...
3
votes
4answers
3k views

How to move a sprite automatically using a physicsHandler in Andengine?

I use a DigitalOnScreenControl (knob with a four-directional arrow control) to move the entity and the entity which is bound to a physicsHandler. physicsHandler.setEntity(sprite); ...
3
votes
1answer
834 views

How to rotate a sprite using multi-touch with AndEngine?

I am new to Android game development. I am using AndEngine GLES-2. I have created a box with a sprite. This box is now draggable by using the code below. It works fine. But I want multi-touch on ...
3
votes
1answer
838 views

How to load data for specific level at runtime?

I'm trying to create a game with many levels loaded from XML files. In my game I have many objects in each level. At present my game contains 20 levels, and I load all the textures at once on ...
3
votes
1answer
459 views

AndEngine- OnAreaTouched

In my AndEngine-based game there are a few sprites on the scene. One sprite acts as a surface and the rest of them are placed on top of this surface. I want to take unique actions whenever any of the ...
3
votes
2answers
560 views

How do I eliminate black bar artifacts in AndEngine/TMX plugin?

I used AndEngine gles1 along with the tmx plugin to generate my background maps. The image width is not fit to my virtual device, so I increased the tmx image size. Here is my code for the camera ...
3
votes
1answer
319 views

Knob in DigitalOnScreenControl not moving. Why?

I have set up a DigitalOnScreenControl in my game but the knob does not move. The base and the knob are drawn on the screen but the latter doesn't move as per the AndEngine example here. Here is a ...
3
votes
2answers
1k views

Detect multitouch (two fingers touch) on a sprite to apply pinch zoom behaviour

I am using andengine, want to move, zoom and rotate multiple sprites individually on a scene. I have achieved "move" but for pinch zoom i am unable to get the event to two fingers' touch. Below is the ...
3
votes
1answer
988 views

Move Background in AndEngine for a Racing Game

I am new to game development and AndEngine. I have small query about racing game. I am going to develop a bike racing game. For bike racing game we will move the background or the player. I am tried ...
3
votes
2answers
331 views

Word Search Game Issue

I am developing a game like word search. I have used AndEngine for this and for displayig grid of words I have used TiledMap. In this game, we need to join letters to make a word as we drag our ...
3
votes
0answers
133 views

How to make the Angry Birds “shot arch” dotted line? [duplicate]

I am making a game that includes 2D projectile flight paths like that of Angry Birds. Angry Birds employs the notion that a previous shot is shown with a dotted line "arch" showing the player where ...
3
votes
1answer
609 views

AndEngine; Box2D - high speed body overlapping, prismatic joints

I'm trying to make good suspension for my car game, but I'm getting nervous of some problems with it. At the beginning, I've tried to make it out of one prismatic joint/revolute joint per one wheel ...
2
votes
3answers
473 views

Implement 2x speed in tower of defense type game

I was currently developing tower of defense game and I want to implement 2x feature for my game. Game usually run with 1x speed that was normal speed of the game. Here what 1x and 2x mean : 1x - ...
2
votes
3answers
831 views

Rotate Body From Corner

I want to ask that how to rotate body from corner? movableBeam.getBeamBody().setTransform(movableBeam.getBeamBody().getPosition(), angle); The above line of code rotate the beam from center that I ...
2
votes
1answer
1k views

Is it possible to design Android game(AndEngine) levels using XML? [duplicate]

I am developing a game. In the game there is a lot of levels. Is it possible to design game levels using XML? Or what are different ways to design game levels? Please help me. Give some link or ...
2
votes
2answers
403 views

Ragdoll continuous movement

I have created a ragdoll for my game but the problem I found was that the ragdoll joints are not perfectly implemented so they are continuously moving. Ragdoll does not stand at fix place. I here ...
2
votes
2answers
670 views

How can set vibration option with my game in android? [closed]

I am using AndEngine to develop an Android game and I want vibration to be triggered when an enemy hits a player. How can I implement this into my game?
2
votes
1answer
1k views

Trying to run sample AndEngine gles2 code in the simulator throws “java.lang.IllegalArgumentException: No EGLConfig found!”, how can I fix this?

I tried to run a small sample game code in the emulator but it crashed. My LogCat is given here. Can you help me resolve the issue. 02-23 15:18:50.543: D/AndEngine(636): MainActivity.onCreate ...
2
votes
1answer
284 views

Handle Multiple Scene

For my game, now I adopt the strategy to create multiple scene. For this I have to ask two question please provide your view for my and other members for improvement. I have created single ...
2
votes
2answers
852 views

Box2d debug render

How can I render the body and joints in the physics world? During research I found the class called Box2dDebugRenderer. But when I put it into use it was full of errors. I do not found some classed in ...
2
votes
1answer
370 views

Why does my game freeze when I try and display a menu?

I make a MenuScene when my Game loads, which grabs some intro text from levelData and displays it and a button to start playing the level. When the MenuScene is created and displayed in ...