You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have actually thought about doing that. My decision at the time was that it was not worth it. Here is the rational.
The purpose of the game api is for early CS students. Because once you pass data structures, you will most likely find the restriction in sprite and number of cell annoying. And something like SDL or SFML, pygame, or whatever won't be too much to handle.
Delta timing is only helpful for games with some physics. This is probably over the level of a CS1 student, so I think the frame by frame approach is probably still the approach that we want.
That being said, my son is having fun with Unity these days. And the API for this pretty simple. The update function is called at every frame, but the engine exposes deltatime through the API. We could expose a function in nonblockinggame
protected float deltatime();
would that do what you need? Or were you thinking of this differently?
This came up as a discussing with regards to pong as it does involve some amount of physics. I agree with your initial logic, as the board resolution is prohibitive to a high variance the velocity of objects. The deltatime() function is fine. the only other approach I know of is having some publicly queryable member variable like super.deltaTime
https://en.wikipedia.org/wiki/Delta_timing
The text was updated successfully, but these errors were encountered: