Grasp of the Fallen
Grasp of the Fallen / Engines /

Map

Updated: 6/15/2004

Tile size - 64 x 64

Resolution - 800 x 600 or 1024 x 768

World Map

Realistic scale (menu has a look at map feature)
Map allows viewing of only the areas you’ve been to

Tilemap
linked list for each tile

a random map generator for some secret / treasure area of game

level editor
tools
• draw
o click draw current tile
o drag draw current tile
o alt eraser
o ctrl drag to draw a grid
o shift constrain grid
• eraser
o click delete current tile
o drag delete current tile
o alt null
o ctrl erase a grid
o shift constrain
• select
o click select current tile
o drag move current tile
o alt null
o ctrl draw a grid
o shift constrain
• fill
o click fill with current tile
o drag null
o alt null
o ctrl null
o shift null
o
• flip
o click vertical flip
o drag vertical flip
o alt horizontal flip
o ctrl flip a grid
o shift constrain
buttons
• new
o ask before closing current project
o ask to keep current imported files
• open
o ask before closing current project
• save
o prompt for filename
• import
o sprites or tiles?
• undo
o restore previous map export data
o history - every command makes a copy of the scene
• redo
o restore future map export data


windows
all windows are moveable (some resizable)
• main director movie shows more of stage (never stretch movie)
• window launcher (ala Dreamweaver)
• tools
o close
• map w/ scrollbars + resize
• tileset w/ scrollbars + resize
o enlarge current tile in window
• library w/ scrollbars + resize
o import button ( map, spriteTileset, mapTileset )
o remove button
o open button (opens a tileset window)
• tile animation
o set tiles - range
o set speed
o randomize order?
o apply button
o preview button

• status bar
o display file size / tool options / project filename

