@Sinister Yes it does. He'll be a little animated fellow!
@Nano
I like it! I changed the code just the slightest bit. I think it looks a bit cooler:
[Removed]
@Everyone
I updated the code, made it smoother feeling, added in the images that I thought weren't needed (up 2-3, down 2-3, left 2-3, right 2-3) and put in loading music.
Music Attached!
sync on
load music "Music/Jeopardy Theme.mp3",32
play music 32
rem Image List
rem 1 Ground Variation
rem 2 Ground Variation
rem 3 Ground Variation
rem 4 Ground Variation
rem 5 Ground Variation
rem 6 Ground Variation
rem 7 Ground Variation
rem 8 Ground Variation
rem 9 Ground Variation
rem 10 Ground Variation
rem 11 Ground Variation
rem 12 Ground Variation
rem 13 Ground Variation
rem 14 Ground Variation
rem 15 Ground Variation
rem 16 Gem Variation
rem 17 Gem Variation
rem 18 Gem Variation
rem 19 Gem Variation
rem 20 Gem Variation
rem 21 Gem Variation
rem 22 Rock Variation
rem 23 Rock Variation
rem 24 Rock Variation
rem 25 Rock Variation
rem 26 Rock Variation
rem 27 Rock Variation
rem 28 Rock Variation
rem 29 Rock Variation
rem 30 Wall Variation
rem 31 Wall Variation
rem 32 Wall Variation
rem 33 Player Down 1
rem 34 Player Down 2
rem 35 Player Down 3
rem 36 Player Up 1
rem 37 Player Up 2
rem 38 Player Up 3
rem 39 Player Right 1
rem 40 Player Right 2
rem 41 Player Right 3
rem 42 Player Left 1
rem 43 Player Left 2
rem 44 Player Left 3
rem ---------------------------------
rem Music List
rem 1 Boss
rem 2 Boss Rock
rem 3 Credits
rem 4 Theme A
rem 5 Theme B
rem Specify Array Size
gridwidth=400
gridheight=40
rem Make Array
dim grid(gridwidth+20,gridheight+20)
rem Specify rock peramiters
startvalue=50
maxvalue=100
minvalue=0
variation=50
if variation>abs(maxvalue-minvalue) then variation=abs(maxvalue-minvalue)
rem Fill Array
for x=1 to gridwidth+20
for y=1 to gridheight+20
grid(x,y)=startvalue
next y
next x
rem Make Random Points
for i=1 to (gridwidth+20)*(gridheight+20)/10
feild=abs(maxvalue-minvalue)
x=rnd(gridwidth)
y=rnd(gridheight)
value=rnd(feild)
grid(x,y)=value
next i
rem For Loops to Generate Texture
for x=1 to gridwidth+20
for y=1 to gridheight+20
rem Get surrounding pixels
otherpoints=0
totalofothers=0
if x>0
value=grid(x-1,y)
if value<>startvalue then otherpoints=otherpoints+1 : totalofothers=totalofothers+value
endif
if y>0
value=grid(x,y-1)
if value<>startvalue then otherpoints=otherpoints+1 : totalofothers=totalofothers+value
endif
if x<gridwidth
value=grid(x+1,y)
if value<>startvalue then otherpoints=otherpoints+1 : totalofothers=totalofothers+value
endif
if y<gridheight
value=grid(x,y+1)
if value<>startvalue then otherpoints=otherpoints+1 : totalofothers=totalofothers+value
endif
rem Get average of other points
if otherpoints>0
o#=otherpoints
t#=totalofothers
average#=t#/o#
else
average#=startvalue
endif
rem Assaing the point in the array based on the average plus a variation
gridvalue=average#+(rnd(variation)-(variation/2))
if gridvalue<minvalue then gridvalue=minvalue
if gridvalue>maxvalue then gridvalue=maxvalue
grid(x,y)=gridvalue
next y
next x
rem Soften Noise
for x=1 to gridwidth+20
for y=1 to gridheight+20
gv#=grid(x,y)
gv#=gv#+(maxvalue-gv#)/2
grid(x,y)=gv#
if grid(x,y)>maxvalue then grid(x,y)=maxvalue
next y
next x
cls
ink rgb(155,0,0),0
hide mouse
center text 320,140,"Loading..."
ink rgb(0,55,0),0
box 169,239,471,281
ink rgb(0,0,0),0
box 170,240,470,280
rem Set amount of noise
noise=0
ink rgb(255,255,255),0
RockBox(170,240,175,280,noise)
rem Ground
load image "Ground/ground01.png",1
RockBox(170,240,180,280,noise)
load image "Ground/ground02.png",2
RockBox(170,240,185,280,noise)
load image "Ground/ground03.png",3
RockBox(170,240,190,280,noise)
load image "Ground/ground04.png",4
RockBox(170,240,195,280,noise)
load image "Ground/ground05.png",5
RockBox(170,240,200,280,noise)
load image "Ground/ground06.png",6
RockBox(170,240,205,280,noise)
load image "Ground/ground07.png",7
RockBox(170,240,210,280,noise)
load image "Ground/ground08.png",8
RockBox(170,240,215,280,noise)
load image "Ground/ground09.png",9
RockBox(170,240,220,280,noise)
load image "Ground/ground10.png",10
RockBox(170,240,225,280,noise)
load image "Ground/ground11.png",11
RockBox(170,240,230,280,noise)
load image "Ground/ground12.png",12
RockBox(170,240,235,280,noise)
load image "Ground/ground13.png",13
RockBox(170,240,240,280,noise)
load image "Ground/ground14.png",14
RockBox(170,240,245,280,noise)
load image "Ground/ground15.png",15
rem Music
RockBox(170,240,255,280,noise)
load music "Music/Boss.mid",1
RockBox(170,240,255,280,noise)
load music "Music/Boss (Rock Version).mid",2
RockBox(170,240,265,280,noise)
load music "Music/credits.mid",3
RockBox(170,240,275,280,noise)
load music "Music/themeA.mid",4
RockBox(170,240,285,280,noise)
load music "Music/themeB.mid",5
RockBox(170,240,295,280,noise)
rem Gems
load image "Jems/jem1.png",16
RockBox(170,240,300,280,noise)
load image "Jems/jem2.png",17
RockBox(170,240,305,280,noise)
load image "Jems/jem3.png",18
RockBox(170,240,310,280,noise)
load image "Jems/jem4.png",19
RockBox(170,240,315,280,noise)
load image "Jems/jem5.png",20
RockBox(170,240,320,280,noise)
load image "Jems/jem6.png",21
RockBox(170,240,325,280,noise)
rem Rocks
load image "Rocks/rock1.png",22
RockBox(170,240,330,280,noise)
load image "Rocks/rock2.png",23
RockBox(170,240,335,280,noise)
load image "Rocks/rock3.png",24
RockBox(170,240,340,280,noise)
load image "Rocks/rock4.png",25
RockBox(170,240,345,280,noise)
load image "Rocks/rock5.png",26
RockBox(170,240,350,280,noise)
load image "Rocks/rock6.png",27
RockBox(170,240,355,280,noise)
load image "Rocks/rock7.png",28
RockBox(170,240,360,280,noise)
load image "Rocks/rock8.png",29
RockBox(170,240,370,280,noise)
rem Walls
load image "Walls/wall1.png",30
RockBox(170,240,375,280,noise)
load image "Walls/wall2.png",31
RockBox(170,240,380,280,noise)
load image "Walls/wall3.png",32
rem Player
load image "Player/down1.png",33
RockBox(170,240,385,280,noise)
load image "Player/down2.png",34
RockBox(170,240,390,280,noise)
load image "Player/down3.png",35
RockBox(170,240,400,280,noise)
load image "Player/up1.png",36
RockBox(170,240,410,280,noise)
load image "Player/up2.png",37
RockBox(170,240,415,280,noise)
load image "Player/up3.png",38
RockBox(170,240,420,280,noise)
load image "Player/right1.png",39
RockBox(170,240,430,280,noise)
load image "Player/right2.png",40
RockBox(170,240,440,280,noise)
load image "Player/right3.png",41
RockBox(170,240,450,280,noise)
load image "Player/left1.png",42
RockBox(170,240,460,280,noise)
load image "Player/left2.png",43
RockBox(170,240,470,280,noise)
load image "Player/left3.png",44
sync
wait 2800
stop music 32
delete music 32
end
function RockBox(x1,y1,x2,y2,noise)
rem Calculate Difference between corners
xdiff=x2-x1
ydiff=y2-y1
if noise>100 then noise=100
rem Draw Texture
for x=20 to xdiff+20
for y=20 to ydiff+20
rem Determine colour based on gridvalue()
gridvalue=grid(x,y)
gv#=gridvalue
if noise>0
multiply#=rnd(noise)+100-(noise/2)
multiply#=multiply#/100
else
multiply#=1
endif
rg#=gv#/100*90
ink rgb(rg#*1.2*multiply#,rg#*1.2*multiply#,gv#*1.2*multiply#),0
dot (x-20)+x1,(y-20)+y1
next y
next x
sync
endfunction
[EDIT 2]
OOPS! I forgot to finish the image list. Bear with me while I fix that...
[EDIT 3]
Problem Fixed. Code edited.
[EDIT4]
@Sinani
The Code you are supposed to test it with, and make it working with this code is:
randomize timer()
sync on:sync rate 0
REM Create an array
dim terrain(14,14)
REM Set the arrays random. This is only for the example, and will not be kept.
for y=0 to 13
for x=0 to 13
terrain(x,y)=rnd(3)
next x
next y
REM Make a box for the player.
ink rgb(255,0,0),0
box 0,0,32,32
REM Get the image.
get image 5,0,0,32,32
cls
REM Make a box for cleared ground.
ink rgb(155,155,155),0
box 0,0,32,32
REM Get the image.
get image 1,0,0,32,32
cls
REM Make a box for uncleared ground.
ink rgb(15,155,15),0
box 0,0,32,32
REM Get the image.
get image 2,0,0,32,32
cls
REM Make a box for stone
ink rgb(40,40,40),0
box 0,0,32,32
REM Get the image.
get image 3,0,0,32,32
cls
REM Make a box for gems
ink rgb(100,75,200),0
box 0,0,32,32
get image 4,0,0,32,32
cls
for i=1 to 5
sprite i,700,700,i
next i
REM Increasing the y so no sprites are overlapped. Mainly making it a 14x14 grid
for y=0 to 13
REM taking care of the 14 square row, while also pasting the sprites
for x=0 to 13
paste sprite terrain(x,y)+1,x*32,y*32
next x
next t
hide mouse
position mouse 500,240
sync
do:cls
checkBoulder:
REM FPS Display
center text 500,240," Screen Fps:"+str$(screen fps())+" "
REM FPS Display - remove from final
REM Set the ink to white
ink rgb(255,255,255),0
REM Show the Gems Collected:
center text 240,450," Gems Collected:"+str$(gemsc)
REM Make 'Barriers'.
line 0,448,448,448
line 448,448,448,0
redraw()
sync
REM =Control the player=
if upkey()=1 and py>0 and disable=0
REM Makes sure that there are no walls above the player
REM note that this if then must be contained in the previous one,
REM to stop getting an array bounds error when on the edges of the map
if terrain(px,py-1)<>2
if terrain(px,py-1)=3
inc gemsc
endif
REM Makes the previous position cleared
terrain(px,py)=0
dec py
disable=1
REM The new position is occupied by the player
terrain(px,py)=4
endif
endif
sync
if downkey()=1 and py<13 and disable=0
if terrain(px,py+1)<>2
if terrain(px,py+1)=3
inc gemsc
endif
terrain(px,py)=0
inc py
disable=1
terrain(px,py)=4
endif
endif
sync
if rightkey()=1 and px<13 and disable=0 and terrain(px+1,py)<>2
if terrain(px+1,py)=3
inc gemsc
endif
terrain(px,py)=0
inc px:disable=1
terrain(px,py)=4
ENDIF
sync
REM remstart
if leftkey()=1 and px>0 and disable=0
if terrain(px-1,py)<>2
if terrain(px-1,py)=3
inc gemsc
endif
terrain(px,py)=0
dec px
disable=1
terrain(px,py)=4
endif
endif
sync
center text 500,240," Screen Fps:"+str$(screen fps())+" "
REM FPS Display - remove from final
REM Handling timer to slow the player down.
if disable=1 then inc wait,1
if wait=8 then disable=0:wait=0
REM ---------------------------------------
if spacekey()=1 then exit
REM ^^^^^^^^^^^^^^ - remove from final
sync
loop
REM remend
REM |Main Loop|
REM Delete all sprites, and display them being deleted for effects.
REM cls
set text size 40
set text font "times new roman"
center text 220,130,"Gem Count:"+str$(gemsc)
center text 220,240,"You have "+str$(lives)+" lives left."
REM Shrinking and removing sprites.
for remove=1 to 196
if sprite exist(remove)
n=100
repeat
scale sprite remove,n
dec n,10
sync
until n=0
delete sprite remove
endif
sync
next remove
sync rate 30
REM |Delete all sprites, and display them being deleted for effects.|
wait key
REM |wait for a key press. - remove from final
end
function redraw()
for y=0 to 13
for x=0 to 13
REM Since the terrain array contains all info and the tile codes are 1 less
REM than there respective images, there is no point in using if-thens
paste sprite terrain(x,y)+1,(x)*32,(y)*32
next x
next t
endfunction
Try and get it so it can be in it's own area. As in
Rock Control:
return
And try and get it so all the arrays work.
[YET ANOTHER EDIT!!!]
I got the images working partially. I know the guy isn't animated. I'm working on him being able to move. I will have it ready soon.
And I know that what appears to be images isn't, what appears to be rock isn't, etc. I know what's wrong, and I'm fixing it. I just wanted to post an update for you guys.
[REMOVED]
[Unbelievably, another edit]
All right! I'm so happy. I accomplished more then I expected today, and it's looking awesome! I finished up the rock collision. (Which was tedious).
I had to change out all these different image numbers *wipes forehead*, and I put in a loading screen. Now, I bring you, with perfected rock detection, which allows you NOT TO MOVE onto rocks... and with gem detection, which increases the score...
randomize timer()
sync on:sync rate 0
REM Create an array
dim terrain(14,14)
REM Set the arrays random. This is only for the example, and will not be kept.
for y=0 to 13
for x=0 to 13
terrain(x,y)=rnd(28)+1
next x
next y
load music "Music/Jeopardy Theme.mp3",32
play music 32
rem Image List
rem 1 Ground Variation
rem 2 Ground Variation
rem 3 Ground Variation
rem 4 Ground Variation
rem 5 Ground Variation
rem 6 Ground Variation
rem 7 Ground Variation
rem 8 Ground Variation
rem 9 Ground Variation
rem 10 Ground Variation
rem 11 Ground Variation
rem 12 Ground Variation
rem 13 Ground Variation
rem 14 Ground Variation
rem 15 Ground Variation
rem 16 Gem Variation
rem 17 Gem Variation
rem 18 Gem Variation
rem 19 Gem Variation
rem 20 Gem Variation
rem 21 Gem Variation
rem 22 Rock Variation
rem 23 Rock Variation
rem 24 Rock Variation
rem 25 Rock Variation
rem 26 Rock Variation
rem 27 Rock Variation
rem 28 Rock Variation
rem 29 Rock Variation
rem 30 Wall Variation
rem 31 Wall Variation
rem 32 Wall Variation
rem 33 Player Down 1
rem 34 Player Down 2
rem 35 Player Down 3
rem 36 Player Up 1
rem 37 Player Up 2
rem 38 Player Up 3
rem 39 Player Right 1
rem 40 Player Right 2
rem 41 Player Right 3
rem 42 Player Left 1
rem 43 Player Left 2
rem 44 Player Left 3
rem ---------------------------------
rem Music List
rem 1 Boss
rem 2 Boss Rock
rem 3 Credits
rem 4 Theme A
rem 5 Theme B
rem Specify Array Size
gridwidth=400
gridheight=40
rem Make Array
dim grid(gridwidth+20,gridheight+20)
rem Specify rock peramiters
startvalue=50
maxvalue=100
minvalue=0
variation=50
if variation>abs(maxvalue-minvalue) then variation=abs(maxvalue-minvalue)
rem Fill Array
for x=1 to gridwidth+20
for y=1 to gridheight+20
grid(x,y)=startvalue
next y
next x
rem Make Random Points
for i=1 to (gridwidth+20)*(gridheight+20)/10
feild=abs(maxvalue-minvalue)
x=rnd(gridwidth)
y=rnd(gridheight)
value=rnd(feild)
grid(x,y)=value
next i
rem For Loops to Generate Texture
for x=1 to gridwidth+20
for y=1 to gridheight+20
rem Get surrounding pixels
otherpoints=0
totalofothers=0
if x>0
value=grid(x-1,y)
if value<>startvalue then otherpoints=otherpoints+1 : totalofothers=totalofothers+value
endif
if y>0
value=grid(x,y-1)
if value<>startvalue then otherpoints=otherpoints+1 : totalofothers=totalofothers+value
endif
if x<gridwidth
value=grid(x+1,y)
if value<>startvalue then otherpoints=otherpoints+1 : totalofothers=totalofothers+value
endif
if y<gridheight
value=grid(x,y+1)
if value<>startvalue then otherpoints=otherpoints+1 : totalofothers=totalofothers+value
endif
rem Get average of other points
if otherpoints>0
o#=otherpoints
t#=totalofothers
average#=t#/o#
else
average#=startvalue
endif
rem Assaing the point in the array based on the average plus a variation
gridvalue=average#+(rnd(variation)-(variation/2))
if gridvalue<minvalue then gridvalue=minvalue
if gridvalue>maxvalue then gridvalue=maxvalue
grid(x,y)=gridvalue
next y
next x
rem Soften Noise
for x=1 to gridwidth+20
for y=1 to gridheight+20
gv#=grid(x,y)
gv#=gv#+(maxvalue-gv#)/2
grid(x,y)=gv#
if grid(x,y)>maxvalue then grid(x,y)=maxvalue
next y
next x
cls
ink rgb(155,0,0),0
hide mouse
center text 320,140,"Loading..."
ink rgb(0,55,0),0
box 169,239,471,281
ink rgb(0,0,0),0
box 170,240,470,280
rem Set amount of noise
noise=0
ink rgb(255,255,255),0
RockBox(170,240,175,280,noise)
rem Ground
load image "Ground/ground01.png",1
RockBox(170,240,180,280,noise)
load image "Ground/ground02.png",2
RockBox(170,240,185,280,noise)
load image "Ground/ground03.png",3
RockBox(170,240,190,280,noise)
load image "Ground/ground04.png",4
RockBox(170,240,195,280,noise)
load image "Ground/ground05.png",5
RockBox(170,240,200,280,noise)
load image "Ground/ground06.png",6
RockBox(170,240,205,280,noise)
load image "Ground/ground07.png",7
RockBox(170,240,210,280,noise)
load image "Ground/ground08.png",8
RockBox(170,240,215,280,noise)
load image "Ground/ground09.png",9
RockBox(170,240,220,280,noise)
load image "Ground/ground10.png",10
RockBox(170,240,225,280,noise)
load image "Ground/ground11.png",11
RockBox(170,240,230,280,noise)
load image "Ground/ground12.png",12
RockBox(170,240,235,280,noise)
load image "Ground/ground13.png",13
RockBox(170,240,240,280,noise)
load image "Ground/ground14.png",14
RockBox(170,240,245,280,noise)
load image "Ground/ground15.png",15
rem Music
RockBox(170,240,255,280,noise)
load music "Music/Boss.mid",1
RockBox(170,240,255,280,noise)
load music "Music/Boss (Rock Version).mid",2
RockBox(170,240,265,280,noise)
load music "Music/credits.mid",3
RockBox(170,240,275,280,noise)
load music "Music/themeA.mid",4
RockBox(170,240,285,280,noise)
load music "Music/themeB.mid",5
RockBox(170,240,295,280,noise)
rem Gems
load image "Jems/jem1.png",16
RockBox(170,240,300,280,noise)
load image "Jems/jem2.png",17
RockBox(170,240,305,280,noise)
load image "Jems/jem3.png",18
RockBox(170,240,310,280,noise)
load image "Jems/jem4.png",19
RockBox(170,240,315,280,noise)
load image "Jems/jem5.png",20
RockBox(170,240,320,280,noise)
load image "Jems/jem6.png",21
RockBox(170,240,325,280,noise)
rem Rocks
load image "Rocks/rock1.png",22
RockBox(170,240,330,280,noise)
load image "Rocks/rock2.png",23
RockBox(170,240,335,280,noise)
load image "Rocks/rock3.png",24
RockBox(170,240,340,280,noise)
load image "Rocks/rock4.png",25
RockBox(170,240,345,280,noise)
load image "Rocks/rock5.png",26
RockBox(170,240,350,280,noise)
load image "Rocks/rock6.png",27
RockBox(170,240,355,280,noise)
load image "Rocks/rock7.png",28
RockBox(170,240,360,280,noise)
load image "Rocks/rock8.png",29
RockBox(170,240,370,280,noise)
rem Walls
load image "Walls/wall1.png",30
RockBox(170,240,375,280,noise)
load image "Walls/wall2.png",31
RockBox(170,240,380,280,noise)
load image "Walls/wall3.png",32
rem Player
load image "Player/down1.png",33
RockBox(170,240,385,280,noise)
load image "Player/down2.png",34
RockBox(170,240,390,280,noise)
load image "Player/down3.png",35
RockBox(170,240,400,280,noise)
load image "Player/up1.png",36
RockBox(170,240,410,280,noise)
load image "Player/up2.png",37
RockBox(170,240,415,280,noise)
load image "Player/up3.png",38
RockBox(170,240,420,280,noise)
load image "Player/right1.png",39
RockBox(170,240,430,280,noise)
load image "Player/right2.png",40
RockBox(170,240,440,280,noise)
load image "Player/right3.png",41
RockBox(170,240,450,280,noise)
load image "Player/left1.png",42
RockBox(170,240,460,280,noise)
load image "Player/left2.png",43
RockBox(170,240,470,280,noise)
load image "Player/left3.png",44
sync
`wait 2800
stop music 32
delete music 32
REM Increasing the y so no images are overlapped. Mainly making it a 14x14 grid
for y=0 to 13
REM taking care of the 14 square row, while also pasting the images
for x=0 to 13
paste image terrain(x,y),x*32,y*32
next x
next y
hide mouse
position mouse 500,240
sync
do:cls
checkBoulder:
REM FPS Display
center text 500,240," Screen Fps:"+str$(screen fps())+" "
REM FPS Display - remove from final
REM Set the ink to white
ink rgb(255,255,255),0
REM Show the Gems Collected:
center text 240,450," Gems Collected:"+str$(gemsc)
REM Make 'Barriers'.
line 0,448,448,448
line 448,448,448,0
redraw()
sync
REM =Control the player=
if upkey()=1 and py>0 and disable=0
REM Makes sure that there are no walls above the player
REM note that this if then must be contained in the previous one,
REM to stop getting an array bounds error when on the edges of the map
if terrain(px,py-1)<22 or terrain(px,py-1)>29
if terrain(px,py-1)>=16 and terrain(px,py-1)<=21
inc gemsc
endif
REM Makes the previous position cleared
terrain(px,py)=0
dec py
disable=1
REM The new position is occupied by the player
terrain(px,py)=400
endif
endif
sync
if downkey()=1 and py<13 and disable=0
if terrain(px,py+1)<22 or terrain(px,py+1)>29
if terrain(px,py+1)>=16 and terrain(px,py+1)<=21
inc gemsc
endif
terrain(px,py)=0
inc py
disable=1
terrain(px,py)=400
endif
endif
sync
if rightkey()=1 and px<13 and disable=0 and terrain(px+1,py)<22 or terrain(px+1,py)>29
if terrain(px+1,py)>16 and terrain(px+1,py)<=21
inc gemsc
endif
terrain(px,py)=0
inc px:disable=1
terrain(px,py)=400
ENDIF
sync
REM remstart
if leftkey()=1 and px>0 and disable=0
if terrain(px-1,py)<22 or terrain(px-1,py)>29
if terrain(px-1,py)>=16 and terrain(px-1,py)<=21
inc gemsc
endif
terrain(px,py)=0
dec px
disable=1
terrain(px,py)=400
endif
endif
sync
center text 500,240," Screen Fps:"+str$(screen fps())+" "
REM FPS Display - remove from final
REM Handling timer to slow the player down.
if disable=1 then inc wait,1
if wait=8 then disable=0:wait=0
REM ---------------------------------------
if spacekey()=1 then exit
REM ^^^^^^^^^^^^^^ - remove from final
sync
loop
REM |Main Loop|
REM Delete all images, and display them being deleted for effects.
`cls
set text size 40
set text font "times new roman"
center text 220,130,"Gem Count:"+str$(gemsc)
center text 220,240,"You have "+str$(lives)+" lives left."
for y=0 to 13*32 step 32
REM Removing Images
for x=0 to 13*32 step 32
for shrink#=1 to 32 step .5
ink rgb(0,0,0),0
box x,y,x+shrink#,y+shrink#
sync
next shrink
next x
next t
sync rate 30
REM |Delete all images, and display them being deleted for effects.|
wait key
REM |wait for a key press. - remove from final
end
function redraw()
for y=0 to 13
for x=0 to 13
REM Since the terrain array contains all info and the tile codes are 1 less
REM than there respective images, there is no point in using if-thens
if terrain(x,y)<>400 and terrain(x,y)>0 then paste image terrain(x,y),x*32,y*32
if terrain(x,y)=400 then paste image 35,x*32,y*32
if terrain(x,y)=0 then ink rgb(0,100,40),0:box x*32,y*32,x*32+31,y*32+31
next x
next t
endfunction
function RockBox(x1,y1,x2,y2,noise)
rem Calculate Difference between corners
xdiff=x2-x1
ydiff=y2-y1
if noise>100 then noise=100
rem Draw Texture
for x=20 to xdiff+20
for y=20 to ydiff+20
rem Determine colour based on gridvalue()
gridvalue=grid(x,y)
gv#=gridvalue
if noise>0
multiply#=rnd(noise)+100-(noise/2)
multiply#=multiply#/100
else
multiply#=1
endif
rg#=gv#/100*90
ink rgb(rg#*1.2*multiply#,rg#*1.2*multiply#,gv#*1.2*multiply#),0
dot (x-20)+x1,(y-20)+y1
next y
next x
sync
endfunction
I think we should call it by the miner's name.
Here's some ideas for the said miner's name:
Mitchell.
Donald.
Rickey.
Jared.
Barty.
----
I will now be working on the miner's movement. Then I will move on to coordinating in the menu + Music.
By the way, loving the images Sinister!
*Sighs*
I am content.
[EDIT INSTEAD OF DOUBLE POST]
I can't make out why this isn't working, and I don't have itme right now to fix it.
I want to make the anim run slower then it is, without slowing down the program.
load image "Player/down1.png",33
load image "Player/down2.png",34
load image "Player/down3.png",35
load image "Player/up1.png",36
load image "Player/up2.png",37
load image "Player/up3.png",38
load image "Player/right1.png",39
load image "Player/right2.png",40
load image "Player/right3.png",41
load image "Player/left1.png",42
load image "Player/left2.png",43
load image "Player/left3.png",44
r=1
do
gosub oya
if upkey()=1 then direct=3
if downkey()=1 then direct=4
if leftkey()=1 then direct=1
if rightkey()=1 then direct=2
loop
oya:
if ti1=0
if direct=2 and r=5
paste image 39,px,py
ti1=1
endif
if direct=2 and r=4
paste image 41,px,py
inc r,1
endif
if direct=2 and r=3
paste image 39,px,py
inc r,1
endif
if direct=2 and r=2
paste image 40,px,py
inc r,1
endif
if direct=2 and r=1
paste image 39,px,py
inc r,1
endif
if direct=1 and r=5
paste image 42,px,py
ti1=1
endif
if direct=1 and r=4
paste image 44,px,py
inc r,1
endif
if direct=1 and r=3
paste image 42,px,py
inc r,1
endif
if direct=1 and r=2
paste image 43,px,py
inc r,1
endif
if direct=1 and r=1
paste image 42,px,py
inc r,1
endif
if direct=3 and r=5
paste image 36,px,py
ti1=1
endif
if direct=3 and r=4
paste image 38,px,py
inc r,1
endif
if direct=3 and r=3
paste image 36,px,py
inc r,1
endif
if direct=3 and r=2
paste image 37,px,py
inc r,1
endif
if direct=3 and r=1
paste image 36,px,py
inc r,1
endif
if direct=4 and r=5
paste image 33,px,py
ti1=1
endif
if direct=4 and r=4
paste image 35,px,py
inc r,1
endif
if direct=4 and r=3
paste image 33,px,py
inc r,1
endif
if direct=4 and r=2
paste image 34,px,py
inc r,1
endif
if direct=4 and r=1
paste image 33,px,py
inc r,1
endif
endif
if ti1=0 then inc wa1
if wa1=5 then ti1=0:wa1=0
return

I curse in Binary.