Posted: Thu Dec 02, 2021 8:24 am
Today was the "optimization" day
I implemented several optimization techniques in BoulderCaves+ split across three optimization levels. Depending on the hardware, it will allow to run the game smoothly even if normally it wouldn't do so.
First of all, I tried to determine how bad of a hardware you can actually allow yourself to have in order to run BoulderCaves+, hehe
I mean, there is, of course, a performance cost associated with running a game written in pure Python, so performance is kind of a critical thing when developing a game like that.
My experiments showed that the least you can allow yourself to have is something like a Raspberry Pi 4 (I tried a 4 GB model with no overclocking). A Pi 4 allows you to smoothly play standard-sized or slightly bigger caves without worrying about optimization, and can reliably play even large and busy caves with heavier optimization and/or while running under Pypy3 at least in 30 fps mode, but most caves even in 60 fps mode.
I tried going even lower than that, to a Raspberry Pi 3 (with a slight overclock) with 1 GB RAM, but basically any cave larger than 40x40 or maybe 50x50 or so is unplayable and the game grinds to a halt even in 30 FPS mode with heavy optimization enabled. Smaller and standard-sized caves play very well though on a Pi 3 even with very little or no optimization, and I played Boulder Dash I caves in 60 fps mode on a slightly OCed Pi 3 without a problem.
When it comes to desktops or laptops, basically anything that's not total trash that was made 5 years ago or later will allow to play pretty much any cave in BoulderCaves+ at least in 30 fps mode, but possibly in 60 fps mode as well, at least when running under Pypy3.
As for optimization levels, there will be four of them, and each subsequent one trades a little bit of visual accuracy for slightly more performance:
None - no optimization, everything is displayed and animated as it should, at the FPS specified during the game launch (if your PC can keep up, that is).
Light - slightly optimizes the reveal demos (usually the most CPU-intensive part of the game) by skipping every other frame of the reveal demo.
Medium - does everything that Light does, and on top of that will not scroll the playfield to the inbox, but instead just center the playfield immediately.
Heavy - does everything that Medium does, and on top of that doesn't play any object animations during the reveal demo.
I might introduce other optimizations to these levels later
Oh, and BoulderCaves+ now has its own, albeit simple for now, title screen. It's not much, but eh, I'll try to improve it later.

- Agetian
First of all, I tried to determine how bad of a hardware you can actually allow yourself to have in order to run BoulderCaves+, hehe
My experiments showed that the least you can allow yourself to have is something like a Raspberry Pi 4 (I tried a 4 GB model with no overclocking). A Pi 4 allows you to smoothly play standard-sized or slightly bigger caves without worrying about optimization, and can reliably play even large and busy caves with heavier optimization and/or while running under Pypy3 at least in 30 fps mode, but most caves even in 60 fps mode.
I tried going even lower than that, to a Raspberry Pi 3 (with a slight overclock) with 1 GB RAM, but basically any cave larger than 40x40 or maybe 50x50 or so is unplayable and the game grinds to a halt even in 30 FPS mode with heavy optimization enabled. Smaller and standard-sized caves play very well though on a Pi 3 even with very little or no optimization, and I played Boulder Dash I caves in 60 fps mode on a slightly OCed Pi 3 without a problem.
When it comes to desktops or laptops, basically anything that's not total trash that was made 5 years ago or later will allow to play pretty much any cave in BoulderCaves+ at least in 30 fps mode, but possibly in 60 fps mode as well, at least when running under Pypy3.
As for optimization levels, there will be four of them, and each subsequent one trades a little bit of visual accuracy for slightly more performance:
None - no optimization, everything is displayed and animated as it should, at the FPS specified during the game launch (if your PC can keep up, that is).
Light - slightly optimizes the reveal demos (usually the most CPU-intensive part of the game) by skipping every other frame of the reveal demo.
Medium - does everything that Light does, and on top of that will not scroll the playfield to the inbox, but instead just center the playfield immediately.
Heavy - does everything that Medium does, and on top of that doesn't play any object animations during the reveal demo.
I might introduce other optimizations to these levels later
Oh, and BoulderCaves+ now has its own, albeit simple for now, title screen. It's not much, but eh, I'll try to improve it later.

- Agetian


