
J'ai repris l'ancien code pour faire l'animation en mouvement, voilà.
Code : Tout sélectionner
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Created by threedslider 23/07/2022
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
InitSprite()
InitKeyboard()
OpenWindow(1, 0,0,800,600,"Complex cirlce in moving", #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(1),0,0,800,600,0,0,0)
SetFrameRate(30)
Repeat
ExamineKeyboard()
event = WindowEvent()
ClearScreen(RGB(255,200,0))
StartDrawing(ScreenOutput())
For x = 0 To 3600
move.f + 1/10000
If move >= 100.0
move = -move
EndIf
xpos.f = 100 *Cos(4*x+move/20)+move
ypos.f = 100 *Sin(4*x+move/20)+move
If s >= 0
If x <= 1800
Line( xpos*Cos(x)+400, ypos*Cos(x)+300, 1, 1, RGB(255, 0, 0) )
EndIf
EndIf
Next
StopDrawing()
Delay(1) : FlipBuffers()
Until event = #PB_Event_CloseWindow Or KeyboardPushed(#PB_Key_Escape)
End