Sampai disini kita baru menggunakan satu buah scene yang diambil dengan BLOAD, tapi dengan single scene tersebut, Marle bebas bergerak kemana saja dan akan berhenti kalau membentur pohon. Berikut programnya…

’Marle with Collission Detection using POINT
‘Addition: Check Border Screen Collission
‘ Loading Map using BLOAD from BSAVE File

CLEAR
DEFINT A-Z

CONST Path$ = “”

OPEN “tree.shp” FOR INPUT AS #1
DIM SHARED tree(222): FOR i = 0 TO 222: INPUT #1, tree(i): NEXT: CLOSE #1

‘Kumpulan Gambar Marle bergerak ke kanan
‘15 x 32
OPEN Path$ + “Marler.shp” FOR INPUT AS #1
DIM SHARED marler(266): FOR i = 0 TO 266: INPUT #1, marler(i): NEXT: CLOSE #1
‘17 x 32
OPEN Path$ + “Marler1.shp” FOR INPUT AS #1
DIM SHARED marler1(299): FOR i = 0 TO 299: INPUT #1, marler1(i): NEXT: CLOSE #1
‘18 x 30
OPEN Path$ + “Marler2.shp” FOR INPUT AS #1
DIM SHARED marler2(296): FOR i = 0 TO 296: INPUT #1, marler2(i): NEXT: CLOSE #1
‘18 x 32
OPEN Path$ + “Marler3.shp” FOR INPUT AS #1
DIM SHARED marler3(315): FOR i = 0 TO 315: INPUT #1, marler3(i): NEXT: CLOSE #1
‘17 x 32
OPEN Path$ + “Marler4.shp” FOR INPUT AS #1
DIM SHARED marler4(299): FOR i = 0 TO 299: INPUT #1, marler4(i): NEXT: CLOSE #1
‘18 x 31
OPEN Path$ + “Marler5.shp” FOR INPUT AS #1
DIM SHARED marler5(306): FOR i = 0 TO 306: INPUT #1, marler5(i): NEXT: CLOSE #1
‘19 x 32
OPEN Path$ + “Marler6.shp” FOR INPUT AS #1
DIM SHARED marler6(332): FOR i = 0 TO 332: INPUT #1, marler6(i): NEXT: CLOSE #1

‘Kumpulan Gambar Marle bergerak ke kiri
‘15 x 32
OPEN Path$ + “Marlel.shp” FOR INPUT AS #1
DIM SHARED marlel(266): FOR i = 0 TO 266: INPUT #1, marlel(i): NEXT: CLOSE #1
‘17 x 32
OPEN Path$ + “Marlel1.shp” FOR INPUT AS #1
DIM SHARED marlel1(299): FOR i = 0 TO 299: INPUT #1, marlel1(i): NEXT: CLOSE #1
‘18 x 30
OPEN Path$ + “Marlel2.shp” FOR INPUT AS #1
DIM SHARED marlel2(296): FOR i = 0 TO 296: INPUT #1, marlel2(i): NEXT: CLOSE #1
‘18 x 32
OPEN Path$ + “Marlel3.shp” FOR INPUT AS #1
DIM SHARED marlel3(315): FOR i = 0 TO 315: INPUT #1, marlel3(i): NEXT: CLOSE #1
‘17 x 32
OPEN Path$ + “Marlel4.shp” FOR INPUT AS #1
DIM SHARED marlel4(299): FOR i = 0 TO 299: INPUT #1, marlel4(i): NEXT: CLOSE #1
‘18 x 31
OPEN Path$ + “Marlel5.shp” FOR INPUT AS #1
DIM SHARED marlel5(306): FOR i = 0 TO 306: INPUT #1, marlel5(i): NEXT: CLOSE #1
‘19 x 32
OPEN Path$ + “Marlel6.shp” FOR INPUT AS #1
DIM SHARED marlel6(332): FOR i = 0 TO 332: INPUT #1, marlel6(i): NEXT: CLOSE #1

