Jump to content





The old Porkchop Express!

Posted by Mike Harris, in Adventure 16 May 2019 · 44 views

Adventure

The title of course has nothing to do with my entry.
 
New update coming soon.
As far as I can tell all mapping bugs have been fixed.
When I upload the new rom then you tell me what you find.
 
No more going through or getting stuck in walls.
 
Kids...This was a huge pain in the A%%.
The interesting thing is is when I finished and optimized the check routines it seems so simple.
Just like replacing Spock's brain...A child could do it.
 
The great part is that I can use these routines in all my new games coming.
 
Still have to incorporate Diagonal movement and then the new rom will be released.
Next will be optimize pick up routine which I plan to have directional pickup.
As in pick up from the left then item will be on the right and so forth.
 
 
 
Here is a sample of my movement code.
 NORTH:
    LD A,(SPRTBL)
    SUB A, 02                               ; Y Offset
    LD (SPRTBL),A
    CALL MAP_TO_SPRITE          ; Get Pattern, Wall?
    AND A
    JP NZ, WALL_NORTH            ; Hit North Wall
    LD A,(SPRTBL+1)
    ADD A, 09                               ; X Offset
    LD (SPRTBL+1),A
    CALL MAP_TO_SPRITE          ; Get Pattern, Wall?
    AND A
    JP NZ, WALL_NORTH_2         ; Hit North Wall Offset
 
    LD A,(SPRTBL+1)
    SUB A, 09                              ; Return X Value
    LD (SPRTBL+1),A
 
    LD A,(SPRTBL)
    DEC A                                   ; Return Y Value + Move North
    CP 02                                    ; Check Screen Edge
    JP C, GOING_NORTH           ; Going North
RET
WALL_NORTH:
    LD A,(SPRTBL)
    ADD A, 03                             ; Bounce Player, Return Y Value
    LD (SPRTBL),A
RET
WALL_NORTH_2:
    LD A,(SPRTBL+1)
    SUB A, 09                               ; Return X Value
    LD (SPRTBL+1),A
    LD A,(SPRTBL)
    ADD A, 03                              ; Bounce Player, Return Y Value
    LD (SPRTBL),A
RET
GOING_NORTH:
    LD A, 182
    LD (SPRTBL),A                       ; Player to the Bottom
    LD C, 01
    CALL PRINT_ROOM
RET
 
 UPDATE-------------------------------------------------------------------------------------------------------------
 
Calling it a night.
Fixed walls, castle entry and exit
optimized movement and bounce.
Deactivated Diagonal Movement until I put in boundary checks.
 
Feel free to download, break it, criticize, color suggestions, test on real hardware and let me know.

Attached Files