Pursuing Tom Ram

Game available in Itch.io.

Soruce code in Github.

Programming adventures in VIC-20.


Movement. The map

The map of the adventure is a grid. Each position in the grid is a location. Using a grid I save memory and the implementation of movement verbs is easier too. This is the map in assembly code.

The index, or in other words, the position in the map is in “loc”, that you already know.

<

  
desc_list WORD desc0, desc1, desc2, desc3, desc4, desc5, desc6, desc7, desc8 
          WORD desc9, desc10, desc11, desc0, desc13
; desc 12 is not used
desc0
        TEXT    "desktop"
        BYTE    $0 ; Hace un salto de linea.

desc1
        TEXT    "gateway"
        BYTE    $0 ; Hace un salto de linea.
desc2
        TEXT    "garage"
        BYTE    $0
desc3
        TEXT    "living room"
        BYTE    $0
desc4
        TEXT    "lounge"
        BYTE    $0 ; Hace un salto de linea.

desc5
        TEXT    "bedroom"
        BYTE    $0 ; Hace un salto de linea.
desc6
        TEXT    "garden"
        BYTE    $0
desc7
        TEXT    "dinning room"
        BYTE    $0
desc8
        TEXT    "kitchen"
        BYTE    $0

desc9
        TEXT    "room with a big"
        BYTE    RETURN
        TEXT    "blob of meat"
        BYTE    RETURN
        TEXT    "it is gordon"
        BYTE    RETURN
        BYTE    $0

desc10
        TEXT    "same house in a diferent dimension"
        BYTE    $0

desc11
        TEXT    "nest ofe dimensional monsters"
        BYTE    $0

;desc12 ; Not used

desc13
        TEXT    "temple of madness"
        BYTE    $0

  

It was a bad idea using “descX” instead of a proper name. I hope you do not do that.