‘Kumpulan Gambar Marle bergerak ke bawah
‘13 x 33
OPEN Path$ + “Marled.shp” FOR INPUT AS #1
DIM SHARED marled(240): FOR i = 0 TO 240: INPUT #1, marled(i): NEXT: CLOSE #1
‘14 x 33
OPEN Path$ + “Marled1.shp” FOR INPUT AS #1
DIM SHARED marled1(257): FOR i = 0 TO 257: INPUT #1, marled1(i): NEXT: CLOSE #1
‘15 x 35
OPEN Path$ + “Marled2.shp” FOR INPUT AS #1
DIM SHARED marled2(290): FOR i = 0 TO 290: INPUT #1, marled2(i): NEXT: CLOSE #1
‘15 x 35
OPEN Path$ + “Marled3.shp” FOR INPUT AS #1
DIM SHARED marled3(290): FOR i = 0 TO 290: INPUT #1, marled3(i): NEXT: CLOSE #1
‘14 x 35
OPEN Path$ + “Marled4.shp” FOR INPUT AS #1
DIM SHARED marled4(257): FOR i = 0 TO 257: INPUT #1, marled4(i): NEXT: CLOSE #1
‘16 x 35
OPEN Path$ + “Marled5.shp” FOR INPUT AS #1
DIM SHARED marled5(308): FOR i = 0 TO 308: INPUT #1, marled5(i): NEXT: CLOSE #1
‘15 x 35
OPEN Path$ + “Marled6.shp” FOR INPUT AS #1
DIM SHARED marled6(290): FOR i = 0 TO 290: INPUT #1, marled6(i): NEXT: CLOSE #1

‘Kumpulan Gambar Marle bergerak ke atas
‘12 x 32
OPEN Path$ + “Marleu.shp” FOR INPUT AS #1
DIM SHARED marleu(216): FOR i = 0 TO 216: INPUT #1, marleu(i): NEXT: CLOSE #1
‘13 x 32
OPEN Path$ + “Marleu1.shp” FOR INPUT AS #1
DIM SHARED marleu1(233): FOR i = 0 TO 233: INPUT #1, marleu1(i): NEXT: CLOSE #1
‘16 x 33
OPEN Path$ + “Marleu2.shp” FOR INPUT AS #1
DIM SHARED marleu2(291): FOR i = 0 TO 291: INPUT #1, marleu2(i): NEXT: CLOSE #1
‘14 x 33
OPEN Path$ + “Marleu3.shp” FOR INPUT AS #1
DIM SHARED marleu3(257): FOR i = 0 TO 257: INPUT #1, marleu3(i): NEXT: CLOSE #1
‘13 x 32
OPEN Path$ + “Marleu4.shp” FOR INPUT AS #1
DIM SHARED marleu4(233): FOR i = 0 TO 233: INPUT #1, marleu4(i): NEXT: CLOSE #1
‘16 x 33
OPEN Path$ + “Marleu5.shp” FOR INPUT AS #1
DIM SHARED marleu5(291): FOR i = 0 TO 291: INPUT #1, marleu5(i): NEXT: CLOSE #1
‘14 x 33
OPEN Path$ + “Marleu6.shp” FOR INPUT AS #1
DIM SHARED marleu6(257): FOR i = 0 TO 257: INPUT #1, marleu6(i): NEXT: CLOSE #1

PRINT “Free array space : “; FRE(-1)
t$ = INPUT$(1)

SCREEN 13
CLS

‘Animasi berjalan
x.pos = 10: y.pos = 30
x.old = x.pos: y.old = y.pos
x.ofset = 4: y.ofset = 4
‘variabel posisi digunakan untuk mengecek posisi terakhir sprite
posisi = 1
‘variabel waktu tunda untuk animasi Marle berjalan
delay = 1700
bataskanan = 295
bataskiri = 10
batasbawah = 160
batasatas = 10
cek.selisih = 5
center.selisih = 5

GOSUB Scene1
PUT (x.pos, y.pos), marler

main:
x.center = x.pos + 10
y.center = y.pos + 15
a$ = INKEY$
IF a$ = “” THEN GOTO main
IF LEN(a$) <> 2 THEN GOSUB not.arrow
keyb = ASC(RIGHT$(a$, 1))
IF keyb = 72 THEN GOSUB atas
IF keyb = 75 THEN GOSUB kiri
IF keyb = 77 THEN GOSUB kanan
IF keyb = 80 THEN GOSUB bawah
‘clean the keyboard buffer before go back to main loop
DEF SEG = &H40
POKE &H1A, PEEK(&H1C)
GOTO main

