You are browsing as a guest. Sign up (or log in) to start making projects!

Terrarium

  • 2 Devlogs
  • 9 Total hours

A site where you can watch creatures interact with each other and influence their environment.

Open comments for this post

1h 44m 16s logged

Worked on getting the creatures to store mouse movements. The goal of this is that they receive information on clicks, drags, and mouse speed. Originally, the code updated original mouse positions to new mouse positions only when the mouse moved, but this proved to be an issue because when the mouse stopped moving, the speed would stay the same. This was fixed by updating the previous mouse positions to the current mouse positions at the end of the mouse speed functions. This means that whenever the function checks again, it will see that the mouse position is the same as before, instead of comparing the current mouse position to the position the last time the mouse moved.

0
0
3
Open comments for this post

7h 9m 49s logged

Worked on positioning and sizing the creatures responsively and having them all visible no matter the screen size. Originally the sizing system changed the width and height individually, but I realized that when I replace the green squares with images the images could look stretched out if the user only changes one dimension of the screen, so I fixed that by basing both scaling systems on the smallest dimension. Then I faced an issue with overlapping boxes. At first, I thought this had to do with the sizing math, but realized that this was more of an issue with collisions.

0
0
1

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…