Ok, I made a post a few days ago about having problems with sprites/backgrounds. I figured out how to get the sprites working but now I am wanting to have a different background for my game. For some reason it will not load my background.
REM Project: bitTEST
REM Created: 3/5/2006 10:16:46 AM
REM
REM ***** Main Source File *****
REM
`bitmaps
LOAD IMAGE "Pongball.bmp", 1, 1
LOAD BITMAP "background.bmp",2
LOAD IMAGE "paddle.bmp",3,3
COPY BITMAP 2,0 `get the background to show???
SET CURRENT BITMAP 0
`Ball vertical and horizontal initial placement
ballX# = 300
ballY# = 200
`Ball x and y direction
DX# = .05
DY# = .05
`paddle direction
paddleX# = 0
paddleY# = 420
`draw starting sprites
sprite 1,ballX#, ballY#, 1
sprite 3,paddleX#, paddleY#,3
`game loop
do
SYNC
`cls
`pause the game
if inkey$() = "p"
wait key
wait 200
endif
SET CURRENT BITMAP 0
IF SPRITE HIT (3,1)
DY# = DY# * -1
sprite 1,ballX#, ballY#, 1
`DX# = DX# * -1
endif
`If x is pressed, move paddle right
IF INKEY$() = CHR$(120)
paddleX# = paddleX# + .2
sprite 3, paddleX#, paddleY#, 3
IF paddleX# > 605
paddleX# = paddleX#
sprite 3, 600, paddleY#, 3
endif
endif
`if z is pressed, move paddle left
IF INKEY$() = CHR$(122)
paddleX# = paddleX# - .2
sprite 3, paddleX#, paddleY#, 3
IF paddleX# < 10
paddleX# = paddleX#
sprite 3, 10, paddleY#,3
endif
endif
`Not sure if I need this next line yet
`PASTE IMAGE 2,0,0
`move the ball
ballX# = ballX# + DX#
ballY# = ballY# + DY#
`change direction of the ball if its greater than screensize
IF ballX# > 620
DX# = DX# * -1
endif
IF ballX# < 2
DX# = DX# * -1
endif
IF ballY# > 480
DY# = DY# * -1
endif
IF ballY# < 2
DY# = DY# * -1
endif
`update new sprite position
sprite 1,ballX#,ballY#,1
loop
Any help would be nice!