kanan:
‘hapus spritenya
‘cek posisi terakhir sprite menghadap kemana???
oldx.pos = x.pos: oldy.pos = y.pos
SELECT CASE posisi
CASE 1 ‘kanan
PUT (oldx.pos, oldy.pos), marler
CASE 2 ‘kiri
PUT (oldx.pos, oldy.pos), marlel
CASE 3 ‘bawah
PUT (oldx.pos, oldy.pos), marled
CASE 4 ‘atas
PUT (oldx.pos, oldy.pos), marleu
END SELECT
IF POINT((marler1(0) / 8) + x.pos + cek.selisih, y.pos) <= 0 AND POINT((marler1(0) / 8) + x.pos + cek.selisih, y.center) <= 0 AND POINT((marler1(0) / 8) + x.pos + cek.selisih, marler1(1) + y.pos) <= 0 THEN
IF x.pos <= bataskanan THEN
x.pos = x.pos + x.ofset
ELSE
x.pos = bataskiri
END IF
ELSE
PUT (x.pos, y.pos), marler
posisi = 1
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marler1
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marler1
IF POINT((marler2(0) / 8) + x.pos + cek.selisih, y.pos + center.selisih) <= 0 AND POINT((marler2(0) / 8) + x.pos + cek.selisih, y.center) <= 0 AND POINT((marler2(0) / 8) + x.pos + cek.selisih, marler2(1) + y.pos – center.selisih) <= 0 THEN
IF x.pos <= bataskanan THEN
x.pos = x.pos + x.ofset
ELSE
x.pos = bataskiri
END IF
ELSE
PUT (x.pos, y.pos), marler
posisi = 1
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marler2
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marler2
IF POINT((marler3(0) / 8) + x.pos + cek.selisih, y.pos + center.selisih) <= 0 AND POINT((marler3(0) / 8) + x.pos + cek.selisih, y.center) <= 0 AND POINT((marler3(0) / 8) + x.pos + cek.selisih, marler3(1) + y.pos – center.selisih) <= 0 THEN
IF x.pos <= bataskanan THEN
x.pos = x.pos + x.ofset
ELSE
x.pos = bataskiri
END IF
ELSE
PUT (x.pos, y.pos), marler
posisi = 1
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marler3
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marler3
IF POINT((marler4(0) / 8) + x.pos + cek.selisih, y.pos + center.selisih) <= 0 AND POINT((marler4(0) / 8) + x.pos + cek.selisih, y.center) <= 0 AND POINT((marler4(0) / 8) + x.pos + cek.selisih, marler4(1) + y.pos – center.selisih) <= 0 THEN
IF x.pos <= bataskanan THEN
x.pos = x.pos + x.ofset
ELSE
x.pos = bataskiri
END IF
ELSE
PUT (x.pos, y.pos), marler
posisi = 1
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marler4
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marler4
IF POINT((marler5(0) / 8) + x.pos + cek.selisih, y.pos + center.selisih) <= 0 AND POINT((marler5(0) / 8) + x.pos + cek.selisih, y.center) <= 0 AND POINT((marler5(0) / 8) + x.pos + cek.selisih, marler5(1) + y.pos – center.selisih) <= 0 THEN
IF x.pos <= bataskanan THEN
x.pos = x.pos + x.ofset
ELSE
x.pos = bataskiri
END IF
ELSE
PUT (x.pos, y.pos), marler
posisi = 1
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marler5
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marler5
IF POINT((marler6(0) / 8) + x.pos + cek.selisih, y.pos + center.selisih) <= 0 AND POINT((marler6(0) / 8) + x.pos + cek.selisih, y.center) <= 0 AND POINT((marler6(0) / 8) + x.pos + cek.selisih, marler6(1) + y.pos – center.selisih) <= 0 THEN
IF x.pos <= bataskanan THEN
x.pos = x.pos + x.ofset
ELSE
x.pos = bataskiri
END IF
ELSE
PUT (x.pos, y.pos), marler
posisi = 1
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marler6
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marler6
IF POINT((marler(0) / 8) + x.pos + cek.selisih, y.pos + center.selisih) <= 0 AND POINT((marler(0) / 8) + x.pos + cek.selisih, y.center) <= 0 AND POINT((marler(0) / 8) + x.pos + cek.selisih, marler(1) + y.pos – center.selisih) <= 0 THEN
IF x.pos <= bataskanan THEN
x.pos = x.pos + x.ofset
ELSE
x.pos = bataskiri
END IF
ELSE
PUT (x.pos, y.pos), marler
posisi = 1
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marler
‘jangan lupa untuk mengeset variabel posisi
posisi = 1
RETURN

