Q: to those who use tweening with my shadow system

Blitz3D Forums/Blitz3D Programming/Q: to those who use tweening with my shadow system

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I use tweening with your shadow system and the two get along perfectly. I did initially have the same problem he describes, because my tweening loop was messed up, as you say, but that was easily solved.

My tween loop looks something like this :


; SETUP TWEENING
	
TWEEN_period=1000/TWEEN_TargetFPS
TWEEN_time=MilliSecs()-TWEEN_period

GameOver=0

Repeat

   ; DO TWEENING

   Repeat
      TWEEN_elapsed=MilliSecs()-TWEEN_time
   Until TWEEN_elapsed
	
   TWEEN_ticks=TWEEN_elapsed/TWEEN_period
   TWEEN_tween#=Float(TWEEN_elapsed Mod TWEEN_period)/Float(TWEEN_period)
	
   For TWEEN_k=1 To TWEEN_ticks

      TWEEN_time=TWEEN_time+TWEEN_period
      If TWEEN_k=TWEEN_ticks Then CaptureWorld  

      ; UPDATE GAME

      UpdateGame()

      UpdateWorld

   Next
   
   ; RENDER STUFF

   Update_Shadows(MainCamera)
   UpdateParticles

   RenderWorld TWEEN_tween#
   Flip
Until GameOver


I used this for Tennis Babes and I'm using it now for Bowling Babes. I don't see how it could possibly go wrong as long as the tweening loop is good ( and mine is perfect because I stole it from someone much cleverer than me ;) ) and Update_Shadows is only called outside of the for..next loop.