• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GML Draw surface without player in it

N

NeZvers

Guest
I want to make room transition similar to (Bloodstained: Curse of the moon and old Megaman games) by having old room last image and move the camera to new and move character over.
For that, I need a separate background image from the character. How can I do it?
 

Slyddar

Member
Just have a check in the player draw event, so that when you are drawing your transition, you are not drawing the player. Not sure if you're aware, but draw_self() is the code that will draw the sprite as normal.
 
N

NeZvers

Guest
@TheSly I'm very aware of it. But thing is that transition happens in step event and player is already drawn in application surface.
I tried to disable player before drawing application_surface to transition surface and activate after surface target reset, it still had player drawn on transition surface.
 

Slyddar

Member
Maybe something is wrong with the ordering, or the code, then, as the concept is correct. Set a flag as soon as the transition starts, and in the player draw event, ensure however you are drawing the player is not happening if that flag is set. Even if your transition starts in the step, that game step hasn't started drawing the application surface until the Draw Begin event anyway.

I've done similar things before, but by using a transition object. Whenever the transition object exists, the player does not do certain things. Similar concept, but it should work the same.
 
I imagine it would be that they are grabbing the surface before the new frame that is going to be drawn without the player is passed through (basically as you are saying TheSly).
 
D

Danei

Guest
The way I do this in a project is to make my player invisible immediately when they reach the room transition point, and set an alarm to 1, then the code for the actual transition goes in the alarm. There are probably other more elegant ways to do this but this ended up achieving the effect I want.
 
N

NeZvers

Guest
I am using transition object, which is created by cutscene object, which is triggered by trigger object (so I don't have separate triggers for all stuff I do it via cutscenes).
Weirdly when I set player invisible before creating obj_transition, player is invisible, but if I do the same in obj_transition creation event before everything else player is seen on surface.
I couldn't find anyone doing tutorial for thing like this only fake room transitions within same room. Any suggestion for this situation?
 
Top