I am working on a relatively simple 2D scrolling iPhone game. The controls are tilt-based. I am using OpenGL ES 1.1 for graphics. The game state is updated at a speed of 30 Hz ... And the picture is updated at a speed of 30 frames per second (via NSTimer). The smoothness of the picture is in order ... But not as smooth a game as iFighter. What can I do to improve the smoothness of the game?
Here are the potential issues that I briefly looked at:
I change the opacity to 15 βsmallβ (20x20 pixels) textures at a time ... Obviously changing the opacity in this way can degrade the drawing performance
I only process 30 frames per second (via NSTimer) ... Perhaps 2D games like iFighter are displayed at a higher frame rate?
Perhaps the state of the game can be updated faster? Please note that acceleration values ββare updated at a speed of 100 Hz ... Therefore, I can potentially update part of the game state at 100 Hz
All my PNG24 textures ... Maybe PNG8 will help (due to the smaller size, etc.)
It is very difficult to debug graphics problems. Try using openGL ES tools to find where the bottlenecks are. It is very comfortable. Also, watch the WWDC video on openGL. They are really good.
, , , : " 30 ". , - ? , CADisplayLink , . .
CADisplayLink
Mo 30fps...
, 30 , , . iphone, , 100 , , 10 . 10 , .
, , , , . , iphone, , .
Source: https://habr.com/ru/post/1758577/More articles:Is TWebBrowser dependent on IE version? - windowsPHP function to check array - phpWhat is the correct way to use DTO in this case? - asp.net-mvcsql by checking if a value appears greater than 2x in the table - sqlRun Pinax without VirtualEnv - djangoin the application, how to specify the order of export (load) columns from the data warehouse - google-app-engineImport a text file and read line by line in Java - javaReading a text file in Java - javaThe best way to make a standalone browser without chrome, nothing more - browserConverting a time string to a temporary or numeric format - timeAll Articles