Projects > Zelda Projects
[GMS] The Legend of Zelda GBC
Mamoruanime:
--- Quote from: TheRealMethuselah on June 28, 2020, 07:04:25 pm ---I'd still like to see an example of your solution.
--- End quote ---
Here's a very simple demonstration:
programancer.com/ScrollDemoForTRM.zip
It's very very easy, and even this can be optimized a lot. To break it down-
When the player hits the edge of the screen, it calls scrScrollScreen. scrScrollScreen creates the scroll controller object and makes sure to assign the scroll direction and call the initialization event (event_user(0) is used for this). It also makes sure the player is not able to move for the scroll.
The step event for objScrollController is where the magic happens- it lerps both the cameras position and the player's position, then returns control to the player when the lerp is over and destroys itself.
It should be pretty easy to follow.
TheRealMethuselah:
Seems easy enough to follow. I'll check it out and see if it's something I can implement in my engine. I'm loading my tiles on-the-fly and areas are loaded in as needed, so I'll need to change it a bit.
Implemented a lerp function; seems a bit smoother:
https://www.youtube.com/watch?v=iNxmdMKPrpw
Mamoruanime:
Just checking in- how's progress going?
Interested in seeing what you've come up with~
TheRealMethuselah:
https://www.youtube.com/watch?v=8hDJNWgF8n0
TheRealMethuselah:
Removed
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version