So... what do you think?
The simple physics are done. Beat it without using 'g', which i used for debugging. HINT: "1"!!!!
The physics work, so it treats every single box the same. It takes seconds to add in hundreds of more platforms using for...next.
It
definetly needs some work.
sync on
hide mouse
ink rgb(200,200,0),0
text 0,1,"*"
get image 100,0,0,10,20
cls
ink rgb(255,20,20),0
box 0,0,40,10
get image 65000,0,0,40,10
cls
ink rgb(20,20,20),0
box 0,0,50,50
get image 2,0,0,50,50
ink rgb(5,5,50),0
box 0,0,50,50
get image 4,0,0,50,50
cls
ink rgb(210,214,100),0
text x,y,"/"
get image 1,0,0,10,17
cls
x#=180
ink rgb(255,0,0),0
circle 320,240,5
circle 320,240,4
circle 320,241,3
center text 320,240,"||"
get image 3,310,230,330,250
sprite 4,460,240,4
sprite 2,180,240,2
ys65#=240
xs65#=320
do
cls
sprite 1,x#,y#,1
sprite 65000,xs65#,ys65#,65000
sprite 100,500,230,100
if air=1 and direct=0 then inc xs65#,.1
if air=0 and direct=0 then inc xs65#,1.5
if xs65#<=250 then direct=0
if direct=1 and air=1 then dec xs65#,.1
if direct=1 and air=0 then dec xs65#,1.5
if xs65#>=400 then direct=1
if sprite collision(1,100)>0
for r=1 to 65000
if sprite exist(r) then delete sprite r
next r
set text size 50:center text 320,240,"You got the star.":end
endif
if leftkey()=1 and air=0 then dec x#,2
if rightkey()=1 and air=0 then inc x#,2
if air=1 and leftkey()=1 then dec x#,.1
if air=1 and rightkey()=1 then inc x#,.1
if air=1 then sync rate 0:inc y#,.5 else sync rate 30
if sprite collision(1,0)=0
air=1
else
air=0
endif
if spacekey()=1 and air=0 and jump=0 then jump=1
if jump=1 then line 0,y#+10,640,y#+10:wait 2
if upkey()=1 and air=1 then jump_air=1
if inkey$()="g" then y#=40
if inkey$()="1" and used=0 then inc x#,20:dec y#,10:used=1
if hidden=1 and jump_air=1 and air=1 then show sprite 3
if jump_air=1 and air=1 then sprite 3,x#-5,y#+below,3
if jump_air=1 and air=1 then inc below,1
if below=400 then hide sprite 3:hidden=1:below=0:jump_air=0
if below=1 then dec y#,20:grab=1
if grab=1 then wait 40:dec y#,11:inc c,1
if c=10 then grab=0:c=0
if sprite collision(1,0)>1 and sprite exist(3) then hide sprite 3
sync
loop
The hard part is, you can't essentially jump.