ok it was my code,sorry for that,lots of errors in there, i have fixed it now and basically was after this:
rem
rem AGK Application
rem
rem Landscape App
SetDisplayAspect( 4.0/3.0 )
`SetVirtualResolution( 320, 240 )
dim m$[60]
#constant PHYS_NONE 0
#constant PHYS_STATIC 1
#constant PHYS_DYNAMIC 2
#constant PHYS_KINEMATIC 3
global walls = 1
global xgap=8
global ygap=4
global wSpr=1
walls = loadimage("walls.png")
gosub level1
create_level()
do
Sync()
loop
level1:
m$[0] = "333333333333"
m$[1] = "300000000003"
m$[2] = "300000000003"
m$[3] = "300000000003"
m$[4] = "333333333333"
m$[5] = "300000000001"
m$[6] = "300000000003"
m$[7] = "300000000003"
m$[8] = "300000000003"
m$[9] = "300000000003"
m$[10] = "300000000003"
m$[11] = "300000100003"
m$[12] = "300000100003"
m$[13] = "300000100003"
m$[14] = "300000100003"
m$[15] = "300000100003"
m$[16] = "300000100003"
m$[17] = "300000100003"
m$[18] = "300001100003"
m$[19] = "300001100003"
m$[20] = "300001100003"
m$[20] = "300001100003"
m$[21] = "333333333333"
m$[22] = "300000000003"
m$[23] = "300001000003"
m$[24] = "333333333333"
return
function create_level()
DeleteAllSprites()
wx = 0: wy = 0: loc = 0
for row = 0 to 27
for seg = 1 to 12
select mid(m$[loc], seg, 1)
case "1":
inc wSpr
CreateSprite(wSpr, walls)
setspriteshape(wSpr,2)
SetSpritePosition(wSpr, wx, wy)
setspritesize(wSpr,8,4)
`SetSpriteOffset(wSpr, 0, 0 )
setSpritePhysicsOn(wSpr,PHYS_DYNAMIC)
xgap=8
ygap=4
endcase
case "2":
inc wSpr
CreateSprite(wSpr, walls)
setspriteshape(wSpr,1)
SetSpritePosition(wSpr, wx, wy)
setspritesize(wSpr,24,4)
xgap = 24
ygap = 4
`SetSpriteOffset(wSpr, 0, 0 )
setSpritePhysicsOn(wSpr,PHYS_STATIC)
endcase
case "3":
inc wSpr
xgap=8
ygap=4
CreateSprite(wSpr, walls)
setspriteshape(wSpr,2)
SetSpritePosition(wSpr, wx, wy)
setspritesize(wSpr,8,4)
`SetSpriteOffset(wSpr, 0, 0 )
setSpritePhysicsOn(wSpr,PHYS_STATIC)
endcase
endselect
inc wx, xgap
next seg
inc loc
inc wy, ygap
wx = 0
next row
endfunction
I am posting it here to hope it at leasts helps other N00bz like myself
! And thanks Marl, I really should know better about using vars instead of numerics, sometimes I am simply too damned lazy for my own good
Hail to the king, baby!