Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have posted this issue on stackoverflow, but unfortunately nobody couldn't find solution, maybe someone here know this.

I'm developing Side Scroll 2D Game, using AND ENGINE

http://i.imgur.com/j8oJD.png

I'm using their SVG extension (I'm using vector graphic)

But I discovered strange and ugly effect, while moving my player (while camera is chasing player exactly, means while camera is changing its position)

Images of my sprites looks just different, they are like blurred or there is effect like those images would be moving (not changing their possition, just jittery effect, really hard to explain and call this effect properly) Hopefully this image may explain it a bit:

http://i.stack.imgur.com/z02UL.jpg

Its more or less, how does it look in the game, where:

a) "FIRST" image is showing square, while player is moving (CAMERA isn't) image looks as it should

b) "SECOND" the same image, but with this strange effect "which looks like image moving/blurring during camera moving [chasing player])

Friend of mine told me that it might be hardware problem:

"the blurring that you notice is actually a hardware problem. Some phones "smooth" the content on the screen to give a nicer feel to applications. I don't know if it's the screen or the graphics processor, but it doesn't occur on my wife's Samsung Captivate. It happens on my Atrix and Xoom though. It's really noticable on the Xoom due to the large screen size."

But seems there is way to prevent it, since I have tested many similar games, where camera is chasing player, and I could not notice such effect.

Is there a way to turn this off in code?


I'm grateful for previous answers, unfortunately, still problem exist.

Till now, I have tried:

  • casting (int) on setCenter method which is being executed on updateChaseEntity
  • testing game using PNG images, instead of SVG extension and vector graphic
  • different TextureOptions
  • hardwareAcceleration

If someone have different idea, what may cause this strange effect, I would be really grateful for help - thank you.

share|improve this question

2 Answers 2

It could be the refresh rate not being in sync with the screen's refresh rate.

First thing to test is to take a screenshot while the camera is moving and see if the blur appears on the resulting image.

If not then it definitely is a problem with the hardware and you might have to try to sync the drawing cycles with your hardware (I have no knowledge of how to achieve this in android).

Does the blur appear on the emulator as well?

share|improve this answer
    
Thanks for answer, I have taken couple of screenshots ussing android ddms, and while I could see this 'blurring effect' on my device, it wasn't really visible on taken screen'shots. Actually it does happen on 99% tested devices. –  Matim Dec 17 '11 at 12:46
    
Ok so definitely something with the game engine settings. Post an answer if you find the cause... it's always nice to leave a solution if not for you to remember later on for all to see. –  Coyote Dec 20 '11 at 16:40
    
If I will find solution, I definitely will post it, till now I have tried so many different setting combinations (Texture settings, and so on) without success. The same happens using PNG files, so its not SVG Extension problem, another thing is that my friend said its rather HARDWARE problem, not engine, seems its true, because such 'effect' is visible in many games, but in some its not visible (sometimes because bright graphic) Thats why I'm wondering. –  Matim Dec 20 '11 at 16:52
    
I misread your first comment. It seems it is a hardware problem... The screen refresh is sometimes slower than you would expect, mainly on cheap hardware. With brighter graphics the persistence is more visible, mainly when you have a lot of bright and dark graphics moving... The higher the contrast the more visible is the blur. –  Coyote Dec 20 '11 at 20:37

I had a few issues with the performance of actually moving a camera, and switched to a SmoothCamera which increased performance, and looks so much better.

Hope this helps:

http://code.google.com/p/andengine/source/browse/src/org/anddev/andengine/engine/camera/SmoothCamera.java?r=ce34423c75330560d7bb4d4a00d20e9b9a18175a

Update: This may not be the most recent version of this code, but SmoothCamera is available in GLES 2 also. Just switch "Camera" to "SmoothCamera", I believe it takes some different parameters upon configuration, (like MAX_VELOCITY, etc).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.