kiri:
‘hapus spritenya
‘cek posisi terakhir sprite menghadap kemana???
oldx.pos = x.pos: oldy.pos = y.pos
SELECT CASE posisi
CASE 1 ‘kanan
PUT (oldx.pos, oldy.pos), marler
CASE 2 ‘kiri
PUT (oldx.pos, oldy.pos), marlel
CASE 3 ‘bawah
PUT (oldx.pos, oldy.pos), marled
CASE 4 ‘atas
PUT (oldx.pos, oldy.pos), marleu
END SELECT
IF POINT(x.pos – cek.selisih, y.pos) <= 0 AND POINT(x.pos – cek.selisih, y.center) <= 0 AND POINT(x.pos – cek.selisih, marlel1(1) + y.pos) <= 0 THEN
IF x.pos >= bataskiri THEN
x.pos = x.pos – x.ofset
ELSE
x.pos = bataskanan
END IF
ELSE
PUT (x.pos, y.pos), marlel
posisi = 2
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marlel1
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marlel1
IF POINT(x.pos – cek.selisih, y.pos) <= 0 AND POINT(x.pos – cek.selisih, y.center) <= 0 AND POINT(x.pos – cek.selisih, marlel2(1) + y.pos) <= 0 THEN
IF x.pos >= bataskiri THEN
x.pos = x.pos – x.ofset
ELSE
x.pos = bataskanan
END IF
ELSE
PUT (x.pos, y.pos), marlel
posisi = 2
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marlel2
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marlel2
IF POINT(x.pos – cek.selisih, y.pos) <= 0 AND POINT(x.pos – cek.selisih, y.center) <= 0 AND POINT(x.pos – cek.selisih, marlel3(1) + y.pos) <= 0 THEN
IF x.pos >= bataskiri THEN
x.pos = x.pos – x.ofset
ELSE
x.pos = bataskanan
END IF
ELSE
PUT (x.pos, y.pos), marlel
posisi = 2
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marlel3
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marlel3
IF POINT(x.pos – cek.selisih, y.pos) <= 0 AND POINT(x.pos – cek.selisih, y.center) <= 0 AND POINT(x.pos – cek.selisih, marlel4(1) + y.pos) <= 0 THEN
IF x.pos >= bataskiri THEN
x.pos = x.pos – x.ofset
ELSE
x.pos = bataskanan
END IF
ELSE
PUT (x.pos, y.pos), marlel
posisi = 2
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marlel4
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marlel4
IF POINT(x.pos – cek.selisih, y.pos) <= 0 AND POINT(x.pos – cek.selisih, y.center) <= 0 AND POINT(x.pos – cek.selisih, marlel5(1) + y.pos) <= 0 THEN
IF x.pos >= bataskiri THEN
x.pos = x.pos – x.ofset
ELSE
x.pos = bataskanan
END IF
ELSE
PUT (x.pos, y.pos), marlel
posisi = 2
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marlel5
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marlel5
IF POINT(x.pos – cek.selisih, y.pos) <= 0 AND POINT(x.pos – cek.selisih, y.center) <= 0 AND POINT(x.pos – cek.selisih, marlel6(1) + y.pos) <= 0 THEN
IF x.pos >= bataskiri THEN
x.pos = x.pos – x.ofset
ELSE
x.pos = bataskanan
END IF
ELSE
PUT (x.pos, y.pos), marlel
posisi = 2
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marlel6
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marlel6
IF POINT(x.pos – cek.selisih, y.pos) <= 0 AND POINT(x.pos – cek.selisih, y.center) <= 0 AND POINT(x.pos – cek.selisih, marlel(1) + y.pos) <= 0 THEN
IF x.pos >= bataskiri THEN
x.pos = x.pos – x.ofset
ELSE
x.pos = bataskanan
END IF
ELSE
PUT (x.pos, y.pos), marlel
posisi = 2
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marlel
‘jangan lupa untuk mengeset variabel posisi
posisi = 2
RETURN

