why game is running slow in libgdx?

前端 未结 8 1113
萌比男神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:47

    Points to ponder (From personal experience)

    1. DO NOT keep calling a function,in render method, that updates something like time,score on HUD (Make these updates only when required eg when score increases ONLY then update score etc)

    2. Make calls IF specific (Make updations on certain condition, not all the time) eg. Calling/updating in render method at 60FPS - means you update time 60 times a sec when it just needs to be updated once per sec )

    These points will effect hugely on performance (thumbs up)

提交回复
热议问题