Wednesday, 19 August 2020

Testing Area Transitions

To add a bit more depth to the project I decided to attempt area transitions. Up till now it has just been the main island thats been playable, mostly due to testing things. So I decided to try and get indoor areas working and fluid animations / transitions between the two.

Thanks to previous work on Silent Hill, I'm doing this with cutscenes. This allows me to use animations and even add animation keyframes on top on that. So I can have Link use a door open animation, then I can add manual animation on a door object and even modify Links position to match. Here is the result so far:

In this video you can see the editor animation frames (at the botton of the screen) and then how it looks in game.

Both in and out transitions work pretty much flawlessly, I've always hated animation but I think I've managed to make my manual adjustments look right. Only thing left to do is script a global room monitor so that I can tell that to load the next scene during the cutscene to allow proper in-game area transitioning.

The logic behind this is fairly simple:

Typically you would have to have pre-set spawn locations upon entering and exiting the interiors. I got around this by creating four cutscenes, 2 for the main island and two for interiors, each an entering and exiting.

I then setup an interior to use these animations when needed and then duplicated this rom for the other interiors, so that they are pre-setup. Exiting to the island was a bit harder, upon transitioning to the island it simply checks which area was last. Depending on this, it then loads one of the duplicated cutscenes for exting a building and warps the player and door to said location.


The code isn't complex at all, its just checking the level names after a transition to the main island. If it finds an applicable clause it then loads the right cutscene, and away it goes!

No comments:

Post a Comment