English 中文(简体)
AndEngine FPS 每一书目
原标题:AndEngine FPS Drops With Each Sprite

我正与安得内一道开展一个评估项目,我对我的框架率进行了重大冲击。 我在屏幕上安装了几个象样的间谍,每座是512x768,而我看来,每张照相机中就有一个非常明显的空白。

即使所使用的形象只是空白,但损失数额相当。 我搜索并尝试了所有有意义的事情,但似乎没有任何改进,而安汶缺乏文件也没有简化任何事项。

我唯一真正的猜测是,间谍活动必须完全重新唤醒自己。 我可能完全错了,但这是我可以认为的唯一合理理由。 尽管如此,我仍无法确定如何阻止这种情况发生(假定这当然是问题)。

我所利用的法典与我所看到的每一个例子一样,因此我怀疑这是一个问题,但就在我的间谍活动已经形成时,情况就好像如下:

        public void onLoadResources(){
            this.mTexAtlas = new BitmapTextureAtlas(1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
            this.mTexBottom = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mTexAtlas, this, "bottom.png", 0, 0);
            this.getEngine().getTextureManager().loadTexture(this.mTexAtlas);
        }

        public Scene onLoadScene(){
            mTexBottom = new Sprite(spriteX, spriteY, spriteWidth, spriteHeight, mTexAtlas);
            scene.attachChild(mTexBottom, childCount++);
        }

出于明确的原因,这并不是我的确切法典,而是我所看到的所有例子如何看待的,因此,我们看上去了什么。 奥赫和文字地图集广度为1024,因为我至少现在就把两个图像放在了上面。

此时此刻,我愿意尝试任何事情,使之稍有好转,因此,任何想法都将是巨大的。

问题回答

我认为,你在错误的地方使用错误的变量,你能否尝试这样做?

    public void onLoadResources(){
        this.mTexAtlas = new BitmapTextureAtlas(1024, 1024, TextureOptions.BILINEAR_PREMULTIPLYALPHA);
        this.mTexBottom = BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mTexAtlas, this, "bottom.png", 0, 0);
        this.getEngine().getTextureManager().loadTexture(this.mTexAtlas);
    }

    public Scene onLoadScene(){
        Sprite theSprite = new Sprite(spriteX, spriteY, spriteWidth, spriteHeight, mTexBottom );
        scene.attachChild(theSprite, childCount++);
    }

你们的摄像是多么大? 我指的是,与屏幕相比,贵标准是多么大?

你们应努力避免一度抽取屏幕。 绘制一 couple覆盖整个屏幕的标书可能是你所能做的最坏事。





相关问题
Race car game, car moving faster on faster computer

I understand why it does that but I don t really have any idea of how to prevent that. So the scenario is, every frame I move the car by a certain of predefined pixels. What happens is when I go on ...

FPS how calculate this?

In my OpenGL book, it says this: "What often happens on such a system is that the frame is too complicated to draw in 1/60 second, so each frame is displayed more than once. If, for example, it ...

Counting digits in a float

I am following some beginner tutorials for OpenGL in c++ but as I started off as a c# programmer it has made me take a lot of things for granted. So my problem occurred when I was debug printing my ...

Help with the ffmpeg

I can read now the last line from the FFmpeg procees executed in a cmd window. with this source using Scripting host model object reference. Private Sub Command1_Click() Dim oExec As ...

Understand Flex Application and Frames

Driven on by curiosity, I’m trying to understand the Life Cycle used by Flex Application. So, I’ve done a little research on this argument; the two key concepts used into the FlashPlayer are: SWF ...

表3

我正在利用开放式GES1.1为Pi and iPod Touch开发2D游戏。 在Peter、Peit 3G和所有iPod Touch模式上,一切都做工。 这些游戏通常使大约60个科索沃警察部队的景象。

热门标签