laurcor55 / sailor-game

learning gosu
0 stars 0 forks source link

Better border behavior #3

Closed johnmgoodman closed 5 years ago

johnmgoodman commented 5 years ago

still have hardcoded borders but at least when it hits the borders it isnt too stupid

johnmgoodman commented 5 years ago

basically just made it so that when you hit a left or right edge it cancels the horizontal component of your velocity, and top or bottom edges zero the vertical component