bawah:
‘hapus spritenya
‘cek posisi terakhir sprite menghadap kemana???
oldx.pos = x.pos: oldy.pos = y.pos
SELECT CASE posisi
CASE 1 ‘kanan
PUT (oldx.pos, oldy.pos), marler
CASE 2 ‘kiri
PUT (oldx.pos, oldy.pos), marlel
CASE 3 ‘bawah
PUT (oldx.pos, oldy.pos), marled
CASE 4 ‘atas
PUT (oldx.pos, oldy.pos), marleu
END SELECT
IF POINT(x.pos, marled1(1) + y.pos + cek.selisih) <= 0 AND POINT(x.center, marled1(1) + y.pos + cek.selisih) <= 0 AND POINT((marled1(0) / 8) + x.pos, marled1(1) + y.pos + cek.selisih) <= 0 THEN
IF y.pos <= batasbawah THEN
y.pos = y.pos + y.ofset
ELSE
y.pos = batasatas
END IF
ELSE
PUT (x.pos, y.pos), marled
posisi = 3
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marled1
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marled1
IF POINT(x.pos, marled2(1) + y.pos + cek.selisih) <= 0 AND POINT(x.center, marled2(1) + y.pos + cek.selisih) <= 0 AND POINT((marled2(0) / 8) + x.pos, marled2(1) + y.pos + cek.selisih) <= 0 THEN
IF y.pos <= batasbawah THEN
y.pos = y.pos + y.ofset
ELSE
y.pos = batasatas
END IF
ELSE
PUT (x.pos, y.pos), marled
posisi = 3
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marled2
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marled2
IF POINT(x.pos, marled3(1) + y.pos + cek.selisih) <= 0 AND POINT(x.center, marled3(1) + y.pos + cek.selisih) <= 0 AND POINT((marled3(0) / 8) + x.pos, marled3(1) + y.pos + cek.selisih) <= 0 THEN
IF y.pos <= batasbawah THEN
y.pos = y.pos + y.ofset
ELSE
y.pos = batasatas
END IF
ELSE
PUT (x.pos, y.pos), marled
posisi = 3
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marled3
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marled3
IF POINT(x.pos, marled4(1) + y.pos + cek.selisih) <= 0 AND POINT(x.center, marled4(1) + y.pos + cek.selisih) <= 0 AND POINT((marled4(0) / 8) + x.pos, marled4(1) + y.pos + cek.selisih) <= 0 THEN
IF y.pos <= batasbawah THEN
y.pos = y.pos + y.ofset
ELSE
y.pos = batasatas
END IF
ELSE
PUT (x.pos, y.pos), marled
posisi = 3
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marled4
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marled4
IF POINT(x.pos, marled5(1) + y.pos + cek.selisih) <= 0 AND POINT(x.center, marled5(1) + y.pos + cek.selisih) <= 0 AND POINT((marled5(0) / 8) + x.pos, marled5(1) + y.pos + cek.selisih) <= 0 THEN
IF y.pos <= batasbawah THEN
y.pos = y.pos + y.ofset
ELSE
y.pos = batasatas
END IF
ELSE
PUT (x.pos, y.pos), marled
posisi = 3
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marled5
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marled5
IF POINT(x.pos, marled6(1) + y.pos + cek.selisih) <= 0 AND POINT(x.center, marled6(1) + y.pos + cek.selisih) <= 0 AND POINT((marled6(0) / 8) + x.pos, marled6(1) + y.pos + cek.selisih) <= 0 THEN
IF y.pos <= batasbawah THEN
y.pos = y.pos + y.ofset
ELSE
y.pos = batasatas
END IF
ELSE
PUT (x.pos, y.pos), marled
posisi = 3
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marled6
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marled6
IF POINT(x.pos, marled(1) + y.pos + cek.selisih) <= 0 AND POINT(x.center, marled(1) + y.pos + cek.selisih) <= 0 AND POINT((marled(0) / 8) + x.pos, marled(1) + y.pos + cek.selisih) <= 0 THEN
IF y.pos <= batasbawah THEN
y.pos = y.pos + y.ofset
ELSE
y.pos = batasatas
END IF
ELSE
PUT (x.pos, y.pos), marled
posisi = 3
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marled
‘jangan lupa untuk mengeset variabel posisi
posisi = 3
RETURN

