Well, I didn't feel like spending time to work out the random platform generator. So I just made a repeatable level. I'm just finishing the scrolling window and collision. I removed the animation frames for now, because DBpro is a bit slow with text commands, and the FPS dropped exponentially. So I'm stiking with 1 frame for now.
sync on
sync rate 150
backdrop on
color backdrop rgb(0,0,0)
rem Init animation frame multipliers and mods
PlayerXMul=8
PlayerYMul=15
PlayerXMod=200
PlayerYMod=500
PlayerVelocity=15
zoommod = 5
rem world variables
WorldStartX=1
WorldXMul=8
WorldYMul=15
WorldEndX=68
WorldXMod=200
WorldYMod=500
rem dimension animation$ to hold our bunny animations
rem each frame is 6 characters wide (X)
rem 4 characters tall (Y)
rem and there are 9 total frames (z)
dim animation$(7,4)
rem dimension world string to hold our world info
rem the world display on the screen will be
rem 115 characters wide (X)
rem by 5 characters tall max (Y)
dim world$(115,5)
restore World
for y=1 to 5
for x=1 to 115
read a$
world$(x,y)=a$
next x
next y
rem fill the array with all the animation frames
rem (Skip element 0 in each dimension, I don't like using it)
restore BunnyFrames
for y=1 to 4
for x=1 to 7
read a$
animation$(x,y)=a$
next x
next y
do
rem get simple user input
if rightkey()
inc PlayerXMod, PlayerVelocity
endif
if leftkey()
dec PlayerXMod, PlayerVelocity
endif
if upkey()
dec PlayerYMod, PlayerVelocity
endif
if downkey()
inc PlayerYMod, PlayerVelocity
endif
rem it's time to draw our world
ink rgb(0,200,50),0
for y=1 to 5
for x=WorldStartX to WorldEndX
char$=world$(x,y)
if char$="V"
ink rgb(200,100,0),0
text (x*WorldXMul)+WorldXMod,(y*WorldYMul)+WorldYMod,char$
ink rgb(0,200,50),0
endif
if char$=" "
ink rgb(0,100,245),rgb(0,100,245)
text (x*WorldXMul)+WorldXMod,(y*WorldYMul)+WorldYMod,char$
ink rgb (0,200,50),0
endif
if char$<>" " and char$<>"V"
text (x*WorldXMul)+WorldXMod,(y*WorldYMul)+WorldYMod,char$
endif
next x
next y
rem draw BUNNY
ink rgb(255,0,255),0
for y=1 to 4
for x=1 to 7
a$=animation$(x,y)
text (x*PlayerXMul)+PlayerXMod,(y*PlayerYMul)+PlayerYMod, a$
next x
next y
sync
loop
rem prevent code from ever running into the data statements
end
BunnyFrames:
rem First Frame : Frame1
data " ","(","\","_","/",")"," "
data " ","(","O",".","o",")"," "
data "(",">","(","_",")","<",")"
data " ","(","^","|","^",")"," "
World:
rem 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111`112 113 114 115
data " "," "," "," "," "," "," "," "," "," "," "," ","_","_","_","_","_","_","_","_","_"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","_","_","_","_","_","_","_","_","@","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_","_"," "," "," "," "," "," "," "," "," "," "," "," "
data " "," "," "," "," "," "," ","_","_","_","_","|",".",".",".",".",".",".",".",".",".","|","_","_","_","_","@","_","_","_","_","_","_"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","_","_","_","_","_","_","_","_","_","_","_","_"," "," "," "," "," "," "," "," ","|",".",".",".",".",".",".",".",".","V",".",".",".",".",".",".",".",".",".",".",".",".",".",".",".",".",".","|"," "," "," "," "," "," "," "," "," "," "," "," "
data " "," "," "," "," "," ","|",".",".",".",".",".","[","]","[","]","[","]","[","]",".",".",".",".",".",".","V",".",".",".",".",".",".","|"," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," "," ","|",".",".",".",".",".",".",".",".",".",".",".",".","|"," "," "," "," "," "," "," ","|",".","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]",".","|"," "," "," "," "," "," "," "," "," "," "," "," "
data "_","_","_","_","_","_","|",".","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]",".","|","_","_","_","_","_","@","_","_","_","_","_","_","_","_","_","_","_","_","_","_","|",".","[","]","[","]","[","]","[","]","[","]",".","|","_","_","_","_","_","_","_","|",".","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]",".","|","_","_","_","_","_","_","_","_","_","_","_","_"
data ".",".",".",".",".",".",".",".","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]",".",".",".",".",".",".",".","V",".",".",".",".",".",".",".",".",".",".",".",".",".",".",".",".","[","]","[","]","[","]","[","]","[","]",".",".",".",".",".",".",".",".",".",".",".","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]","[","]",".",".",".",".",".",".",".",".",".",".",".",".",".","."