@Zaxtor99
I think it's DBPro.
Sprites are possible to use in DBC as well - but performance wise they aren't as good as DBPro. A simple solution for your background image question is to load your jpg onto a memory or offscreen bitmap and then copy that to the main display. In Commodore 64 lingo, I believe that was called page flipping.
So load your image to a bitmap directly. In this case we'll use bitmap 1
load bitmap "myimage.jpg",1
rem put our focus back to bitmap 0 (the main display)
set current bitmap 0
rem main loop
do
copy bitmap 1,0
text 100,100,"Hello world"
loop
An alternative to this is loading your picture in as an image and pasting that to the main screen:
load image "myimage.jpg",1
rem main loop
do
paste image 1,0,0
text 100,100,"Hello World"
loop
Using offscreen bitmaps can be very useful. Here is a scrolling screen demo where bitmap 1 is used to create a scrolling background and the FPS are shown on the main display on top of that scrolling background. Because I keep copying the offscreen bitmap to bitmap 0, I don't have to manage the clearing of the screen because it is always refreshed with the new background image. This allows me to put whatever additional graphics I have on top without them getting messed up (smeared).
set display mode 800,600,32
sync on
sync rate 60
hide mouse
rem initialization routine
gosub _init
rem main loop
do
rem check the count to see if we've moved across the x of all the tiles
inc ct
if ct > 15
rem rescramble the random tiles
set current bitmap 1
for n=1 to 38
tiles(n)=rnd(15)+1
paste image tiles(n),scw-1,(n-1)*16
next n
ct=0
endif
rem shift bitmap 1 over by 1 pixel
copy bitmap 1,1,0,scw-1,sch-1,1,0,0,scw-2,sch-1
rem now copy bitmap 1 to bitmap 0
copy bitmap 1,0
set current bitmap 0
gosub _moving_text
sync
loop
`=================================================================
_init:
remstart
We'll use 1 background bitmap to create a scrolling screen.
On bitmap 0, the display bitmap, we'll place text over the
scrolling screen. We'll store a series of box images in an array
and paste them into a collumn on bitmap 1. We'll then scroll bitmap 1
by shifting the screen to the left. Once bitmap 1 is shifted, we'll copy
the contents to bitmap 0
remend
rem array
dim tiles(38)
rem create images
for n=1 to 16
c=255/n
cls rgb(c,c,c)
`ink rgb(255,0,0),0
`dot 0,0
`dot 15,0
get image n,0,0,16,16
sync
next n
cls 0
rem shuffle images in array
for n=1 to 38
tiles(n)=rnd(15)+1
next n
rem get screen dimensions
scw=screen width()
sch=screen height()
centerx=scw/2
centery=sch/2
rem counting variable
ct=-1
rem create a background bitmap to draw tiles on
`create bitmap 1,17,600
create bitmap 1,scw,sch
for y=0 to 37
paste image tiles(y+1),scw-1,y*16
next y
rem set text font and color
set text font "impact",1
set text size 48
sync
ink rgb(255,255,0),0
set current bitmap 0
return
`=================================================================
_moving_text:
inc ang
if ang >=360 then ang=0
x#=200*cos(ang)+centerx
y#=200*sin(ang)+centery
text x#,y#,"FPS = "+str$(screen fps())
return
Enjoy your day.