Quote from: Indra Anagram on Mon 08/08/2022 19:45:31
Hello, AGS Community!
Has anyone seen this on YouTube?
I wonder if something real was ever published.
My question is: Any ideas how this was made? Ledge detection is particularly interesting.
Hey Indra, thanks for your question. I made this as a prototype. As CaptainD pointed out already these experiments turned into Concurrence my "biggest hit"

I remember what helped me extremely was this article: https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/the-guide-to-implementing-2d-platformers-r2936/. The second most important piece for doing a platformer is using a state machine. Just google "platformer state machine" it's not so complicated. Basically it's a big switch-case/else-if statement where you manage the different states the player can be in. What really made AGS a good choice is it's blocking code mechanic (something I really miss in other engines). Cinematic Platformers basically work like: Wait for input - Play animation - Wait for input again. AGS' blocking animations combined with the tween plugin worked like a charm. As for the ledges. I remember it basically worked like this: Concurrence is grid based (I think 16px). Each gird cell can have an attribute (e.g. ground, ledge etc...). When the Player is in standing state and hits jump key, check at a fixed coordinate above and a little in front. If this coordinate is part of a ledge, play the "jump to ledge" animation and move the player to the appropriate coordinates. Afterwards player will enter the "hanging on ledge" state where other options are available for input. If you have any more questions feel free to ask
