• 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 Easy way to do cutscenes in code?

N

Noba

Guest
So I'm struggling to come up with a way to do cutscenes using code. My main problem is timings and all that, I'm not sure how I'd do it with code and all that. Does anyone have any advice or know an easy way of doing it?
 

obscene

Member
This is what timelines are for, check them out. Basically it works by running lines of code at specific times. It's about the same as using a controller object and setting up a bunch of alarms. I don't have much experience with it myself as my cutscenes are all "live" which is another way to do it. Just program a bunch of objects to work in a sequence. Thing moves this way, when it gets to this point it creates something else, that does something, etc. Many ways you could approach this depending on exactly what it is you want to happen.
 
N

Noba

Guest
This is what timelines are for, check them out. Basically it works by running lines of code at specific times. It's about the same as using a controller object and setting up a bunch of alarms. I don't have much experience with it myself as my cutscenes are all "live" which is another way to do it. Just program a bunch of objects to work in a sequence. Thing moves this way, when it gets to this point it creates something else, that does something, etc. Many ways you could approach this depending on exactly what it is you want to happen.
Alright cool, thanks!

What I want to do is pretty simple, I'm just trying to make a cutscene which just sets up the events of the game by showing the planet it's set on with just text showing up, but for some reason I can't get the alarms to work.
 

obscene

Member
I wish there was a good tutorial out there for this type of thing but I don't think I've ever seen one. It can be challenging. I just did one that is sort of a flashback to a boss battle. I had to come up with a system that not only switched back to that room but set all the many parts of the boss back to the exact same state they were in when we left. Was a pain, all sorts of things were going wrong. Lots of trial and error and a big mess of sloppy code I hope I never have to go back and fix.
 
W

Wraithious

Guest
I've allways used the draw event for my cut scenes, basically I have a global pause variable, and a global cut scene variable, when both are true my game objects stop and then a cutscene object draws a series of backgrounds in the end step draw event, controlled by an incrementing variable in the step event to change the background being drawn, then after the last background is drawn for the specified time just set the 2 global variables back to 0 and the game resumes.
 
Last edited by a moderator:
D

David Berkompas

Guest
Shaun Spalding, on his Patreon page, has mentioned his next video is going to be on cutscenes. Since I'm new here, for all I know the OP may be Shaun looking for resources.

If that's the case, never mind my rambling.


Dave
 
Top