I have a dude about the fact that he put inside the for loop the updateTime variable of the nebulas when it needs to be independent for each nebula (in the video he has put both to 0, even the three). At least it cant never be 0
Hi Igloar311,
Looks like this was an oversight by Stephen. Looking at values from previous lectures the value for updateTime should be 1.0/12.0
. Though, having updateTime at 0 does not badly effect the game. It just sets the frame rate of the nebula animation to the frame rate of our game, which maxes out at 60fps.
But this means that every 0 seconds the frame animation is going to change to the next frame instantly, and it needs to wait some time to change the frame because then the animation looks so fast i think.
What that actually means in practical terms is that each iteration of our game the animation moves to the next frame. And we’ve capped the number of iterations to 60 per second. So the animation plays at 60 frames per second.
But you’re right, it probably doesn’t look correct. Which is why I mentioned it was likely a bug/oversight and the correct value should be 1/12, which is 12 frames per second.
Ok thanks for resolving my doubt, i was thinking that i dont understood some explication or something
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.