loco-lab / hera-display-games

Games to be played on the HERA display
MIT License
0 stars 0 forks source link

improve collisions between sprites #9

Open adampbeardsley opened 4 years ago

adampbeardsley commented 4 years ago

ordering somehow matters right now

steven-murray commented 4 years ago

Yup -- there's a loop through a list of the sprites, and each sprite checks if any previous sprites are at the position it wants to move to, and then cancels the move if so. I'm not sure there's a better way to do it, though? I mean, what do you do if two sprites want to move to the same position on the same move?