TGC Codebase Backup



MOVING dot by PFS JGTJUH45

21st Feb 2006 13:02
Summary

MOVING dot Without any MEDIA at all!



Description

MOVING dot Without any MEDIA at all!



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    rem clear the screen
cls 

rem variables
step=15
xp=0
yp=0
xd=step
yd=step

do


	rem delete the old dot
	ink 0,0
   circle xp,yp,10
	xp=xp+xd
	yp=yp+yd

   rem bounce
   if xp>640 then xd=0-step
   if yp>480 then yd=0-step
   if xp<1   then xd=step
   if yp<1   then yd=step

	rem Set the ink to white and paper color to black 
	ink rgb(244,214,210),0

	rem Draw the circle
	circle xp,yp,10

	rem if you press left mouse button then exit from this loop
	if mouseclick()=1:exit:endif


loop