Thanks to X_MEN I modded some of his code for the jumping. So flamers you can't say I didn't say where I got some code from!
`Basic Jumping Demo
`Programmed By: **Name Erased**
`Version: 1.0 - Bulit in Graphics
`Declare variables used
`variables for cords
xpos = 100
ypos = 350
`Setup the framerate and window
`Intalize the window setup
set window on
set window title "Basic Jumping Demo - DBC - **Insert Your Name Here**"
set window layout 1,1,1
set window position 100,200
set window size 640,480
`Configurate the framerate
sync on
sync rate 30
`Hide the mouse pointer
hide mouse
`Start a new loop
do
`Clear screen so no flicker
cls
`Disable the escape key
disable escapekey
`You can show the pointer by clicking
`This is to avoid frustration to our player
if mouseclick() = 1 or mouseclick() = 2 then show mouse
`You can hide it again by pressing the enterkey
if returnkey() = 1 then hide mouse
`Draw the main character a green circle
ink rgb(0,255,0),1
circle xpos,ypos-jumping,10
`Configurate controls
if leftkey() = 1 then xpos = xpos - 7
if rightkey() = 1 then xpos = xpos + 7
`Jumping
if spacekey()=1 and jumping=0 then jump=1
if jump=1 then jumping=jumping+20
if jump=0 and jumping>0 then jumping=jumping-20
if jumping>60 then jump=0
if spacekey() = 0 then jump = 0
if rightkey() = 1 and jump = 1 then xpos = xpos + 4
if leftkey() = 1 and jump = 1 then xpos = xpos - 4
`Collision
if xpos <= 1 then xpos = xpos + 7
`Refresh the screen
sync
loop
Visit My Pointless Blog http://programmersblogjonman.blogspot.com/
Upcoming Software: Phoenix RPG Creation Kit Release Date: February 2006 Using: DarkBASIC Classic