Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411496 Posts in 69373 Topics- by 58428 Members - Latest Member: shelton786

April 25, 2024, 06:54:48 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Transitions like MegaMan
Pages: [1]
Print
Author Topic: Transitions like MegaMan  (Read 875 times)
GregBTGS
Level 0
**



View Profile WWW
« on: October 04, 2015, 05:45:46 AM »

Just like in Mega Man
https://youtu.be/C9t5uPrRyig?t=2m25s
 
and the Legend of Zelda
 
https://youtu.be/wHaZrYX0kAU?t=26s

However there's some problems.


Every game room cannot be in one large room as this creates lag making rooms uneditable.

&

Player object cannot be persistent.

Here's what I've got



How it works:
  • create two surfaces
  • copies current room to first surface
  • draws first surface
  • moves to next room
  • copies room to second surface
  • draws second surface below first surface
  • scrolls surfaces until second surface is at 0,0
  • clears surfaces revealing game.

Running it in slow motion.


As you can see it causes the character to disappear for a split second.

My question is:
Is it noticeable?
How can it be improved?
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #1 on: October 04, 2015, 06:07:13 AM »

It is very noticeable, it would look a lot nicer if you kept the player at the same position relative to the terrain rather than jumping ahead.
Logged
GregBTGS
Level 0
**



View Profile WWW
« Reply #2 on: October 04, 2015, 06:25:53 AM »

It is very noticeable, it would look a lot nicer if you kept the player at the same position relative to the terrain rather than jumping ahead.
Yes easier said than done.

Unfortunately this

Is as good as I can get it without having to restart the game from scratch.

Taking any suggestions  Lips Sealed
Logged

Layl
Level 3
***

professional jerkface


View Profile WWW
« Reply #3 on: October 04, 2015, 06:49:42 AM »

It's better but it's still not very nice and makes gaps that give transitions between levels look very small and unimportant, there must be a better way you can do this.
Logged
Glyph
Level 10
*****


Relax! It's all a dream! It HAS to be!


View Profile
« Reply #4 on: October 04, 2015, 07:00:36 AM »

I would make sure that screen transitions occur in the midpoint between the rooms at the very least. This is in no way undoable, you can just have your transition objects only react when the player is in collision with them and they're touching the room's border. Speaking of the room's border, if you really want a MM or Zelda-like transition, you need the transitions to actually occur there - in your transition, the character is beginning in the middle of the screen. You shouldn't need to have overlap between area 1 and area 2 either.

So basically, when the player crosses the room boundary, you do what you said before. But when you copy the first room to the surface, it should catch the top half of the player. When you get the second room, it should have the bottom and they should hopefully align (you could do some fudging on the player's final y position to guarantee this is the case)
Logged


Glyph
Level 10
*****


Relax! It's all a dream! It HAS to be!


View Profile
« Reply #5 on: October 04, 2015, 08:02:42 AM »

https://www.dropbox.com/s/6wvzvd1m18iiqxi/transition.gmk?dl=0

Here's an example. If you set up your transitions on the room boundary then you can achieve something like this pretty easily. Since your rooms scroll, just maintain the xview/yview between rooms and everything should work out.
Logged


Zorg
Level 9
****



View Profile
« Reply #6 on: October 04, 2015, 08:31:41 AM »



In my opinion the camera has to respect/stop at the boundaries of rooms to achieve that effect. If the player reaches a boundary, freeze all movements and lerp the camera and the player into the new room simultaneously (c0 -> c1 and p0 -> p1 in the same time span) and unfreeze.
Logged
ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #7 on: October 04, 2015, 11:04:02 AM »

You could also make the player invisible for the first frame of entering a room, which would allow you to draw the player manually during transitions, which would allow you to make him move from his old position to his new one in the time of the room change animation.
Logged

GregBTGS
Level 0
**



View Profile WWW
« Reply #8 on: October 04, 2015, 12:03:39 PM »



In my opinion the camera has to respect/stop at the boundaries of rooms to achieve that effect. If the player reaches a boundary, freeze all movements and lerp the camera and the player into the new room simultaneously (c0 -> c1 and p0 -> p1 in the same time span) and unfreeze.
https://www.dropbox.com/s/6wvzvd1m18iiqxi/transition.gmk?dl=0

Here's an example. If you set up your transitions on the room boundary then you can achieve something like this pretty easily. Since your rooms scroll, just maintain the xview/yview between rooms and everything should work out.

Thank you for your suggestions and the example I will give it a go at implementing it!
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic