[Tutorial] [Blitz] Smooth Animation
Author |
Message |
shorthair

|
Posted: Mon Feb 16, 2004 10:14 pm Post subject: [Tutorial] [Blitz] Smooth Animation |
|
|
Shorthairs Help
This will help when you are animating something on your scren , what it does is draws somthing to het screen and then draw the next frame to memory and then switches , so Front buffer to Back buffer , and the process is repeted
code: |
Graphics 640,480
SetBuffer BackBuffer()
While Not KeyDown(1)
Flip
Cls
Line 100,200,320+100*Cos(a),240+100*Sin(a)
a=a+1
Wend
|
FLIP
is used to swap between the front and back buffer , this command tells the program to use hte next frame , It also refreshes your screen
This program draws a line from the center of the screen (100,200) at an angle of a degrees. we use sin and cos to get the angle |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
|
|