Darkbasic Pro doesn't work well with the "load bitmap" command. The best way is to use "load image"... that way you don't have to use "get image" which is a time saver if the entire image is what you want to "get".
With DBP evertime you create a sprite or just move an already existing sprite you have to replace the background because it considers all sprites as 3D objects. The best way to replace the background is with a "paste image" command. It doesn't matter where you paste it (before a sprite move or after) because sprites aren't effected by it.
I'll play with your code and post a Darkbasic Pro friendly version in a bit.
Added later:
Your code was fine but there was one thing that caused errors like crazy. Function names cannot have spaces... not even right before the ()'s.
When using "load image" always put another ",1" at the end. That tells Darkbasic to not anti-alias the image it loads. Anti-aliased images look horrible because they change based on where their at on the screen. The syntax: load image "filename",imagenumber,1
In the do loop I erased the copy bitmap and set current bitmap and replaced it with "paste image 1,0,0". The syntax: paste image imagenumber,x,y
I also changed the EndGame() function with a simple for next loop so you can easily change one number to delete more images rather than add another "delete image ##" line.
Hope this helps.
Here's the new code:
Remstart
Project: Frog-Art
Created by: Dangerous
***** Main Source File *****
Remend
InitGame()
GameLoop()
EndGame()
end
function InitGame()
set display mode 640,480,32
cls
sync on
hide mouse
position mouse 320,240
rem load background image
load image "Background.bmp",1,1
rem load sprites
load image "a.bmp",2,1
load image "b.bmp",3,1
load image "c.bmp",4,1
endfunction
function GameLoop()
do
paste image 1,0,0
X1 = mousex() - 50
Y1 = mousey()
X2 = mousex() + 50
Y2 = mousey()
FX = mousex()
FY = mousey()
DrawPlayer1(X1,Y1)
DrawPlayer2(X2,Y2)
DrawFrog(FX,FY)
sync
loop
endfunction
function DrawPlayer1(X,Y)
sprite 2,X,Y,2
endfunction
function DrawPlayer2(X,Y)
sprite 3,X,Y,3
endfunction
function DrawFrog(X,Y)
sprite 4,X,Y,4
endfunction
function EndGame()
for t=1 to 4
delete image t
next t
show mouse
endfunction