chrislo27 / PolyrhythmMania

A game that faithfully recreates the Polyrhythm minigame from Rhythm Tengoku (リズム天国), with a built-in level editor
https://polyrhythmmania.rhre.dev
GNU General Public License v3.0
246 stars 19 forks source link

[Bug]: Performance issues #55

Closed SushiiZ closed 1 year ago

SushiiZ commented 1 year ago

Version

v2.02

Operating System

Windows 11

Problem Description

Performance ingame is horrendous compared to v1.2.1, I used to play that version all the time and there were absolutely no performance issues, now it runs at around 13-20fps with slowdown making it almost impossible to play the game, not sure what changed but I also made sure that the game was using the correct graphics processor and it still won't run correctly (I tried it with intel but that wasn't good either), not sure what's up with the game.

Steps to Reproduce Problem

Boot up the game, go into library (or any other mode) then when you enter a level, it runs terribly. menus are fine

Relevant log output

==============
AUTO-GENERATED
==============

Program Specifications:
    Launch arguments: []
    Version: v2.0.2-20230512a
    Application type: Desktop
    LazySound loading enabled: true

System Specifications:
    Java Version: 11.0.15
    Java Vendor: Eclipse Adoptium
    Kotlin Version: 1.8.10
    OS Name: Windows 11
    OS Version: 10.0
    OS Arch: amd64
    SystemUtils.OSType: WINDOWS
    JVM memory available: 4151296 KiB

Graphics Specifications:
    Resolution: 1280x720
    Fullscreen: false
    GL_VENDOR: NVIDIA Corporation
    GL_RENDERER: NVIDIA GeForce GTX 1650 Ti/PCIe/SSE2
    GL_VERSION: 4.6.0 NVIDIA 535.98

