tilde-os

tilde-os.neocities.org

29,562 views
16 followers
3,359 updates
0 tips
oh i saw you added my button! thanks! I added yours too!
oh btw if anyone adds my button to their site let me know! i'd be happy to add yours too :P
tilde-os updated their site.
1 day ago
updated my aquarium a bit! I noticed people seem to like it so i gave it some touch ups :3
1 like
Thanks for the follow! Nice site, I like your aquarium.
tilde-os's avatar tilde-os 3 days ago

thank you! i had fun making it :3

tilde-os updated their site.
1 week ago
uhm how did you develop your aquarium page? I like it
2 likes
tilde-os's avatar tilde-os 4 weeks ago

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!

1 like
devhank's avatar devhank 4 weeks ago

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?

1 like
tilde-os's avatar tilde-os 2 weeks ago

hiii sorry i missed your reply! So the way i handled it was like this: fish idle by randomly picking a point on the screen, and a duration to get there, then lerping to reach it. When you click on the screen, it registers the location that you clicked on (like the screen x and y), and constructs a Food object which is then put into an array

1 like
tilde-os's avatar tilde-os 2 weeks ago

When a fish goes to pick its new random point, if there is food in the array, then it pops the food off of the array, and sets *that* as its next point instead! Once it reaches the position, it deletes the food and goes back to idling!

1 like
devhank's avatar devhank 1 week ago

oh i get it tysm

2 likes

Website Stats

Last updated 22 hours ago
CreatedJul 4, 2023
Site Traffic Stats

Tags

art programming blog trans experimental