Problem with render tween
Blitz3D Forums/Blitz3D Programming/Problem with render tween
| ||
| Hi, I'm using the render tween method (Mark's "castle" demo) to limit the frame rate of my game. Well, the problem is that at some point I need to move a sprite from the left side of the screen (off screen) to the right side using the "PositionEntity" command. As the "RenderWorld tween#" command will render the screen at some state between the current state (my sprite positioned on the right side) and the "CaptureWorld" state (my sprite positioned on the left side) the sprite will blink in the middle of screen for a frame. How could I avoid that? PS: Sorry for my bad english. Thanks. Douglas Matoso |
| ||
| When you do that use RenderWorld(1) and it will happen instantly. |
| ||
| i get around it by setting a flag for a frame, and when the system is next captured, go through reseting the flags... The flag is used to hide an entity while it is moving :) |
| ||
| Hi, I found out that you can chage this code: For k = 1 To ticks
time = time + period
If k = ticks
CaptureWorld
EndIf
;Update your game
UpdateGame()
UpdateWorld
Nextfor this: For k = 1 To ticks
time = time + period
;Update your game
UpdateGame()
If k = ticks
CaptureWorld
EndIf
UpdateWorld
NextThe problem is solved. I hope there's no side effecs for doing this. Thanks! Douglas |
| ||
| Sideeffect would be that theres no point in using captureworld as youve already moved all your entities ;) sorry, Eric, thats no good :( |