00:00:01.842: [INFO][main] Initialized all 9 fonts in 0.0583 ms
00:00:02.055: [INFO][main] Using OpenAL sound system
00:00:02.330: [INFO][main] Setting recommended legacy audio JavaSound mixer to mixer from settings: Primary Sound Driver
00:00:02.540: [DEBUG][main] [GlobalStats] Statistics loaded
00:00:02.565: [DEBUG][main] [Achievements] Achievements loaded
00:00:02.710: [DEBUG][main] Changed screens from null to polyrhythmmania.init.AssetRegistryLoadingScreen
00:00:03.208: [DEBUG][main] DEBUG MONITORS: Primary=Generic PnP Monitor, current=Generic PnP Monitor, allMonitors=Generic PnP Monitor
00:00:03.898: [INFO][main] [DiscordRichPresence] Loaded successfully.
00:00:06.284: [INFO][GitHub version checker] Got version from server: v2.0.2
00:00:07.447: [INFO][main] Supported JavaSound mixer: Primary Sound Driver
00:00:07.448: [INFO][main] Supported JavaSound mixer: Speakers (FxSound Audio Enhancer)
00:00:07.449: [INFO][main] Supported JavaSound mixer: Speakers (Realtek(R) Audio)
00:00:07.638: [DEBUG][Main Menu music decoder] Starting main menu music decode
00:00:08.189: [DEBUG][main] [FrameBufferManager: WorldRenderer] Re-created 3 framebuffers to be backbuffer 1920x1080 (logical 1920x1080)
00:00:08.381: [DEBUG][main] Changed screens from polyrhythmmania.init.AssetRegistryLoadingScreen to paintbox.transition.TransitionScreen
00:00:08.590: [DEBUG][main] [FrameBufferManager: Main Menu tileflip] Re-created 2 framebuffers to be backbuffer 1920x1080 (logical 1920x1080)
00:00:08.606: [DEBUG][main] [FrameBufferManager: WorldRenderer] Re-created 3 framebuffers to be backbuffer 1920x1080 (logical 1920x1080)
00:00:09.091: [DEBUG][main] [GlobalStats] Statistics saved
00:00:09.095: [DEBUG][main] [Achievements] Achievements saved
00:00:09.096: [DEBUG][main] Changed screens from paintbox.transition.TransitionScreen to polyrhythmmania.screen.mainmenu.MainMenuScreen
00:00:09.110: [ERROR][main] [DiscordRichPresence] Handle reply error Error("unknown variant `unknown`, expected one of `offline`, `online`, `idle`, `dnd`", line: 0, column: 0)
00:00:12.155: [INFO][Library Search] Starting Library search in D:\Games\PolyRhythm mania\Levels
00:00:12.160: [INFO][Library Search] [Library Search] Possible files found: 31
00:00:12.562: [DEBUG][Main Menu music decoder] Finished main menu music decode
00:00:12.736: [INFO][Library Search] [Library Search] Levels read: 31 (took 577.3784 ms)
00:00:19.588: [DEBUG][main] Changed screens from polyrhythmmania.screen.mainmenu.MainMenuScreen to paintbox.transition.TransitionScreen
00:00:20.302: [DEBUG][main] [FrameBufferManager: WorldRenderer] Re-created 3 framebuffers to be backbuffer 1920x1080 (logical 1920x1080)
00:00:20.839: [DEBUG][main] Changed screens from paintbox.transition.TransitionScreen to polyrhythmmania.screen.play.regular.EnginePlayScreenBase
00:01:29.534: [DEBUG][main] Changed screens from polyrhythmmania.screen.play.regular.EnginePlayScreenBase to paintbox.transition.TransitionScreen
00:01:29.890: [DEBUG][main] [FrameBufferManager: WorldRenderer] Disposed of 3 framebuffers
00:01:30.033: [DEBUG][main] [GlobalStats] Statistics saved
00:01:30.034: [DEBUG][main] [Achievements] Achievements saved
00:01:30.035: [DEBUG][main] Changed screens from paintbox.transition.TransitionScreen to polyrhythmmania.screen.mainmenu.MainMenuScreen
00:01:33.912: [INFO][Library Search] Starting Library search in D:\Games\PolyRhythm mania\Levels
00:01:33.914: [INFO][Library Search] [Library Search] Possible files found: 31
00:01:34.024: [INFO][Library Search] [Library Search] Levels read: 31 (took 110.26009 ms)
00:01:38.186: [WARN][Thread-9] [Container] Unknown tilesetConfig.texturePack.stockID 'cascading_custom', skipping stock texture pack
00:01:48.995: [DEBUG][main] Changed screens from polyrhythmmania.screen.mainmenu.MainMenuScreen to paintbox.transition.TransitionScreen
00:01:49.032: [DEBUG][main] [FrameBufferManager: WorldRenderer] Re-created 3 framebuffers to be backbuffer 1920x1080 (logical 1920x1080)
00:01:49.353: [DEBUG][main] Changed screens from paintbox.transition.TransitionScreen to polyrhythmmania.screen.play.regular.EnginePlayScreenBase
00:02:33.706: [DEBUG][main] Changed screens from polyrhythmmania.screen.play.regular.EnginePlayScreenBase to paintbox.transition.TransitionScreen
00:02:34.085: [DEBUG][main] [FrameBufferManager: WorldRenderer] Disposed of 3 framebuffers
00:02:34.212: [DEBUG][main] [GlobalStats] Statistics saved
00:02:34.214: [DEBUG][main] [Achievements] Achievements saved
00:02:34.214: [DEBUG][main] Changed screens from paintbox.transition.TransitionScreen to polyrhythmmania.screen.mainmenu.MainMenuScreen
00:02:50.067: [INFO][main] Settings persisted
00:02:52.589: [DEBUG][StemLoader-0] Starting story music handler stem decode for story/music/title/full1.ogg
00:02:52.595: [DEBUG][StemLoader-1] Starting story music handler stem decode for story/music/title/perc1.ogg
00:02:52.604: [DEBUG][StemLoader-2] Starting story music handler stem decode for story/music/desktop/harm.ogg
00:02:52.615: [DEBUG][StemLoader-3] Starting story music handler stem decode for story/music/desktop/main.ogg
00:02:52.640: [DEBUG][main] Changed screens from polyrhythmmania.screen.mainmenu.MainMenuScreen to paintbox.transition.TransitionScreen
00:02:53.179: [DEBUG][main] Changed screens from paintbox.transition.TransitionScreen to polyrhythmmania.storymode.screen.StoryAssetsLoadingScreen
00:02:55.623: [DEBUG][StemLoader-0] Finished story music handler stem decode for story/music/title/full1.ogg - took 3027.1912 ms
00:02:55.623: [DEBUG][StemLoader-0] Starting story music handler stem decode for story/music/desktop/perc.ogg
00:02:55.768: [DEBUG][StemLoader-1] Finished story music handler stem decode for story/music/title/perc1.ogg - took 3171.5894 ms
00:02:55.855: [DEBUG][StemLoader-3] Finished story music handler stem decode for story/music/desktop/main.ogg - took 3238.248 ms
00:02:55.913: [DEBUG][StemLoader-2] Finished story music handler stem decode for story/music/desktop/harm.ogg - took 3306.94 ms
00:02:56.394: [INFO][main] No story mode savefile 1, treating as brand new
00:02:56.397: [INFO][main] No story mode savefile 2, treating as brand new
00:02:56.397: [INFO][main] No story mode savefile 3, treating as brand new
00:02:56.545: [DEBUG][main] Changed screens from polyrhythmmania.storymode.screen.StoryAssetsLoadingScreen to paintbox.transition.TransitionScreen
00:02:56.811: [DEBUG][StemLoader-0] Finished story music handler stem decode for story/music/desktop/perc.ogg - took 1186.5973 ms
00:02:57.160: [DEBUG][main] Changed screens from paintbox.transition.TransitionScreen to polyrhythmmania.storymode.screen.StoryTitleScreen
00:03:00.291: [DEBUG][main] Changed screens from polyrhythmmania.storymode.screen.StoryTitleScreen to paintbox.transition.TransitionScreen
00:03:04.130: [DEBUG][main] Changed screens from paintbox.transition.TransitionScreen to polyrhythmmania.storymode.screen.StoryDesktopScreen
00:03:14.658: [INFO][main] Starting dispose call
00:03:14.673: [INFO][main] Dispose call finished, goodbye!
00:03:14.678: [DEBUG][main] [GlobalStats] Statistics saved
00:03:14.679: [DEBUG][main] [Achievements] Achievements saved
00:03:15.426: [DEBUG][main] [FrameBufferManager: Main Menu tileflip] Disposed of 2 framebuffers
00:03:15.439: [DEBUG][main] [FrameBufferManager: WorldRenderer] Disposed of 3 framebuffers
java.nio.channels.ClosedChannelException
    at java.base/sun.nio.ch.FileChannelImpl.ensureOpen(Unknown Source)
    at java.base/sun.nio.ch.FileChannelImpl.position(Unknown Source)
    at java.base/sun.nio.ch.FileChannelImpl.position(Unknown Source)
    at polyrhythmmania.soundsystem.sample.MusicSample$Buffer.populate(MusicSample.kt:258)
    at polyrhythmmania.soundsystem.sample.MusicSample.getFrame(MusicSample.kt:81)
    at polyrhythmmania.soundsystem.sample.MusicSample.getFrameLinear(MusicSample.kt:119)
    at polyrhythmmania.soundsystem.sample.MusicSamplePlayer.calculateBuffer(MusicSamplePlayer.kt:88)
    at net.beadsproject.beads.core.UGen.update(UGen.java:459)
    at net.beadsproject.beads.core.UGen.pullInputs(UGen.java:402)
    at net.beadsproject.beads.core.UGen.update(UGen.java:455)
    at net.beadsproject.beads.core.UGen.pullInputs(UGen.java:425)
    at net.beadsproject.beads.core.UGen.update(UGen.java:455)
    at net.beadsproject.beads.ugens.CrossFade.calculateBuffer(CrossFade.java:103)
    at net.beadsproject.beads.core.UGen.update(UGen.java:459)
    at net.beadsproject.beads.core.UGen.pullInputs(UGen.java:402)
    at net.beadsproject.beads.core.UGen.update(UGen.java:455)
    at net.beadsproject.beads.core.AudioContext.update(AudioContext.java:231)
    at net.beadsproject.beads.core.AudioIO.update(AudioIO.java:61)
    at polyrhythmmania.soundsystem.beads.OpenALAudioIO.prepareLineBuffer(OpenALAudioIO.kt:106)
    at polyrhythmmania.soundsystem.beads.OpenALAudioIO.runRealTime$primeBuffer(OpenALAudioIO.kt:89)
    at polyrhythmmania.soundsystem.beads.OpenALAudioIO.runRealTime(OpenALAudioIO.kt:94)
    at polyrhythmmania.soundsystem.beads.OpenALAudioIO.access$runRealTime(OpenALAudioIO.kt:32)
    at polyrhythmmania.soundsystem.beads.OpenALAudioIO$start$1.invoke(OpenALAudioIO.kt:137)
    at polyrhythmmania.soundsystem.beads.OpenALAudioIO$start$1.invoke(OpenALAudioIO.kt:136)
    at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

