Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support lower hardware specs #43

Closed
fmang opened this issue Dec 19, 2017 · 2 comments
Closed

Support lower hardware specs #43

fmang opened this issue Dec 19, 2017 · 2 comments
Assignees
Milestone

Comments

@fmang
Copy link
Owner

fmang commented Dec 19, 2017

Today, I've tried to play oshu! on my Raspberry Pi 2. The first try was a disaster, but tweaking the right settings made the game playable.

  1. Accelerated graphics are a lie. By forcing the software renderer in the SDL_Renderer, the performance got much better. Maybe it has to do with my X configuration, or maybe fbturbo isn't meant for that.
  2. The default window size is also a significant factor. The common textures are generated when the game start, taking into account the window size at that time. Starting with a smaller screen will generate smaller textures. Alternatively, an environment variable could control the texture quality disregarding the window size. At 640×480 the game got playable, even though it skipped frames.
  3. The background is currently loaded at full resolution. By scaling it at load time before converting it to a texture, we'd save a lot of video memory, and accelerate the background drawing process by a big factor.
  4. The SDL_HINT_RENDER_SCALE_QUALITY is set to linear, which is pretty expensive. Supporting the nearest algorithm would increase the performance by a large factor, and if the window is not resized, the textures will appear smoothly at 1:1 scale.
  5. If the worst come to worst, decrease the frame rate. I'd rather avoid that, it's like admitting defeat.
@lanodan
Copy link
Contributor

lanodan commented Dec 21, 2017

Accelerated Graphics are a lie

I think it should be named GPU/Hardware graphics, it’s basically made on the assumption that the GPU is faster than CPU… (and there can be a lot of case where the CPU is faster…)

@fmang
Copy link
Owner Author

fmang commented Dec 30, 2017

I've done what I could with the new OSHU_QUALITY environment variable. It's not perfect, but it's about playable.

Going further will require profiling and patience, but that's for a future issue.

@fmang fmang closed this as completed Dec 30, 2017
@fmang fmang added this to the 1.6 milestone Feb 5, 2018
@fmang fmang self-assigned this Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants