ads-game:: performance settings

This commit is contained in:
Zeno Rogue 2022-09-18 13:34:30 +02:00
parent 62996d0d4c
commit 04c43e99e6
4 changed files with 15 additions and 2 deletions

View File

@ -145,6 +145,11 @@ auto shot_hooks =
param_f(fuel_particle_life, "ads_fuel_life")
-> editable(0, 5, 0.1, "fuel particle lifetime", "how long should the fuel particles live", 'L');
param_i(max_gen_per_frame, "ads_gen_per_frame")
-> editable(0, 100, 1, "tiles to generate per frame", "reduce if the framerate is low", 'G');
param_i(draw_per_frame, "ads_draw_per_frame")
-> editable(0, 3000, 0.1, "tiles to draw per frame", "reduce if the framerate is low", 'D');
rsrc_config();
});

View File

@ -178,7 +178,7 @@ void view_ads_game() {
hybrid::in_actual([&] {
plev = cgi.plevel; /* we are in another CGI so we have no access to that... */
gen_budget = 3;
gen_budget = max_gen_per_frame;
vctr = new_vctr;
vctrV = new_vctrV;
@ -233,7 +233,8 @@ void view_ads_game() {
int i = 0;
while(!dq.empty()) {
i++; if(i > 1000) break;
i++; if(i > draw_per_frame) break;
auto& p = dq.front();
cell *c = p.first;
ads_matrix V = p.second;

View File

@ -98,4 +98,7 @@ ld fuel_particle_life = .15;
cell *starting_point;
int max_gen_per_frame = 3;
int draw_per_frame = 1000;
}}

View File

@ -12,6 +12,10 @@ void edit_difficulty() {
add_edit(how_much_invincibility);
add_edit(rock_max_rapidity);
add_edit(rock_density);
dialog::addBreak(100);
add_edit(max_gen_per_frame);
add_edit(draw_per_frame);
dialog::addBreak(100);
edit_rsrc();