[Sorry for the necropost but since this thread has been mentioned on the Discord, i wanted to make an update before it goes forgotten under tons of Discord messages]
Some of you may already know but i actually tackled on rewriting the sidecrolller system for a Zelda: Links Awakening remake (ALTTD - A Link to the Dream).
As of today (2021, january 18th), the script is stable enough to be used in another project (in fact, someone did test to do it with success). You can find it here:
https://gitlab.com/zeldaforce/zelda-alttd/-/blob/dev/data/scripts/maps/sideview_manager.lua.
This is still in development, though, since the internals are quite a hack, especially the sprite and hero movement management, so i am in the process of using custom states instead. (it is already written in a separate branch, but it broke the ladder-top detection).
Also, the system works badly when you try to walk down slopes, (unfortunately, i don't have any idea how to handle this, maybe you can help me somehow ?), but this is a low-priority for now since the main project it is used on has none.
Prerequisites:- Since it overwrites some of the metas, you
will have to use a script that does allow multiples occurences of the same event (the
multi_events.lua, which is required by the script, see header for more information), and never use the direct call to hero:on_position_changed, game:on_map_changed and hero:on_state_changed, since they are the triggers to launch the multiple timers used to update the Y-positions of the affected entities and the movement/commands handling for the hero.
- You will also need
scripts/states/sideview_swim.lua, found in the same repository, and the following additional animations for the hero:
swimming_scroll
stopped_swimming_scroll
lifting_heavy
swimming_scroll_loading (+sword_loading_swimming_scroll for the sword sprite)
climbing_walking
climbing_stopped
Remarks:- To make entities jump, just set
your_entity.vspeed to a negative value.
- Being a fan project, the remake
may be taken down at any point, so if the links get broken, then i will attach the script here instead.