atas:
‘hapus spritenya
‘cek posisi terakhir sprite menghadap kemana???
oldx.pos = x.pos: oldy.pos = y.pos
SELECT CASE posisi
CASE 1 ‘kanan
PUT (oldx.pos, oldy.pos), marler
CASE 2 ‘kiri
PUT (oldx.pos, oldy.pos), marlel
CASE 3 ‘bawah
PUT (oldx.pos, oldy.pos), marled
CASE 4 ‘atas
PUT (oldx.pos, oldy.pos), marleu
END SELECT
IF POINT(x.pos, y.pos – cek.selisih) <= 0 AND POINT(x.center, y.pos – cek.selisih) <= 0 AND POINT((marleu1(0) / 8) + x.pos, y.pos – cek.selisih) <= 0 THEN
IF y.pos >= batasatas THEN
y.pos = y.pos – y.ofset
ELSE
y.pos = batasbawah
END IF
ELSE
PUT (x.pos, y.pos), marleu
posisi = 4
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marleu1
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marleu1
IF POINT(x.pos, y.pos – cek.selisih) <= 0 AND POINT(x.center, y.pos – cek.selisih) <= 0 AND POINT((marleu2(0) / 8) + x.pos, y.pos – cek.selisih) <= 0 THEN
IF y.pos >= batasatas THEN
y.pos = y.pos – y.ofset
ELSE
y.pos = batasbawah
END IF
ELSE
PUT (x.pos, y.pos), marleu
posisi = 4
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marleu2
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marleu2
IF POINT(x.pos, y.pos – cek.selisih) <= 0 AND POINT(x.center, y.pos – cek.selisih) <= 0 AND POINT((marleu3(0) / 8) + x.pos, y.pos – cek.selisih) <= 0 THEN
IF y.pos >= batasatas THEN
y.pos = y.pos – y.ofset
ELSE
y.pos = batasbawah
END IF
ELSE
PUT (x.pos, y.pos), marleu
posisi = 4
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marleu3
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marleu3
IF POINT(x.pos, y.pos – cek.selisih) <= 0 AND POINT(x.center, y.pos – cek.selisih) <= 0 AND POINT((marleu4(0) / 8) + x.pos, y.pos – cek.selisih) <= 0 THEN
IF y.pos >= batasatas THEN
y.pos = y.pos – y.ofset
ELSE
y.pos = batasbawah
END IF
ELSE
PUT (x.pos, y.pos), marleu
posisi = 4
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marleu4
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marleu4
IF POINT(x.pos, y.pos – cek.selisih) <= 0 AND POINT(x.center, y.pos – cek.selisih) <= 0 AND POINT((marleu5(0) / 8) + x.pos, y.pos – cek.selisih) <= 0 THEN
IF y.pos >= batasatas THEN
y.pos = y.pos – y.ofset
ELSE
y.pos = batasbawah
END IF
ELSE
PUT (x.pos, y.pos), marleu
posisi = 4
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marleu5
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marleu5
IF POINT(x.pos, y.pos – cek.selisih) <= 0 AND POINT(x.center, y.pos – cek.selisih) <= 0 AND POINT((marleu6(0) / 8) + x.pos, y.pos – cek.selisih) <= 0 THEN
IF y.pos >= batasatas THEN
y.pos = y.pos – y.ofset
ELSE
y.pos = batasbawah
END IF
ELSE
PUT (x.pos, y.pos), marleu
posisi = 4
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marleu6
FOR z = 1 TO delay: FOR y = 1 TO delay: NEXT: NEXT
‘hapus spritenya
oldx.pos = x.pos: oldy.pos = y.pos
PUT (oldx.pos, oldy.pos), marleu6
IF POINT(x.pos, y.pos – cek.selisih) <= 0 AND POINT(x.center, y.pos – cek.selisih) <= 0 AND POINT((marleu(0) / 8) + x.pos, y.pos – cek.selisih) <= 0 THEN
IF y.pos >= batasatas THEN
y.pos = y.pos – y.ofset
ELSE
y.pos = batasbawah
END IF
ELSE
PUT (x.pos, y.pos), marleu
posisi = 4
RETURN
END IF
‘letakkan di posisi baru
PUT (x.pos, y.pos), marleu
‘jangan lupa untuk mengeset variabel posisi
posisi = 4
RETURN

Scene1:
DEF SEG = &HA000
BLOAD “Screen1.Map”
DEF SEG
RETURN

not.arrow:
‘Jika ditekan tombol q maka program akan berhenti
IF a$ = “q” THEN
WIDTH 80
SCREEN 0
COLOR 7, 0
CLS
END
END IF
RETURN

Yang memegang peranan penting selain gambar map, adalah cerita dari game itu sendiri. Unsur cerita ini terkadang suka diabaikan sehingga terkesan kaku dan karakter yang ada di game itu juga kurang mempunyai “jiwa”. Ternyata membuat game juga melibatkan perasaan yah… Seperti dalam game saya Quest of Rosetta, mungkin gampang ditebak endingnya yah…