Hi again again everyone, just fiddling around with MMF2 and was wondering if there is a relatively simple way of making Super Metroid-like scrolling. The idea is that you have rooms where the camera follow you smoothly, but once you go through a door the camera "glides" to a new screen. The cells aren't always rectangular either.
Here's a video to demonstrate what I mean better:
Thanks in advance everyone
Edit: Didn't remember until I watched that myself that the screen goes black in the transitions and only the door is showing. This might be a tad easier than proposed.
What Super Metroid is actually doing is loading the next room while the screen scrolls (technically, there's a slight pause when this happens, and the room is already loaded when the screen scrolls). This means that you must have a dynamically loading world to get the same result. You can fake it as Nivram suggested, in which case you can do it in a single frame, or make it a small transition when you go to another frame.
I think that making it in separate frames will make the game run better and removes the problem of the screen scrolling into the next cell too early, but making it harder to position the player on the other side with movement and everything.
Nivram I've already looked at those but they always scroll like a grid, I need that scroll to trigger only when you enter or exit a cell but otherwise follow the player smoothly.
Well if you want the previous frame to fade to black before the little change room sequence you could have a "transition frame" that has all the doorway animations in one and control which one plays by using a global value.
I don't know how your game is setup though so this method might not be the best for your specific configuration.
Let's say, I don't have a game yet. Exploration and movement will be the most important factors for it's success, so I'm not really making an engine before I'm satisfied with how movement between cells work.
Let's say we have 3 cells laid out like in the following amazing piece of art done by your's truly:
I'd want the camera to stop once it reaches another cell's walls, and transition in only when you enter through the door. The whole fade to black and door moves thing is unnecessary really, just a 'snap' is fine too.
If the colored rainbow guy is the size of my main character, is the frame size appropriate?
I think the man/frame ratio is pretty close to Super Metroid right now.
(Parts of the content blurred intently and added fantastic watermark because I've had less than good experiences with releasing shit prematurely before)
It would make things very much easier if you do what your video shows, and base everything on a grid where each cell is the size of one screen (ideally with doors centered vertically / horizontally in a cell).
That way, you just need an array to store the directions in which smooth scrolling is allowed, and then handle the slide scrolling separately when the player enters the door. That should be pretty simple, whereas what your diagram shows would be very difficult.
Hm, amazing didn't really know SM worked like that. I just have to base the map off a 400x300 grid and all I have to do is check with an array if it's OK to scroll that direction.
That was more or less exactly what I was looking for. I tried fiddling around with the "getting too close to window's edge" but could for some reason not get it to work. Hadn't really thought about the interpolation either, that shit looks neat. Now I can try to get on with my project.
I'll keep you posted if the project actually turns into something, in the end I might make one of those "Project" things even if it seems no one at all ever checks them out here.
Hey if you need any help getting this code working with what you have just send me the edited code and I'll fix any problems you have!
Can't wait to see what you make!
EDIT:
Two more features I forgot to add to the code, but you should be able to add this.
Don't make the camera follow the player vertically until they land on a platform, that way the camera isn't jerking all over the place when the player jumps.
Make the camera lead the player by staying ahead of them... just position the camera a little ways in front of them based on the direction they're facing.
Oh well I can't open it because MMF2 is broken and I can't install any new extensions right now. And even if I could it would probably be a lot more advanced than what you already gave me, and I don't really need all those other random effects in that engine.
It does showcase that which you meant about the camera being in front of the player though. I'll try to implement both things you said, the jerk when you jump was the first thing my tester complained about when I made him test the engine.
Thanks again though, couldn't have kliked without you guys.
EDIT: Was planning to recycle one of my own fastlooped movements, but of course it's packed with retarded extensions so I can't open it. Goddamm.
EDIT2: Nevermind, found an old installation with all the extensions. Sweet salvation.