why game is running slow in libgdx?

前端 未结 8 1098
萌比男神i
萌比男神i 2020-12-09 06:50

I am making racing game in Libgdx.My game apk size is 9.92 mb and I am using four texture packer of total size is 9.92 Mb. My game is running on desktop but its run on andro

8条回答
  •  遥遥无期
    2020-12-09 07:33

    To really understand why your game is running slow you need to profile your application.

    There are free tools avaiable for this.

    On Desktop you can use VisualVM. On Android you can use Android Monitor.

    With profiling you will find excatly which methods are taking up the most time.

    A likely cause of slowdowns is texture binding. Do you switch between different pages of packed textures often? Try to draw everything from one page before switching to another page.

提交回复
热议问题