KoBeWi / Metroidvania-System

General-purpose framework for creating metroidvania games in Godot.

Home Page:https://godotengine.org/asset-library/asset/2301

Repository from Github https://github.comKoBeWi/Metroidvania-SystemRepository from Github https://github.comKoBeWi/Metroidvania-System

scroll_transition on room change

jalcazo opened this issue · comments

I suggest that ON TOP of having an “Instant” transition when switching room we have as well the scroll transition that can be seen in Alwa's Legacy or Castlevania's games, and I think Megamans as well in which:

Game freezes (player and characters), for example if player was jumping he/she freezes midair, while we see a transition left to right (or right to left, or bottom to top or top to bottom) fast from one room to another.

I attach Alwa's Legacy footage for reference, is a room very (almost everything) room based: https://www.youtube.com/watch?v=jvKc0ZHA0J0

Alwa's Legacy also uses fade to black and black to normal transitions, so I suggest adding that as well.

I propose that we can adjust scroll speed in a parameter in Godot in inspector (as well as in code).

And somehow we select instant transition or scroll_transition or other future transitions like melt (doom) etc.

Thanks a lot for your FANTASTIC work.

This can be already achieved by adjusting the room changing code. It's to be implemented on the project's side, not the addon's. I can make an example later.

I created this:

godot_36JXfdy2gL.mp4

ScrollingRoomTransitions.gd.txt

Put it in res://addons/MetroidvaniaSystem/Template/Scripts/Modules/ (without .txt) and change this line

https://github.com/KoBeWi/Metroidvania-System/blob/4dc6d461057a1aeb07122c144e1a049d784ab6c2/SampleProject/Scripts/Game.gd#L64C2-L64C9

to use ScrollingRoomTransitions.

It's not perfect though. Turns out it's not that easy to implement due to various camera quirks. I might improve it later.

Thanks a lot, I'll try it.

Could we get the option to modify the path to the modules/scripts just like with the rooms folder so that one does not need to add scripts into the addon?

I attach Alwa's Legacy footage for reference

I checked it again and almost every room in that game is single screen. This makes such transitions easy to implement, and the script I posted works in this case. It breaks when rooms have varying size, because the camera is in different position between rooms. Maybe it's fine and I'll just make a variation similar to Metroid, where the surroundings fade to black when transitioning.

I cleaned up the script and officially included it in the plugin (on 4.4 branch for now):
https://github.com/KoBeWi/Metroidvania-System/blob/4.4/addons/MetroidvaniaSystem/Template/Scripts/Modules/ScrollingRoomTransitions.gd

It only has the base effect and does not work properly in every case, but it's good enough for games like Alwa's Legacy.