{"action":"created","issue":{"url":"https://api.github.com/repos/libgdx/libgdx/issues/3348","labels_url":"https://api.github.com/repos/libgdx/libgdx/issues/3348/labels{/name}","comments_url":"https://api.github.com/repos/libgdx/libgdx/issues/3348/comments","events_url":"https://api.github.com/repos/libgdx/libgdx/issues/3348/events","html_url":"https://github.com/libgdx/libgdx/issues/3348","id":100583012,"number":3348,"title":"Very bad frametimes","user":{"login":"Teiby1","id":617859,"avatar_url":"https://avatars.githubusercontent.com/u/617859?v=3","gravatar_id":"","url":"https://api.github.com/users/Teiby1","html_url":"https://github.com/Teiby1","followers_url":"https://api.github.com/users/Teiby1/followers","following_url":"https://api.github.com/users/Teiby1/following{/other_user}","gists_url":"https://api.github.com/users/Teiby1/gists{/gist_id}","starred_url":"https://api.github.com/users/Teiby1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Teiby1/subscriptions","organizations_url":"https://api.github.com/users/Teiby1/orgs","repos_url":"https://api.github.com/users/Teiby1/repos","events_url":"https://api.github.com/users/Teiby1/events{/privacy}","received_events_url":"https://api.github.com/users/Teiby1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-08-12T16:30:56Z","updated_at":"2015-08-13T08:11:38Z","closed_at":"2015-08-12T17:02:18Z","body":"I have found out that any game that was made in libgdx has some \"Micro stuttering\".\r\nSo I have made a simple game to measure the time between frames and it has a lot of lag spikes.\r\nI have tested it on Android (Nexus 7) and Windows with activated vsync (so each frame should be at exact 16.67ms but it's often 30ms or 5ms).\r\n\r\nThe game and the function that calculates the frametime can be found here:\r\nhttps://github.com/Teiby1/frametimetest/blob/master/core/src/de/teiby/frametimetest/FrametimeTest.java\r\nIt sums up all frametimes in a second that are not exact 16.67ms. On Android I get about 30ms-100ms and on Windows 1ms-10ms (fullscreen) and 10ms-50ms (windowed).\r\nOn both devices 60 FPS but it's not really smooth.\r\n\r\nUse WASD or touch/mouse to move the square (but doesn't really affect the frametime).\r\n\r\nAlso here a logcat output when a frame took more or less than 4ms:\r\nhttps://github.com/Teiby1/frametimetest/blob/master/android_measure.txt\r\n\r\nYou should run this testgame on a device that has a 60Hz monitor."},"comment":{"url":"https://api.github.com/repos/libgdx/libgdx/issues/comments/130570740","html_url":"https://github.com/libgdx/libgdx/issues/3348#issuecomment-130570740","issue_url":"https://api.github.com/repos/libgdx/libgdx/issues/3348","id":130570740,"user":{"login":"gj12","id":8588565,"avatar_url":"https://avatars.githubusercontent.com/u/8588565?v=3","gravatar_id":"","url":"https://api.github.com/users/gj12","html_url":"https://github.com/gj12","followers_url":"https://api.github.com/users/gj12/followers","following_url":"https://api.github.com/users/gj12/following{/other_user}","gists_url":"https://api.github.com/users/gj12/gists{/gist_id}","starred_url":"https://api.github.com/users/gj12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gj12/subscriptions","organizations_url":"https://api.github.com/users/gj12/orgs","repos_url":"https://api.github.com/users/gj12/repos","events_url":"https://api.github.com/users/gj12/events{/privacy}","received_events_url":"https://api.github.com/users/gj12/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T08:11:38Z","updated_at":"2015-08-13T08:11:38Z","body":"I suggest, that you read some articles about game/render loops etc.:\r\neg. http://obviam.net/index.php/the-android-game-loop/\r\nYou can find example code for libgdx on github and the forum"}}