GameMaker: Studio

GameMaker: Studio

View Stats:
Blind Sep 4, 2013 @ 11:29am
I'm making a Castlevania style game, need help with room transits.
In Castlevania, the rooms transition smoothly: You can see the player pass the door as it scrolls to the next room.

On the other hand, a similar game "8 Eyes" used instant room transitions without scrolling. (This is what I'm currently using)

I'm using a room to room transition system and am designing on a room to room level and didn't know how to get that smooth Castlevania door workings when transitioning between two rooms.

Best I can come up with is to Mirror the next room in the current room, slowly scroll over to it, and then "instant" transition to the next room. If all the objects are lined up then it should appear seamless.

See Also: Megaman Boss Doors
< >
Showing 1-11 of 11 comments
Keys Sep 4, 2013 @ 11:47am 
You could snap a screenshot of your current room layout.
Then have the game move to the next room internally.
Display that picture in the new room, and have it slide off the screen.

I have a feeling that's what you mean, right?
Alainxyz Sep 4, 2013 @ 11:50am 
All a room is in game maker is a list of tiles and objects. When a room is loaded, game maker just deactivates or destroys all the instances of the previous room (depending on if you set the room to persistent), load up the backgrounds and tiles, and creates or activates the next room.

So if you want room transitions with scrolling, you have two options. Make a second room identical to the previous room at the enterance, and ignore everything else in it, or have one room, and use controller objects to deactivate and activate tiles and objects.

As for that smooth motion, you would have to program a view controller that moves the view appropriately when you enter a new room, using the variables view_xview and view_yview. So in essence, games like castlevania had one room, but deactivated regions when appropriate.

Also read up the documentation on Deactivating instances. Hope this helps.
http://docs.yoyogames.com/source/dadiospice/002_reference/objects%20and%20instances/instances/deactivating%20instances/index.html

EDIT: Key's suggestion is actually really good, only problem is, the snapshot function is very glitchy in game maker. Better to use a surface that captures the current view_surface on that frame.
Last edited by Alainxyz; Sep 4, 2013 @ 11:51am
disKO Sep 4, 2013 @ 2:40pm 
Put all the levels in one room.
Use view_xview to scroll the screen whenever the character is outside the view or reaches a certain x point.
For example, if Player.x > 160 and view_xview < 320 view_xview += 1
So once the player reaches the right side of the screen, the xview will incease until it pans over to the right side of the second level.
Blind Sep 4, 2013 @ 2:49pm 
Putting all the levels in one room is untenable. Putting all the sub-stages of a single level into one room would work, but doing things on a room to room level is much easier to collab.

+Actually, whole stages don't even need to be one block. There's no level in castlevania that did not use "stairs" (that I know of). I'd only need to use contiguous sub-stage rooms for sub-stages with door transitions
Last edited by Blind; Sep 4, 2013 @ 2:53pm
Scarabian Sep 4, 2013 @ 6:30pm 
I would be inclined to try surfaces for your transitions I would need to look at it in some detail but the speed that you need and flexibility seems to lend itself to the surface facility.
Keys Sep 5, 2013 @ 2:18am 
So would you agree that my solution would work, by using surfaces like others suggested? :P
Blind Sep 5, 2013 @ 10:38am 
Not sure, I've never used surfaces before and have to test them out.
Scarabian Sep 5, 2013 @ 11:45am 
Check this out convinced me of the power of surfaces in GM http://www.youtube.com/watch?v=HvLY5QB2m7k
Blind Sep 5, 2013 @ 12:01pm 
That's neat. I didn't use objects for terrain destruction; I changed the Tile layer, which is faster than objects, but probably slower than surfaces.
Keys Sep 6, 2013 @ 3:23am 
I'd say the speed between the 2 is negligible, surfaces are pixel perfect, while tiles are just blocks of pixels. But I thought this was about room transitions, not about destroyable terrain.

If you want I could write some code for you as to how to capture a room as a surface, so you can use that as your room transition.
Last edited by Keys; Sep 6, 2013 @ 3:24am
Scarabian Sep 6, 2013 @ 6:00am 
The tutorial is about destroyable terrain also the tile background is a different surface it is just to illustrate the flexibility of surfaces. When I saw that tutorial it made surfaces a whole lot more understandable fo rme.
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: Sep 4, 2013 @ 11:29am
Posts: 11