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'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

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

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

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

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 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

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

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

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

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

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 ...


3

Here in the following link I post my code that I used to create ninja swipe effect. http://www.andengine.org/forums/gles1/draw-gl10-gl-triangle-strip-fruit-ninja-swipe-effect-t7257.html This link contains whole discussion about this topic but at last I post my code and image so any user can immediately create this effect.


3

Your idea is correct. The scene can be as big as you want. In fact, you don't need to bound it. You just create the correct camera and then set camera.setChaseEntity(mainEntity); But you are not creating the camera correctly. Look at the constructor: public BoundCamera(final float pX, final float pY, final float pWidth, final float pHeight, final float ...


3

You can not achieve it in OpenGL, neither in DirectX, by changing blending equation. To do that, you should render 4 circles into a separate texture with alpha = 1, then render that texture over former background with alpha = 0.25.


3

This is normal behaviour. It happens because of the Android Activity Lifecycle destroying and recreating the OpenGL context onPause/onResume. From GLSurfaceView documentation: Activity Life-cycle A GLSurfaceView must be notified when the activity is paused and resumed. GLSurfaceView clients are required to call onPause() when the activity pauses and ...


3

I can't speak to using AndEngine, but the logic for an infinite scrolling backdrop is pretty engine-agnostic. Let's simplify and imagine the case where you are alternating between two images (it doesn't really matter how many you have). Imagine a number line for x, from zero to infinity. Now imagine that your first image (image 0) is placed on that line ...


3

Are you randomly creating waves, or would they be set. If the enemy waves were set, I would suggest figuring out what enemies are worth what points, and if there is a diffuculty, figure out what the modifier in points would be. Once you have your set waves with enemies of set points, total up the points, and make each star be an even portion of the total. ...


3

It seems to me that you will need to perform some sort of Frequency analysis on the audio file in question. You could either pre-process the file on level load (using the data to queue up your level actions), or perform the analysis in real-time. Either way, you'll want to divide your audio waveform into sections, each comprised of N samples, and then ...


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