The counter part of the World Builder program. A quick Demo of how the maps created with the World Builder program are used.
The Explore-able area is limited to roughly 16x16 for this quick demo. Still some slight hiccups with the layering effect.
Arrow Keys move the player
Space bar interacts with a few areas on screen.
I hope to include the addition of Interactive areas on the screen to be create-able within the World Builder program itself. but as for now they are hard coded in the World Explorer program and will show up even in other maps at the moment.
Sample Map included, but you can make one with the latest World Builder program, to try your own map you must simply change line 49 to the name of your map.
Deco
AS INTEGER 'decorations(trees\bushes\ect) Walkable
AS _BYTE 'can player walk on this tile?
CONST Key_Right
= 19712, Key_Left
= 19200, Key_Up
= 18432, Key_Down
= 20480 CONST Key_Space
= 32, Key_Enter
= 13 CONST Down
= 0, Left
= 1, Right
= 2, Up
= 3, InterAct
= 4
Layer
(1) = _NEWIMAGE(840, 640, 32) 'composite layer'Layer(2) = _LOADIMAGE("linear_tiles.bmp", 32) 'world tiles
'Layer(4) = _LOADIMAGE("Character3.bmp", 32) 'world tiles
MFI_Loader "WorldExplorer.MFI"
P.World_X = 0
P.World_Y = 0
P.Local_X = 32
P.Local_Y = 32
Load_it "take2"
Draw_World_Area
Moving%% = TRUE
P.Direction = Down
IF P.Local_Y
< 600 THEN P.Local_Y
= P.Local_Y
+ 1 IF Collision_World
THEN P.Local_Y
= P.Local_Y
- 1 Moving%% = TRUE
P.Direction = Left
IF P.Local_X
> 2 THEN P.Local_X
= P.Local_X
- 1 IF Collision_World
THEN P.Local_X
= P.Local_X
+ 1 Moving%% = TRUE
P.Direction = Right
IF P.Local_X
< 600 THEN P.Local_X
= P.Local_X
+ 1 IF Collision_World
THEN P.Local_X
= P.Local_X
- 1 Moving%% = TRUE
P.Direction = Up
IF P.Local_Y
> 2 THEN P.Local_Y
= P.Local_Y
- 1 IF Collision_World
THEN P.Local_Y
= P.Local_Y
+ 1 InterActions
P.Frame = 0
Moving%% = FALSE
IF Moving%%
THEN Animate_Character
Draw_Character 0, 0, P.Frame
ClearLayer Layer(1)
Frame%% = Frame%% + 1
IF Frame%%
= 15 THEN P.Frame
= P.Frame
+ 1: Frame%%
= 0 IF P.Frame
= 4 THEN P.Frame
= 0
Draw_Sprite X%%, Y%%, World(P.World_X + X%%, P.World_Y + Y%%).Id
IF World
(P.World_X
+ X%%
, P.World_Y
+ Y%%
).Deco
THEN Draw_Deco_Sprite X%%, Y%%, World(P.World_X + X%%, P.World_Y + Y%%).Deco, Layer(3)
IF World
(P.World_X
+ X%%
, P.World_Y
+ Y%%
).Lay3
THEN Draw_Deco_Sprite X%%, Y%%, World(P.World_X + X%%, P.World_Y + Y%%).Lay3, Layer(5)
SUB Draw_Sprite
(X%%
, Y%%
, id%
) _PUTIMAGE (X%%
* 32, Y%%
* 32), Layer
(2), Layer
(3), (0 + id%
* 32, 0)-STEP(31, 31)
SUB Draw_Deco_Sprite
(x%%
, y%%
, id%
, L&
) _PUTIMAGE (x%%
* 32, y%%
* 32), Layer
(2), L&
, (0 + id%
* 32, 0)-STEP(31, 31)
IF File$
= "" THEN File$
= "Defualt"
SUB Draw_Character
(x%%
, y%%
, id%
) _PUTIMAGE (P.Local_X
+ x%%
* 32, P.Local_Y
+ y%%
* 32), Layer
(4), Layer
(1), (0 + id%
* 32, 0 + 48 * P.Direction
)-STEP(30, 47)
Result%% = TRUE '-1 for no input
' IF _KEYDOWN(ESC_Key) THEN Result%% = ESC
Get_Input%% = Result%%
Result%% = TRUE
SELECT CASE P.Direction
'adjust collision detection point based on direction of travel Yo%% = 1
Yo%% = 1
Yo%% = 1
Yo%% = 1
IF World
(Tile
(P.Local_X
+ 16), Tile
(P.Local_Y
+ 0) + Yo%%
).Walkable
THEN Result%%
= FALSE
Collision_World = Result%%
Result% = value% \ 32
Tile = Result%
IF Tile
(P.Local_X
+ 16) = 1 AND Tile
(P.Local_Y
) - 1 + Yo%%
= 6 THEN 'sign post LINE (P.Local_X
+ 32, P.Local_Y
+ 16)-STEP(191, 40), _RGBA32(112, 32, 192, 144), BF
_PRINTSTRING (P.Local_X
+ 42, P.Local_Y
+ 26), "This is a sign post.", Layer
(1) IF Get_Input
<> TRUE
THEN ExitFlag%%
= TRUE
IF Tile
(P.Local_X
+ 16) = 1 AND Tile
(P.Local_Y
) - 1 + Yo%%
= 13 THEN 'Grave Stone LINE (P.Local_X
+ 32, P.Local_Y
+ 16)-STEP(191, 48), _RGBA32(112, 32, 192, 144), BF
_PRINTSTRING (P.Local_X
+ 42, P.Local_Y
+ 26), "Here lies: Cobalt", Layer
(1) _PRINTSTRING (P.Local_X
+ 42, P.Local_Y
+ 42), "33AE - 121AE", Layer
(1) IF Get_Input
<> TRUE
THEN ExitFlag%%
= TRUE
IF Tile
(P.Local_X
+ 16) = 7 AND Tile
(P.Local_Y
) - 1 + Yo%%
= 11 THEN 'Front door LINE (P.Local_X
+ 32, P.Local_Y
+ 16)-STEP(191, 48), _RGBA32(112, 32, 192, 144), BF
_PRINTSTRING (P.Local_X
+ 42, P.Local_Y
+ 26), "'Knock Knock...'", Layer
(1) _PRINTSTRING (P.Local_X
+ 42, P.Local_Y
+ 42), "There is no answer.", Layer
(1) IF Get_Input
<> TRUE
THEN ExitFlag%%
= TRUE
IF Tile
(P.Local_X
+ 16) = 6 AND Tile
(P.Local_Y
) - 1 + Yo%%
= 4 THEN 'Well LINE (P.Local_X
+ 32, P.Local_Y
+ 16)-STEP(191, 48), _RGBA32(112, 32, 192, 144), BF
_PRINTSTRING (P.Local_X
+ 42, P.Local_Y
+ 26), "It is a well.", Layer
(1) _PRINTSTRING (P.Local_X
+ 42, P.Local_Y
+ 42), "Wow it is deep!", Layer
(1) IF Get_Input
<> TRUE
THEN ExitFlag%%
= TRUE
GET #1, , c~%%
'retrieve number of files FOffset&(I~%%) = FOffset&(I~%%) + 1
Layer(2) = LoadGFX(FOffset(1), Size(1)) 'tiles
Layer(4) = LoadGFX(FOffset(2), Size(2)) 'characters