top of page
Search

Monster Middle Management

  • seanmcgarry65
  • Feb 17, 2023
  • 2 min read

This week, a new monster was added to the adventure game, as well as the ability to use a raft, a room to fight a boss in, and a short cutscene that plays before what will be the boss fight.


First, the new monster is the Stalfos. It moves faster than the moblin, but has no ranged attack.

The Stalfos is so similar to the moblin in fact that it's whole code is essentially copied, as you can see from this (since renamed) code group controlling its orientation when it moves.


The newly added raft allows the player to cross bodies of water once it's acquired.


This code is what allows the player to pick up the raft. When the player walks over the raft, it sets the variable controlling whether or not the raft is obtained to true, plays a sound, and then destroys the raft that the player walked over.

Once the player has obtained the raft, then whenever they're overlapping the water but NOT overlapping a respawn zone, then a raft is spawned. The raft is then pinned to the player, and spawns splash particle, which is in turn pinned to the raft. After all of that, the player is moved to the top of the layer so that they appear on top of the raft, and the particle's angle is set to 90 degrees, so that its movement relative to the raft makes sense.

Once the player is no longer overlapping a water collision tile, the raft and the splash particle are both destroyed.

This code makes it so that the splash particle only plays when the player is moving.

Whenever the player moves, the raft rotates so that it's facing the same direction as them at all times.


A new arena is added to the entrance on top of the cliffs on this island. The code that transports the player there works the same as the code that moves them between the overworld and all other caves and dungeons.

The dungeon itself is basically just a large rectangular room where the boss will be fought. The final arena is a bit smaller than this since I realized this was way too big.


Finally, a small cutscene was added that plays automatically when the player approaches the boss. (Also, as you can see, the arena was shrunk significantly). As the player gets close enough the text 'WELCOME TO YOUR DOOM!' slowly fades in, followed by the boss itself, before fading out, leaving the player alone with the boss.

As you can see, the game checks whether the boss is on-screen, how close the player is to it, and whether the intro has already played before allowing the intro to actually play out. First, the player's movement controls are disabled, then the text is set to visible before the fade behavior on it is started. The game then waits 1.5 seconds before doing the same process with the boss itself. Finally, it marks down that it has played the intro for the boss, so that it won't repeat this code group every time the other conditions are fulfilled. Currently, that's as far as the player can get, as the boss doesn't do anything yet, and there is no code that re-enables the player's movement.


The game can be played in its current state by following the link below.



 
 
 

Recent Posts

See All

Comentarios


bottom of page