14

The "ripple" effect you are showing is just a radial sinewave: sin(t), where t is the distance from some center. Image from here Doing this kind of deformation in a vertex or pixel shader is easy: just set up the center of the wave as a uniform variable waveCenter, then move every vertex in z (where z is the "up" direction) by MAGNITUDEsin( FREQUENCYt ), ...


10

The mechanics for air hockey are not particularly deep, so it wouldn't take much to generate reasonable behavior. Think of the movement of the paddle as comprised of several different types of movement: Wander - to some extent people simply move the paddle around, both left and right and forward and back to keep the enemy guessing. Defend - blocking the ...


6

I think the RUBE editor might be what you're looking for. It does however export the box2d bodies in a JSON format, so you'll probably need to figure out yourself how to load these. It is very well documented tough.


6

I'm not familiar with AndEngine, but the obvious general approach is to turn off collisions between the character and platforms whenever the character's vertical velocity is positive (i.e. the character is moving upwards). If your platforms (or character) have a non-negligible thickness, you may need to deal with the situation where the character partially ...


6

USE GLES2 AndEngine is a little tricky to get configured properly the first time you try. I recommend installing the version stored at RealMayo's github, which is a stable version. That's a version of GLES2 and yes, it's definitely worthwhile to use GLES2 over GLES1. Many new features were added that make life easier, improve performance, and add great ...


6

Color value basically consists of 4 single byte channel values, these 4 value represent R, G, B and transparency(A) of that color. An integer value is also a 4 byte value, so these two types are used interchangeably. Based on the name of the function you are using I'm guessing the R is packed as the byte with lowest value, and A is the highest value byte. so ...


5

To get the best result, you need to run the simulation like if you actually threw the projectile - just fast forward! And that is quite easy in any Box2D port. In AndEngine call method step(float timeStep, int velocityIterations, int positionIterations) from class com.badlogic.gdx.physics.box2d.World in a loop to run it as fast as you want. You can apply ...


5

In most update methods there is a delta, which provides the number of milliseconds (or some other measurement of time) since the last update was called. By calculating all of your movement calculations using both a delta and a movement speed, you get movement that is unaffected by a fluctuating frame rate. The following is code pulled from the movement ...


5

I believe what you're asking is how to get rid of letterboxing, like this: By default, AndEngine assumes you want some fixed aspect ratio. It then uses letterboxing to handle devices with different display aspect ratios then what you're providing. The advantage is you have certainty about your layout. There's more than one approach to get rid of them, ...


5

