Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/230.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 使用andengine时,运动背景图像不平滑_Android_Andengine - Fatal编程技术网

Android 使用andengine时,运动背景图像不平滑

Android 使用andengine时,运动背景图像不平滑,android,andengine,Android,Andengine,我正在创建一个安卓游戏并使用安卓引擎。我正在使用AutoparallaxBackground移动背景。背景移动不平稳,它被卡住,然后移动。如何平滑地移动背景 final AutoParallaxBackground autoParallaxBackground = new AutoParallaxBackground(0, 0, 0, 5); autoParallaxBackground.addParallaxEntity(new ParallaxEntity(-50.0f, new

我正在创建一个安卓游戏并使用安卓引擎。我正在使用AutoparallaxBackground移动背景。背景移动不平稳,它被卡住,然后移动。如何平滑地移动背景

final AutoParallaxBackground autoParallaxBackground = new AutoParallaxBackground(0, 0, 0, 5);
      autoParallaxBackground.addParallaxEntity(new ParallaxEntity(-50.0f, new Sprite(0, 0, this.texRegBg1)));
     autoParallaxBackground.addParallaxEntity(new ParallaxEntity(-60.0f, new Sprite(0, 0, this.texRegBg2)));
     autoParallaxBackground.addParallaxEntity(new ParallaxEntity(-70.0f, new Sprite(0, 0, this.texRegBg3)));
     autoParallaxBackground.addParallaxEntity(new ParallaxEntity(-80.0f, new Sprite(0, 0, this.texRegBg4)));
  • AndEngine中包含视差样本,请在您的设备上试用,并确保其正常工作

  • 用你的纹理替换视差样本中的一个(单个!)纹理,看看它是否仍然平滑工作。如果它没有——改变并修改你的纹理,直到你得到平滑

  • 逐个添加更多纹理。让他们顺利工作


  • 您正在使用的纹理图像的大小是多少?图像大小是720x480..纹理大小是1024x1024mm。。。我认为尺寸较大可能是问题所在。使用较小的图像进行测试,看看它是否提高了平滑度。但我希望背景尺寸一般为720x480。因此它可以用于所有设备。。是否有其他方法解决此问题?在哪个设备上进行测试?