Sorry but very new.
I'm slowly building my first ever game, have bats and ball and can move bats but I can't get the ball to move.
REM /// set display mode and sync rate
set display mode 800,600,32
hide mouse
REM /// Draw box then snach to create image.
box 200,200,240,300
get image 1,200,200,240,300
box 10,10,520,20
get image 2,10,10,520,20
filledcircle(50,50,10)
get image 3,40,40,60,60
sync on
`This will turn on the background
backdrop on
`This will give you black bacground
color backdrop rgb(0,0,0)
do
REM /// pad
sprite 1, 150,250 + pad_x,1
sprite 2, 650,250 + pad_y,1
REM /// Walls
sprite 3, 160,140,2
sprite 4, 160,450,2
REM /// Ball
Sprite 5, ball_x,ball_y,3
REM /// ball movement
ball_x=400
ball_y=300
speed_x=1
speed_y=0
ball_x = ball_x + speed_x
ball_y = ball_y + speed_y
REM /// Input for pads
if upkey()=1 and pad_x>-100 then pad_x = pad_x - 1
if downkey()=1 and pad_x<100 then pad_x = pad_x + 1
sync
loop
function filledcircle(x,y,r)
for count=1 to r
box x-count,y-sqrt((r^2)-(count^2)),x+count,y+sqrt((r^2)-(count^2))
next count
endfunction
I thought that ball_x = ball_x + speed_x is in the loop so ball_x should continue to increase.
Can anyone tell me what I'm doing wrong.
HeadlessJB