(Optional) Other useful information

here's a 1.2.1 log, for comparison

============== AUTO-GENERATED

Program Specifications: Launch arguments: [] Version: v1.2.1-20220502a Application type: Desktop LazySound loading enabled: true

System Specifications: Java Version: 11.0.15 Java Vendor: Eclipse Adoptium Kotlin Version: 1.6.21 OS Name: Windows 11 OS Version: 10.0 OS Arch: amd64 SystemUtils.OSType: WINDOWS JVM memory available: 4151296 KiB

Graphics Specifications: Resolution: 1280x720 Fullscreen: false GL_VENDOR: Intel GL_RENDERER: Intel(R) UHD Graphics GL_VERSION: 4.6.0 - Build 27.20.100.8280

00:00:01.226: [INFO][main] Initialized all 9 fonts in 0.0409 ms 00:00:01.329: [INFO][main] Using OpenAL sound system 00:00:01.454: [INFO][main] Setting recommended legacy audio JavaSound mixer to mixer from settings: Primary Sound Driver 00:00:01.538: [DEBUG][main] [GlobalStats] Statistics loaded 00:00:01.562: [DEBUG][main] [Achievements] Achievements loaded 00:00:01.612: [DEBUG][main] Changed screens from null to polyrhythmmania.init.AssetRegistryLoadingScreen 00:00:02.088: [DEBUG][main] DEBUG MONITORS: Primary=Generic PnP Monitor, current=Generic PnP Monitor, allMonitors=Generic PnP Monitor 00:00:02.348: [INFO][main] [DiscordRichPresence] Loaded successfully. 00:00:03.672: [INFO][GitHub version checker] Got version from server: v1.2.1 00:00:04.082: [INFO][main] Supported JavaSound mixer: Primary Sound Driver 00:00:04.083: [INFO][main] Supported JavaSound mixer: Speakers (Realtek(R) Audio) 00:00:04.195: [DEBUG][Main Menu music decoder] Starting main menu music decode 00:00:04.211: [DEBUG][main] Updated main menu framebuffers to be backbuffer 1920x1080 (logical 1920x1080) 00:00:04.507: [DEBUG][OpenALAudioIO] Did AL_DIRECT_CHANNELS_SOFT fix for OpenALAudioDevice. This will be removed with libGDX 1.10.1 00:00:04.547: [DEBUG][main] Changed screens from polyrhythmmania.init.AssetRegistryLoadingScreen to paintbox.transition.TransitionScreen 00:00:04.971: [DEBUG][main] [GlobalStats] Statistics saved 00:00:04.973: [DEBUG][main] [Achievements] Achievements saved 00:00:04.973: [DEBUG][main] Changed screens from paintbox.transition.TransitionScreen to polyrhythmmania.screen.mainmenu.MainMenuScreen 00:00:05.161: [ERROR][main] [[DiscordRichPresence]] Handle reply error Error("unknown variant unknown, expected one of offline, online, idle, dnd", line: 0, column: 0) 00:00:06.358: [DEBUG][Main Menu music decoder] Finished main menu music decode 00:00:12.293: [INFO][Library Search] Starting Library search in D:\Games\PolyRhythm mania\Levels 00:00:12.295: [INFO][Library Search] [Library Search] Possible files found: 31 00:00:13.128: [INFO][Library Search] [Library Search] Levels read: 31 (took 833.23126 ms) 00:00:19.963: [DEBUG][main] Changed screens from polyrhythmmania.screen.mainmenu.MainMenuScreen to paintbox.transition.TransitionScreen 00:00:20.324: [DEBUG][OpenALAudioIO] Did AL_DIRECT_CHANNELS_SOFT fix for OpenALAudioDevice. This will be removed with libGDX 1.10.1 00:00:20.775: [DEBUG][main] Changed screens from paintbox.transition.TransitionScreen to polyrhythmmania.screen.play.PlayScreen 00:00:31.771: [INFO][main] Starting dispose call 00:00:31.777: [INFO][main] Dispose call finished, goodbye! 00:00:31.783: [DEBUG][main] [GlobalStats] Statistics saved 00:00:31.784: [DEBUG][main] [Achievements] Achievements saved

chrislo27 commented 1 year ago

There are no rendering changes other than with spotlights so I can't think of anything off the top of my head.

Generally it's really hard to help with hardware problems as it is so specific for each person. Does the performance still drop if you play on v1.2.1?

SushiiZ commented 1 year ago

nah it runs fine when doing 1.2.1, within like a 10 minute span from the old version to the new one it did that drastic change in performance, are there any new default settings that might have caused it to not run as well?

chrislo27 commented 1 year ago

There are no new graphical settings that impact performance. You can try disabling Vertical Sync if it's enabled to rule that out.

If your main system drive is full, that could impact performance as game music is streamed from there.

chrislo27 commented 1 year ago

I am closing this issue as I don't have information to help debug the issue further. If you are able to resolve the problem on your own, please reply to this thread