Deleted
Deleted Member
Posts: 0
|
Physics
Feb 27, 2009 20:35:33 GMT -5
Post by Deleted on Feb 27, 2009 20:35:33 GMT -5
Hi, something Physics.
Option Explicit Dim x,y,r,yvel,xvel,yacc
Sub Main() Graphics.Initialize 300,300,True,16 Key.Initialize Mouse.Initialize Graphics.SetTitle("Using Newton's laws") x = 20:y = 100:r = 10 yvel = -10.0:xvel = 10.0:yacc = .98
While Key.Pressed(vk_escape) = False Graphics.Clear yvel = yvel + yacc y = y + yvel x = x + xvel iF y > 289 Then yvel = -0.9 * yvel : y = 289 : xvel = xvel * 0.9 iF x > 285 Then xvel = -xvel: x = 285 iF x < 10 Then xvel = -xvel : x = 10 DrawBall() iF xvel * xvel < 0.0001 Then Exit Sub Graphics.Display Graphics.SetFPS 15 Wend
Graphics.Terminate Key.Terminate Mouse.Terminate End Sub
Call Main
Sub DrawBall() Graphics.SetCircle x, y, r,&HFF969696 Graphics.SetCircle x, y, r -2,&HFFc8c8c8 End Sub
|
|
|
Physics
Feb 27, 2009 22:23:05 GMT -5
Post by matthew on Feb 27, 2009 22:23:05 GMT -5
nice peter, maybe you should try creating a particle engine next or something similar
|
|
Deleted
Deleted Member
Posts: 0
|
Physics
Feb 28, 2009 6:28:57 GMT -5
Post by Deleted on Feb 28, 2009 6:28:57 GMT -5
Good idea Matthew, but Brutus2D has an particle Engine ! Do you like music ? Look in the "Helpful links for game creation" and listen the super song!
best regards.
|
|