mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-23 06:20:09 +00:00
ads-game:: performance settings
This commit is contained in:
parent
62996d0d4c
commit
04c43e99e6
@ -145,6 +145,11 @@ auto shot_hooks =
|
|||||||
param_f(fuel_particle_life, "ads_fuel_life")
|
param_f(fuel_particle_life, "ads_fuel_life")
|
||||||
-> editable(0, 5, 0.1, "fuel particle lifetime", "how long should the fuel particles live", 'L');
|
-> 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();
|
rsrc_config();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ void view_ads_game() {
|
|||||||
|
|
||||||
hybrid::in_actual([&] {
|
hybrid::in_actual([&] {
|
||||||
plev = cgi.plevel; /* we are in another CGI so we have no access to that... */
|
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;
|
vctr = new_vctr;
|
||||||
vctrV = new_vctrV;
|
vctrV = new_vctrV;
|
||||||
@ -233,7 +233,8 @@ void view_ads_game() {
|
|||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while(!dq.empty()) {
|
while(!dq.empty()) {
|
||||||
i++; if(i > 1000) break;
|
|
||||||
|
i++; if(i > draw_per_frame) break;
|
||||||
auto& p = dq.front();
|
auto& p = dq.front();
|
||||||
cell *c = p.first;
|
cell *c = p.first;
|
||||||
ads_matrix V = p.second;
|
ads_matrix V = p.second;
|
||||||
|
@ -98,4 +98,7 @@ ld fuel_particle_life = .15;
|
|||||||
|
|
||||||
cell *starting_point;
|
cell *starting_point;
|
||||||
|
|
||||||
|
int max_gen_per_frame = 3;
|
||||||
|
int draw_per_frame = 1000;
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
@ -12,6 +12,10 @@ void edit_difficulty() {
|
|||||||
add_edit(how_much_invincibility);
|
add_edit(how_much_invincibility);
|
||||||
add_edit(rock_max_rapidity);
|
add_edit(rock_max_rapidity);
|
||||||
add_edit(rock_density);
|
add_edit(rock_density);
|
||||||
|
|
||||||
|
dialog::addBreak(100);
|
||||||
|
add_edit(max_gen_per_frame);
|
||||||
|
add_edit(draw_per_frame);
|
||||||
|
|
||||||
dialog::addBreak(100);
|
dialog::addBreak(100);
|
||||||
edit_rsrc();
|
edit_rsrc();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user