Missing Tile Types Restoration Project

Mihoshi20

Member
There's a few tile types missing from the adventure module that were in the beta that I am surprised to see absent and are critical to my current game so I've set out to try and restore the functionality.

First is the 'checkpoint' tile type. The variables used for the tile seem to still exit in the code but adding in the script for Tile_Checkpoint.asm to an unused tile type and then using it in game causes the game to freeze after losing all health. I attribute this to somewhere in the code it expecting a lives variable to be checked or something in HandleCollisions I haven't looked into yet.

Second is the 'Death Tile' which I plan to convert into a Hurt tile which mimics the functionality of touching a monster, causing knockback and taking a bit of health. Adding back in the script for the death tile and adding a JSR along with a label in Adventure_HandlePlayerHurt results in the game freezing when the player touches the tile. Adding the label to Adventure_HandlePlayerDeath results in a Label already defined error at seembly time despite the label being used nowhere else, including commenting out or removing from Adventure_HandlePlayerHurt ensuring no duplicate labels. In fact adding ANY label added to Adventure_HandlePlayerDeath nets the same results with or without an RTS.

If anyone has any ideas or insight as aside from combing through the HandleCollisions code I am at a loss for ideas.
 

dale_coop

Moderator
Staff member
Yeah, the Checkpoint type tile... Hope it will come back soon.
I didn't hav time to check myself (so much things to do currently :p)
 

Mihoshi20

Member
dale_coop said:
Yeah, the Checkpoint type tile... Hope it will come back soon.
I didn't hav time to check myself (so much things to do currently :p)

Yeah, life and responsibilities always come first so that's understandable. I'm going to be looking into it further myself and see if I can somewhat port the functionality over though I am still hopeful for an official implementation to restore the two tiles.
 

dale_coop

Moderator
Staff member
For the "Player Death" Type Tile, here the script:

Code:
	CPX player1_object
	BNE finishedPlayerDeathTile
	LDA player1_object
	CMP #$FF ;; this would mean he's already dead.
	BEQ finishedPlayerDeathTile
	
	.include SCR_HANDLE_PLAYER_DEATH
	
finishedPlayerDeathTile:
 	RTS

Assign this script to an unused "Tile Type" (in Project settings) and voilà!
 

Mihoshi20

Member
dale_coop said:
For the "Player Death" Type Tile, here the script:

Code:
	LDA player1_object
	CMP #$FF ;; this would mean he's already dead.
	BEQ finishedPlayerDeathTile
	
	.include SCR_HANDLE_PLAYER_DEATH
	
finishedPlayerDeathTile:
 	RTS

Assign this script to an unused "Tile Type" (in Project settings) and voilà!

Hmm it works magnificently, though I'm having a strange issue where when a monster touches the tile, the player dies.
 

dale_coop

Moderator
Staff member
You right!
I Forgot to check the monsters!
Need to add this two lines at the beginning:
Code:
    CPX player1_object
    BNE finishedPlayerDeathTile
 
    LDA player1_object
	CMP #$FF ;; this would mean he's dead.
	BEQ finishedPlayerDeathTile
	
	GetCurrentActionType player1_object  ;; dale_coop: check if player was Dashing 
	CMP #$04
	BEQ finishedPlayerDeathTile
	;;ELSE Player DEATH
    .include SCR_HANDLE_PLAYER_DEATH
	

finishedPlayerDeathTile:
    ;; solid for monsters
	LDA #TILE_SOLID
	STA tile_solidity
 
Top Bottom