html5 canvas general performance tips

后端 未结 3 954
说谎
说谎 2021-01-30 09:27

I am developing a game for html5 canvas while mainly targeting mobile devices. The canvas is resized to the biggest available resolution, so that it almost makes a fullscreen ga

3条回答
  •  孤独总比滥情好
    2021-01-30 09:49

    A couple of more links:

    • HTML5 Games 0.2: Integers are Your Friends
    • HTML5 Canvas Performance in deviantART muro
    • Game Engine Listing. See esp. "Other" for extra links.

    It's hard to give any specific tips as I'm not familiar enough with your game. You might want to split up rendering to multiple layers, though. This makes sense particularly if you have some static elements there. This way you can avoid some clearing and end up with nicer code overall.

提交回复
热议问题