hiya! Javascript has a function named setInterval (https://developer.mozilla.org/en-US/docs/Web/API/Window/setInterval) which lets you set a function to be called at some arbitrary regular time increment! I then used that to make a tick loop to move things around every couple milliseconds!
oh yea Ik you'd use setInterval to write JS timer function, I mean how did you write for the dropping food anywhere on the page so one of your fishes flips itself and goes eat it part?
hiya! Javascript has a function named setInterval (https://developer.mozilla.org/en-US/docs/Web/API/Window/setInterval) which lets you set a function to be called at some arbitrary regular time increment! I then used that to make a tick loop to move things around every couple milliseconds!
oh yea Ik you'd use setInterval to write JS timer function, I mean how did you write for the dropping food anywhere on the page so one of your fishes flips itself and goes eat it part?