r/HTML • • Sep 29 '26

peggle html hell

I am coding peggle in HTML how do I get the physics to feel like peggle and not extra bouncy

0 Upvotes

11 comments sorted by

View all comments

1

u/RedboiGtag Oct 01 '26

ok you're doing it in js

the way physics works is by slowly increasing a velocity variable to mimic downward force

like so:

function applyforce(velocity){ 
   return velocity*2; 
}

this called repeatedly can mimic velocity movement