• properties
o mapData[ , ][#tile:tileLocation, #type:#ground, #layer:#1, #animation:#none]
o


tile sizes
16 x 16
32 x 32
64 x 64
128 x 128
256 x 256
512 x 512
1024 x 1024


 

Map File format

-- header
-- mapName
-- mapSizeH in tiles
-- mapSizeV in tiles
-- tilesetList
-- eventList
-- spriteData
-- animationData

 

Director Collision Script

property mySprite
property xSide
property ySide

on getPropertyDescriptionList
description = [:]
addProp description,#xSide, [#default:"", #format:#string, #comment:"Horizontal Direction that diagonal faces", range:[#none,#left,#right]]
addProp description,#ySide, [#default:"", #format:#string, #comment:"Vertical Direction that diagonal faces:", range:[#none,#top,#bottom]]
return description
end

on new me
mySprite = sprite(me.spriteNum)
return me
end

on cameraMove me, theAmount, theDirection
if theDirection = #panLeft then mySprite.locH = mySprite.locH + theAmount
if theDirection = #panRight then mySprite.locH = mySprite.locH - theAmount
if theDirection = #panUp then mySprite.locV = mySprite.locV + theAmount
if theDirection = #panDown then mySprite.locV = mySprite.locV - theAmount
end

on goLeft me, character, speed, cameraAction, distanceFromEdge
cl = character.left
cr = character.right
ct = character.top
cb = character.bottom
ml = mySprite.left
mr = mySprite.right
mt = mySprite.top
mb = mySprite.bottom
if xSide = #none and cl - speed < mr and cr - speed > ml and ct < mb and cb > mt then return #stop

if ySide = #bottom then
if xSide = #right
and cl - speed < mr and cr - speed > ml and ct < mt and ct < mb and cb > mt then return "stop"
else if xSide = #right and cl - speed < mr and cr - speed > ml and ct < mb and cb > mt then
if keypressed(126) then return #stop
else
if (cl - ml) - (mb - ct) < speed then
if cl - speed < distanceFromEdge then sendAllSprites(#cameraMove, speed, #panDown)
else character.locV = character.locV + speed
end if
end if
end if
if xSide = #left and cr - speed > mr and cl - speed < mr and ct < mb and cb > mt then return #stop

else
-- goLeft top --
if xSide = #right and cl - speed < mr and cr - speed > ml and ct < mb and cb > mb and cb > mt then return #stop
else if xSide = #right and cl - speed < mr and cr - speed > ml and ct < mb and cb > mt then
if keypressed(125) then return #stop
else
if (cl - ml) - (cb - mt) < speed then
if cl - speed < distanceFromEdge then sendAllSprites(#cameraMove, speed, #panUp)
else character.locV = character.locV - speed
end if
end if
end if
if xSide = #left and cr - speed > mr and cl - speed <mr and ct < mb and cb > mt then return #stop
end if
end

on goRight me, character, speed, cameraAction, distanceFromEdge
cl = character.left
cr = character.right
ct = character.top
cb = character.bottom
ml = mySprite.left
mr = mySprite.right
mt = mySprite.top
mb = mySprite.bottom

if xSide = #none and cr + speed > ml and cl + speed < mr and cb > mt and ct < mb then return #stop

if ySide = #bottom then
if xSide = #right and cr + speed > ml and cl + speed < ml and ct < mb and cb > mt then return "stop"
if xSide = #left and cl + speed < mr and cr + speed > ml and ct < mb and ct < mt and cb > mt then return #stop
else if xSide = #left and cl + speed < mr and cr + speed > ml and ct < mb and cb > mt then
if keypressed(126) then return #stop
else
if (mr - cr) - (mb - ct) < speed then
sw = the stageright - the stageleft
if cr + speed > sw - distanceFromEdge then sendAllSprites(#cameraMove, speed, #panDown)
else character.locV = character.locV + speed
end if
end if
end if

else
-- goRight top --
if xSide = #right and cr + speed > ml and cl + speed < ml and character.top < mb and cb > mySprite.top then return #stop
if xSide = #left and cl + speed < mr and cr + speed > ml and ct < mb and cb > mb and cb > mt then return #stop
else if xSide = #left and cl + speed < mr and cr + speed > ml and ct < mb and cb > mt then
if keypressed(125) then return #stop
else
if (mr - cr) - (cb - mt) < speed then
sw = the stageright - the stageleft
if cr + speed > sw - distanceFromEdge then
sendAllSprites(#cameraMove, speed, #panUp)
else
character.locV = character.locV - speed
end if
end if
end if
end if
end if
end
on goDown me, character, speed, cameraAction, distanceFromEdge
cl = character.left
cr = character.right
ct = character.top
cb = character.bottom
ml = mySprite.left
mr = mySprite.right
mt = mySprite.top
mb = mySprite.bottom

if xSide = #none and cl < mr and cr > ml and cb + speed > mt and ct + speed < mb then return #stop

if ySide = #bottom then
if xSide = #left and cl < mr and cr > ml and ct + speed < mb and ct + speed < mt and cb + speed > mt then return #stop
if xSide = #right and cl < mr and cr > ml and ct + speed < mt and cb + speed > mt then return #stop

else
-- goDown top
if xSide = #right and cl < ml and cr > ml and cb + speed > mt and ct + speed < mb then return #stop
else if xSide = #right and cl < mr and cr > ml and ct + speed < mb and cb + speed > mt then
if keypressed(123) then return #stop
else
if (cl - ml) - (cb - mt) < speed then
sh = the stageBottom - the stageTop
if cb + speed > sh - distanceFromEdge then sendAllSprites(#cameraMove, speed, #panRight)
else character.locH = character.locH + speed
end if
end if
end if
if xSide = #left and cl < mr and cr > ml and ct + speed < mb and cb + speed > mt and cr > mr then return #stop
else if xSide = #left and cl < mr and cr > ml and ct + speed< mb and cb + speed > mt then
if keypressed(124) then return #stop
else
if mr - cr - cb - mt < speed then
sh = the stageBottom - the stageTop
if cb + speed > sh - distanceFromEdge then sendAllSprites(#cameraMove, speed, #panLeft)
else character.locH = character.locH - speed
end if
end if
end if
end if
end

on goUp me, character, speed, cameraAction, distanceFromEdge
cl = character.left
cr = character.right
ct = character.top
cb = character.bottom
ml = mySprite.left
mr = mySprite.right
mt = mySprite.top
mb = mySprite.bottom
if xSide = #none and cl < mr and cr > ml and ct - speed < mb and cb - speed > mt then return #stop

if ySide = #bottom then
if xSide = #right and cl < mr and cr > ml and cl < ml and ct - speed < mb and cb - speed > mt then return #stop
if xSide = #right and cl < mr and cr > ml and ct - speed < mb and cb - speed > mt then
if keypressed(123) then return #stop
else
if (cl - ml) - (mb - ct) < speed then
if ct - speed < distanceFromEdge then sendAllSprites(#cameraMove, speed, #panRight)
else character.locH = character.locH + speed
end if
end if
end if
if xSide = #left and cl < mr and cr > ml and ct - speed < mb and cr > mr and cb - speed > mt then return #stop
else if xSide = #left and cl < mr and cr > ml and ct - speed < mb and cb - speed > mt then
if keypressed(124) then return #stop
else
if (ct - mt) - (cr - ml) < speed then
if ct - speed < distanceFromEdge then sendAllSprites(#cameraMove, speed, #panLeft)
else character.locH = character.locH - speed
end if
end if
end if

else
-- goUp top
if xSide = #right and cl < mr and cr > ml and ct - speed < mb and cb > mb and cb - speed > mt then return #stop
if xSide = #left and cr > ml and cl < mr and ct - speed < mb and cb > mb and cb - speed > mt then return #stop
end if
end




©2004-2019 GraspoftheFallen.com - All Rights Reserved. An RPG game under development by Bruce Kirkpatrick | Jetendo CMS | Web Design | Have comments? Email Me