[Jprogramming] Running a video game loop
mvillarino
mvillarino at gmail.com
Sat Aug 30 10:46:28 UTC 2014
> However, for a video game with any more than
> rudimentary complexity, one would wish to separate "frames" (drawing the
> image to the screen) from "ticks" (computing the game logic). Preferably,
> ticks would happen at a constant rate per second, and then the remaining
> computation time would be spent rendering frames.
> Of course, J is *much* different than Java in many respects. "While" loops
> are frowned upon in this situation, because functional languages get hung
> up in the while loop until it is "finished;" however, for video games this
> "hanging up" seems to be exactly what is needed (without the side effects
> of freezing the terminal, of course).
If you are interested in programming rudimentary complexity video
games in a purely functional style, maybe you would like to spend an
hour or so reading this blog: http://prog21.dadgum.com/37.html
If you are not, then spend a couple enjoyable days on it.
brgds, Marcelino
More information about the Programming
mailing list