top of page
Search

Spelunking

  • seanmcgarry65
  • Feb 3, 2023
  • 1 min read

This week, I focused mainly on adding another layout to the game, in the form of a cave, though the same process can also be used to add additional layouts as well. There is also now a death screen which has been implemented.


ree

This is the new layout as seen in the editor. The items on the right are purchasable, while the door and the Link sprite represent objects used in transporting the player from one layout to another.


ree

This segment of code is what allows the player to purchase items. Walking over the items when the player has enough rupees results in the item on display being destroyed, and the corresponding item being unlocked in the player's inventory.


ree
ree

These two snippets together control how the player is sent between layouts. The top snippet sends the player to the new layout, while the bottom snippet controls where the player appears -in- that new layout, based on a variable assigned by the first snippet.


ree

This is the new death screen. When seen in game, the ghost floats up and down over the tombstone, while shifting left and right while simultaneously growing larger and smaller, giving the illusion that it's drifting in circles as it floats in the air.


ree

The code that sends the player to the death screen has been added to the same code that controls the rest of the events associated with the player's death. After waiting two seconds after the rest of the code finishes, the player is sent to the GameOver layout, which contains the death screen.



 
 
 

Recent Posts

See All

Comments


bottom of page