korlibs / korlibs/korge

Jittering and skipped(?) frames

Open
#1,505 3 comments 0 reactions 0 assignees View on GitHub
waiting for response
Dominant language
Kotlin
Stars
3k
Forks
148
Avg merge
13h 44m
Merged PRs (30d)
1

Description

Hello! In our dynamic scenes, I can see some korge render jittering and skipped(?) frames issues, even with simple cases. I can't see this happening on Android (Pixel 6 Pro), but we're experiencing that on JVM and native targets for Windows.
I reproduced the issue both on `4.0.0-beta` and `v4.0.0-alpha-6`.

Here's a slightly modified hello-world sample to make korge logo rotate:
```
class MyScene : Scene() {
override suspend fun SContainer.sceneMain() {
val image = image(resourcesVfs["korge.png"].readBitmap()) {
anchor(.5, .5)
scale(0.5)
position(256, 256)
}

addUpdater {
image.rotation = image.rotation + 3f.degrees
}
}
}
```

Here's a screen capture (you can see some jittering each second or so):

https://user-images.githubusercontent.com/3989453/229559424-978f5a7f-7352-4d2b-a8a0-8929b59a7dc8.mp4

Here's a slow-motion part of it:

https://user-images.githubusercontent.com/3989453/229559493-1b594064-aa8e-45e3-adc0-ddbb6615995b.mp4

And here's a slow-motion camera capture:

https://user-images.githubusercontent.com/3989453/229558904-9d870334-0361-4edc-82ec-6687ba66a0b9.mp4

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the rotating-logo reproduction in the issue body and compare its behavior on JVM and native Windows targets against Android. Trace the rendering or frame-timing entry points involved in the sample; done means the rotation renders smoothly without the reported jitter or skipped frames.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
game-dev, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.