I wanted to make a kind of "fill the box" style game where you hold down to increase size of a ball that falls when you let go, end goal being covering a percentage of the screen.
Anyway, I wanted to attempt to make the engine myself for learning purposes (fiddle). However, using 9.8 as a global acceleration makes it feel like really low gravity.
So far, all of my movement is done via the function below. I feel like I'm missing something obvious, but just can't figure out why it seems more like moon gravity than Earth.
dt = new Date().getTime();
dt = (dt - lastFrame) / 1000;
for (var c in circles) {
circles[c].v.y += acceleration * dt;
if (circles[c].x + circles[c].v.x * dt > canvs.width || circles[c].x + circles[c].v.x * dt < 0) {
circles[c].v.x *= -1;
}
if (circles[c].y + circles[c].v.y * dt > canvs.height || circles[c].y + circles[c].v.y * dt < 0) {
circles[c].v.y *= -1;
}
circles[c].x += circles[c].v.x * dt;
circles[c].y += circles[c].v.y * dt;
}
lastFrame = new Date().getTime();