You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now JavaScript engines have boosted in performance, I was trying to get your prettytiles-gamejs implementation running with 30 fps and smooth scrolling. Unfortunately, it is not trivial. Do you have time to fix this?
I changed the fps to 30:
gamejs.time.fpsCallback(tick, this, 30);
I modified the increments a bit:
case gamejs.event.K_a:
ew_mv_size -= 8;
break;
case gamejs.event.K_d:
ew_mv_size += 8;
break;
case gamejs.event.K_w:
ns_mv_size += 4;
break;
case gamejs.event.K_s:
ns_mv_size -= 4;
break;
I tried to cast x_rnd and y_rnd to integers, but that is not enough. The animations still look jagged:
var x_part = xoff % 32;
var x_rnd = Math.floor(xoff/32);
var y_part = yoff % 16;
var y_rnd = Math.floor(yoff/16);
The text was updated successfully, but these errors were encountered:
thanks for reminding me of this old project :) I updated the code to run with the newest gamejs.
prettytiles now runs much better but this algorithm doesn't provide smooth scrolling. i can imagine one way to do it, would be to render the tiles into an offscreen canvas and copy the right subsection onto screen.
Now JavaScript engines have boosted in performance, I was trying to get your prettytiles-gamejs implementation running with 30 fps and smooth scrolling. Unfortunately, it is not trivial. Do you have time to fix this?
I changed the fps to 30:
I modified the increments a bit:
I tried to cast
x_rnd
andy_rnd
to integers, but that is not enough. The animations still look jagged:The text was updated successfully, but these errors were encountered: