Quote: "I hit a section where there was no possible jump that I could reach."
Yes, unfortunately that is possible.
I tried to fix it but don't know how since I'm still
quite new to programming.
If anyone has an idea or knows how to fix that
please help.
*EDIT
Oh and here is uncompressed version:
Rem Project: Jumper
Rem Created: Friday, July 15, 2011
Rem ***** Main Source File *****
`Set display
set display mode 800,600,32
sync on : sync rate 60
autocam off
hide mouse
set ambient light 35
color backdrop 0
`Variables
score = 0
gameover = 0
speed# = 0
speedy# = -10
dim platforms(20)
dim stars(200)
JumpBonusTimer# = rnd(500)+200
stepy = 0
stepx = 0
`Make player
make object box 1,30,5,10
position object 1,0,0,500
color object 1,rgb(255,255,0)
`Make player body
make object box 5850,30,50,10
color object 5850,rgb(255,255,0)
`Make jump bonus
make object sphere 5851,20
color object 5851,rgb(0,200,0)
position object 5851,rnd(900)-450,400,500
`Make platforms
for x = 2 to array count(platforms())
make object box x,50,10,20
color object x,rgb(rnd(100)+100,rnd(100)+100,rnd(100)+100)
position object x,stepx,rnd(20)-50+stepy,500
inc stepy,50
stepx = rnd(720)-360
next x
`Make stars
for x = 41 to array count(stars())
make object sphere x,3
color object x,RGB(255,255,255)
position object x,rnd(1000)-500,rnd(800)-300,rnd(100)+500
next x
`¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
` MAIN LOOP
`¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
do
`Text
set text size 26
set text size 40 : set text font "impact" : ink rgb(217,224,21),0
center text 400,15,"Score : "+str$(score)
`Fake camera movement
if object position y(1) => 50 and speedy# <= 0
for x = 41 to array count(stars())
move object down x,speedy#*-0.3
next x
for x = 2 to array count(platforms())
move object down x,speedy#*-0.8
next x
move object down 1,speedy#*-0.8
if JumpBonusTimer# <= 0
move object down 5851,speedy#*-0.8
endif
endif
`Player movement
inc speedy#,0.2
if speedy# => 10 then speedy# = 10
speed# = speed#*0.93
move object down 1,speedy#
move object left 1,speed#
if leftkey() = 1 or mouseclick() = 1 then inc speed#,0.5
if rightkey() = 1 or mouseclick() = 2 then dec speed#,0.5
for x = 2 to array count(platforms())
if object collision (1,x) and speedy# => 0
speedy# = -7
endif
next x
`Player body movement
position object 5850,object position x(1),object position y(1)+25,object position z(1)
`Movement restrictions
if object position x(1) > 380
position object 1,380,object position y(1),500
endif
if object position x(1) < -380
position object 1,-380,object position y(1),500
endif
if object position x(5850) > 380
position object 5850,380,object position y(5850),500
endif
if object position x(5850) < -380
position object 5850,-380,object position y(5850),500
endif
`Platforms movement
for x = 2 to array count(platforms())
move object down x,1
if gameover = 0
if object position y(x) < -320
inc score,1
position object x,stepx,400,object position z(x)
endif
endif
stepx = rnd(720)-360
next x
`Stars movement
for x = 41 to array count(stars())
strcol = rnd(255)
move object down x,0.3
if gameover = 0
if object position y(x) < -350
position object x,rnd(1000)-500,rnd(100)+300,rnd(100)+500
endif
endif
next x
`BONUSES
`Jump bonus
dec JumpBonusTimer#,0.35
if JumpBonusTimer# <= 0
move object down 5851,2
endif
if object collision (5850,5851)
speedy# = -20
position object 5851,0,-500,0
endif
if object position y(5851) < -320
JumpBonusTimer# = rnd(500)+200
position object 5851,rnd(900)-450,400,500
endif
`Restart button
if spacekey() = 1
`reset variables
JumpBonusTimer# = rnd(500)+200
score = 0
gameover = 0
speed# = 0
speedy# = -10
stepy = 0
stepx = 0
`reposition player
position object 1,0,0,500
position object 5850,object position x(1),object position y(1)+25,object position z(1)
`reposition platforms
for x = 2 to array count (platforms())
position object x,stepx,rnd(20)-50+stepy,500
inc stepy,50
stepx = rnd(720)-360
next x
`reposition stars
for x = 41 to array count(stars())
position object x,rnd(1000)-500,rnd(800)-300,rnd(100)+500
next x
`Reset bonuses
position object 5851,rnd(900)-450,400,500
wait 100
endif
`Gameover
if object position y(1) =< -350 then gameover = 1
if gameover = 1
`platforms fall down
for x = 2 to array count(platforms())
move object down x,5
next x
`stars fall down
for x = 41 to array count(stars())
move object down x,4
next x
`bonuses fall down
if JumpBonusTimer# <= 0
move object down 5851,5
if object position y(5851) < -320
JumpBonusTimer# = 999999999999
endif
else
JumpBonusTimer# = 999999999999
endif
endif
sync
loop