The Daily Click ::. Forums ::. Klik Coding Help ::. Super Metroid Scrolling
 

Post Reply  Post Oekaki 
 

Posted By Message

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
18th December, 2012 at 18/12/2012 00:47:20 -

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.

Edited by Knockturnal

 
Professional vaporware developer

nivram



Registered
  20/07/2006
Points
  171
18th December, 2012 at 18/12/2012 03:49:28 -

Some Zelda scrolls are like this. I have some examples on my website. Look in the Z section.

Marv

 
458 MMF2 & CTF 2.5 examples and games

http://www.castles-of-britain.com/mmf2examples.htm

Alonso Martin



Registered
  29/12/2010
Points
  294
18th December, 2012 at 18/12/2012 12:31:42 -

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.

 
www.hfalicia.com
www.alonsomartin.mx

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
18th December, 2012 at 18/12/2012 13:17:16 -

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.

 
Professional vaporware developer

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
18th December, 2012 at 18/12/2012 22:23:41 -

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.

 
n/a

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
18th December, 2012 at 18/12/2012 22:59:42 -

Sup

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:
Image

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.

 
Professional vaporware developer

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
23rd December, 2012 at 23/12/2012 21:36:37 -

Just a quick one guys;

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.
Image

(Parts of the content blurred intently and added fantastic watermark because I've had less than good experiences with releasing shit prematurely before)

 
Professional vaporware developer

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1971

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
24th December, 2012 at 24/12/2012 14:06:55 -

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.

eg.
Image

 
n/a

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
25th December, 2012 at 25/12/2012 01:06:02 -

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.

Now this I can get my head around. Thanks Sketch!

 
Professional vaporware developer

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
25th December, 2012 at 25/12/2012 07:36:58 -

Using an array would be the normal way of doing this, especially when designing a game using a separate editor.

BUT this is MMF!!! We want this to be easy to construct levels with!

I was thinking about this today and I think it would be easier to have camera control objects that are used as boundaries for the camera.

Here, I made you an example of what I mean:
http://soapcow.com/hotlink-ok/CamControlExample.zip

 
n/a

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
25th December, 2012 at 25/12/2012 14:19:25 -

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.

Edited by Knockturnal

 
Professional vaporware developer

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
25th December, 2012 at 25/12/2012 18:53:40 -

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.

If you need any help doing this let me know.

Edited by UrbanMonk

 
n/a

Knockturnal

Nothing to see here turn back

Registered
  11/04/2008
Points
  354

VIP Member
25th December, 2012 at 25/12/2012 20:11:30 -

Herpaderp look what I found http://www.create-games.com/download.asp?id=8428

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.

Edited by Knockturnal

 
Professional vaporware developer

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49667

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
26th December, 2012 at 26/12/2012 08:20:31 -

That is a pretty awesome scrolling engine! Zephni's stuff is always good!

I think he has a few other example downloads that are worth checking out as well.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click