I add my code its for temporary code you can change this code set your life of player life = 10; final Sprite whiteSprite= new Sprite(0, 0, testRegion); scene.attachChild(whiteSprite); width = whiteSprite.getWidth(); scale = width/life; Timer timer = new Timer(); timer.schedule(new TimerTask() { @Override public ...


5

Yes, it is possible. AndEngine has a Level loader that can do exactly what you need. I recommend going through these tutorials. In the final tutorial, creating a whole game, one of the chapters talks about level creating and loading. Look for a class named SimpleLevelLoader.


4

My second question is that my actual game scene uses bound camera and I perform scrolling on that camera but my other scene uses the normal camera. So in this situation what to do? how to use multiple camera for single engine? or how to reset available current camera? Our 3d game engine allows us to create as many render targets we wish. A render target is ...


4

It's not going to be easy. I don't know much about AndEngine, but I've developed some GLES 2 apps, and it is possible to run and test them inside an AVD (in the Android world, "Virtual Device", or AVD is the correct term, not "emulator"). Looking at the logcat, I can see that there is a first exception: 02-23 15:18:50.983: D/AndEngine(636)...


4

AndEngine's physics extension is a port of Box2D. And Box2D's faq says this about tile based environments that should be "smooth": Using many boxes for your terrain may not work well because box-like characters can get snagged on internal corners. A future update to Box2D should allow for smooth motion over edge chains. In general you should ...


4

Add this permission to your Manifest.xml file <uses-permission android:name="android.permission.VIBRATE" /> and when there is a collision or something like that (I assume that you're handle the collision detection with AndEngine) you can add this code : // this is how you get an instance of Vibrator from current Context Vibrator v = (Vibrator) ...


4

If I understand your problem correctly, you are trying to create an area that can detect the player is in contact, but without preventing the player from walking in it. In Box2D, what you want is called a Sensor. A Fixture is a physics object which will actually cause collisions with other physics objects, thereby preventing them from intersecting an area. ...


4

One way would be to apply a correctional torque that is proportional to the offset angle and set a high angular damping on the body. Let me elaborate: First of all, you need to store the desired angle (targetAngle) that you want to rotate to. Somewhere in your game update loop you should cycle through all the bodies that tend to snap back to their original ...


4

One of the easiest ways is to generate the board solved. Generate a board that is all matched pairs, then run it through an algorithm that shuffles it about until some criteria is met (Like no matching triplets left on the board.) There will always be a solution for a board made this way that can be solved to completion if you control the number/intensity ...


4

The camera hierarchy goes like this: SmoothCamera extends -> ZoomCamera extends -> BoundCamera - Zoom cameras adopt Bound camera properties/methods. Smooth cameras adopt Zoom camera and Bound camera properties/methods Choosing a SmoothCamera you'll have all the functionality from the others. The difference between them is that they simply gain ...


3

You need to ask for the device's resolution, and then, set the viewport to fit it. I assume that you are using Cocos2d X, they call it Multi Resolution, hope this helps. Edit: This post from Jesús bosch may give extra information about the topic.


3

I think you're right - you are overriding SequenceEntityModfier's onUpdate method. Simply call parent's onUpdate method when you are overriding it: @Override public float onUpdate(float pSecondsElapsed, IEntity pItem) { highlighter.setPosition(player2.getX() - highlighterOffset, player2.getY() - highlighterOffset); return super.onUpdate(...


3

I'd just like to add another answer here. When performing speedup by changing the timestep, it might mean the behaviour is different. For example, if you have some physics in there with euler integration, the behaviour at double speed will diverge over time. This is not a problem in 99% of cases, but it is something you should be aware of. If you are ...


3

You could override the entity modifier and execute some code at the beginning of the modification and on its end MoveYModifier yourModifier = new MoveYModifier(3, 0, 10) { @Override protected void onModifierStarted(IEntity pItem) { super.onModifierStarted(pItem); // Your action after starting modifier ...


3

1) Here's the CocosBuilder Extension. 2) org.anddev.andengine is an old package name. Are you using the good branch of the Multitouch extension? It should be import org.andengine.util.system.SystemUtils;. 3) You may not use the good branch where there's the error with Color package. It should be import org.andengine.util.color.Color;.


3

Ilmari Karonen's answer would suffice if you're coding the collision and physics yourself. Otherwise I assume you wanted to use AndEngine's Box2D wrapper for physics since you mentioned "collision filter". In that case, you probably want to refer to this tutorial on one side platforms. General idea is to use BeginContact and EndContact callbacks to disable/...


3

The camera class has several methods to control its use. You've discovered some of them already with setZoomFactor. To move the camera directly you can use this: setCenter(float pCenterX, float pCenterY) Where X and Y are the scene coordinates. If what you're asking is how to move the camera gracefully, rather than simply plopping it in the new ...


3

You need to profile your code and find what's taking up so much memory. Simply calling the garbage collection won't get rid of things that you've forgotten to stop using properly. Check out Traceview for a tool that comes with the SDK. Or search for your own Android profiler to find what's using your memory. Once you have your memory usage statistics, you ...


3

What you're asking for is a subset of collision handling. Essentially, when you've moved the player outside of the scene, you want to move the player back into the scene, and you want to do that in the same update as you've moved the player, immediately after moving the player, so the out-of-scene location never gets rendered. Lets assume you do something ...


3

You have to use entity modifier for this purpose. For example, sprite.registerEntityModifier(new LoopEntityModifier(new SequenceEntityModifier(new ScaleModifier(1,1,1.5),new ScaleModifier(1,1.5,1)))); Above code can become useful to you. If you found any mistake then please make it correct because I don't check it. And now turn for body, as per my ...


3

The AndEngine documentation states that a Scene is nothing more than a mere container for a specific game state. Logically, if it makes sense for each "level" to be a state - (they are distinicntly different and require some complicated setup or it's just easier), just drop the scene. A scene is a self-contained state - just make sure to be careful that ...


Only top voted, non community-wiki answers of a minimum length are eligible