[Tuxletics-devel] Scrolling
Status: Alpha
Brought to you by:
teroajk
|
From: Petteri K. <pz...@us...> - 2004-11-05 19:32:29
|
Pist=E4n t=E4nne nyt noi viittaukset joista puhuin aikasemmin: http://www.pygame.org/docs/tut/newbieguide.html Most people new to graphics programming use the first option - they update the whole screen every frame. The problem is that this is unacceptably slow for most people. Calling update() takes 35 milliseconds on my machine, which doesn't sound like much, until you realize that 1000 / 35 = =3D 28 frames per second maximum. And that's with no game logic, no blits, no input, no AI, nothing. I'm just sitting there updating the screen, and 28 fps is my maximum framerate. Ugh. =2E... - think of a smooth-scrolling engine like an overhead real-time strategy game or a side-scroller. So what do you do in this case? Well, the short answer is - don't write this kind of game in pygame. The long answer is to scroll in steps of several pixels at a time; don't try to make scrolling perfectly smooth |