• 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!

Graphics Cutscenes/cinematics?

C

Chironyx

Guest
I'm not sure if this is the correct place to ask this but...
I want to create some cool cutscene animations in my game, to give it a good feeling, question is, what is the common way to do so?
I'm planning on 2D pixelart things, nothing too heavy

I'm guessing there's either a way to play a video I made in an animation software (will this option cause a short blackscreen before and after I play the scene? it kinda ruins continuity), or that I can create the scene object by object, sprite by sprite, with code and al (which sounds frustrating and alot of work, I would have to run the game everytime I want to check how to scene looks, to fix coordination between interacting sprites, etc etc, or is it? is there a simple way to do this?)

I've tried looking up tutorials on cutscenes/cinematics, but it seems literally no one ever touched the issue, I guess people who teach how to use gamemaker don't really use the type of scenes I'm talking about in their game

here at 1:20 is an example for a VERY over-the-top engaging scene:


In an animation program, this seems possible, a long work, but not as frustrating, but creating something like this with plain code feels like very hard work, where things go wrong alot and require alot of fixing and about 10 times the diligence, imagine the mess of objects, x and y position coordination rather than moving between frames to confirm position, etc etc...

So, sorry for the wall of text, but does someone have anything for me?
 
A

AndrewFM

Guest
There's no particularly good way to do this, and the playing-a-video route would probably be the one that will cause you the least amount of headaches... the main reason being that it'll give you the freedom to actually use a program that's designed for animation to make your animations. Game Maker, while they offer certain features like Timelines to help facilitate making cutscenes, is really not designed for stuff of that complexity.

Hyper Light Drifter, for example, is a game maker game that does its main cinematics using this method. They use the cctVideoPlayer extension from the GM Marketplace to play the video files.

The biggest issue with going the coding route is, as you said, it's difficult to tweak the animations. With a naive approach, you'll have to constantly recompile and rerun you game for every little tweak... and making good cutscenes requires a lot of tweaking. This is an issue I've run into a lot, so personally I've built a little timeline-animation engine in Game Maker to allow me to alter the values of variables at runtime. I accomplish this mainly using ds_maps. Here's some examples of it being used for various animation stuff:


Given that I made this for my own use, though, I wasn't concerned with making it particuarly accessible or intuitive to use. If there's actually demand for this sort of thing, I could maybe try to polish it up and release it in the marketplace...
 
C

Chironyx

Guest
There's no particularly good way to do this, and the playing-a-video route would probably be the one that will cause you the least amount of headaches... the main reason being that it'll give you the freedom to actually use a program that's designed for animation to make your animations. Game Maker, while they offer certain features like Timelines to help facilitate making cutscenes, is really not designed for stuff of that complexity.

Hyper Light Drifter, for example, is a game maker game that does its main cinematics using this method. They use the cctVideoPlayer extension from the GM Marketplace to play the video files.

The biggest issue with going the coding route is, as you said, it's difficult to tweak the animations. With a naive approach, you'll have to constantly recompile and rerun you game for every little tweak... and making good cutscenes requires a lot of tweaking. This is an issue I've run into a lot, so personally I've built a little timeline-animation engine in Game Maker to allow me to alter the values of variables at runtime. I accomplish this mainly using ds_maps. Here's some examples of it being used for various animation stuff:


Given that I made this for my own use, though, I wasn't concerned with making it particuarly accessible or intuitive to use. If there's actually demand for this sort of thing, I could maybe try to polish it up and release it in the marketplace...
You were right, the "play-a-video" route went great, and someone suggested a way to do it on another forum that works:

I can take all the frames from an animation and put them inside a single object, then make a room for that object with the speed I want (24 fps in my case) then set the object image_speed to 1.
The transition is immediate so it feels like an immediate-action which is great, and I can make GMS transfer the player to the next room as soon as it ends, basically, I can make a room where the player and all the objects
around him are in the exact same place, so the player never even realizes he moved rooms.

This worked out great so far, I tested it on an animation I made with 77 frames, it moved to the room immediatly, played it perfectly, and returned to a room I specified when it ended

I then tested it on an animation with 400 frames, exactly the same results, and if there IS a limit on frames inside an object, I can just make as many objects as I need for an animation (when "part 1" ends, I can make "part 2" immediatly appear in that instant, letting me show an animation as long as I'd like)

No need for a pricy VideoPlayer extension for this animator!
Also, your modification engine looks like a great idea, I don't see why not make a little cash off of it!
 
A

AndrewFM

Guest
Be careful doing it that way, as all those frames are going to clog up your game's texture pages, and can explode your game's memory usage to prohibitive levels. The thing with video players is that typically you'll be streaming the video, rather than loading the video in its entirety into RAM.

Doing it that way with 77 frames of lowish-resolution images might be acceptable... but if you wind up doing like hundreds of 1280x720 high definition frames or something, it's going to quickly turn into a very big problem.
 
C

Chironyx

Guest
Be careful doing it that way, as all those frames are going to clog up your game's texture pages, and can explode your game's memory usage to prohibitive levels. The thing with video players is that typically you'll be streaming the video, rather than loading the video in its entirety into RAM.

Doing it that way with 77 frames of lowish-resolution images might be acceptable... but if you wind up doing like hundreds of 1280x720 high definition frames or something, it's going to quickly turn into a very big problem.
Damn, I totally forgot that gamemaker uses texture pages, I need your 2 cents on this:



This gif here, even at 300% it's size, is only 800KB
The folder containing the PNGs at their original size is 5.56MB and 6.46MB on disk
This GIF is the one with the 400 frames in it, of course my game will have GIFs with much more detail then this simplistic work (in the same pixelart style though)
Correct me if I'm wrong, but at this size I can basically put ALOT of them in without affecting the RAM too much.. right?
And you're saying that the more scenes I have, the more RAM the game will use in general, regardless of if the scene is playing or not? or are you saying I should watch the RAM while a scene plays and see where it peaks?
 

BLang

Member
Your best bet is to make your own animation engine in GMS, that will use the sprites that you want, move them how you want, and, most importantly, be able to save to some kind of ds_list/grid/map/whatever else, wherefrom you will be able to read the frames of the animation and properly display them in your game.

Having sprites with hundreds of frames is generally a bad idea because those are going to use up texture pages upon texture pages. At that point, your main problem won't be RAM, it's gonna be managing texture pages, and doing that in GM is more trouble than it's worth. For example, the gif you posted above has 400 frames at 800x400 pixels each. That's a total area of 128 million pixels. If your texture page size is 1024x1024, that means that just this one cutscene is going to take up 122 texture pages - all of which have to be loaded in when the cutscene starts playing. And that's a pretty short cutscene. You can imagine what would happen if you had a full game made this way.

Using a video extension is pretty safe also, but it limits to what platforms you can ship your game.

Your last option is coding all the cutscenes yourself, one by one, by hand. And that's a lot of boring work. But, depending on how big your game is, this might actually turn out to be the fastest and most compatible way to do it - making your own cutscene engine is going to take a lot of time, and when that's done, you still have to make all your cutscenes.
 
C

Chironyx

Guest
Your best bet is to make your own animation engine in GMS, that will use the sprites that you want, move them how you want, and, most importantly, be able to save to some kind of ds_list/grid/map/whatever else, wherefrom you will be able to read the frames of the animation and properly display them in your game.

Having sprites with hundreds of frames is generally a bad idea because those are going to use up texture pages upon texture pages. At that point, your main problem won't be RAM, it's gonna be managing texture pages, and doing that in GM is more trouble than it's worth. For example, the gif you posted above has 400 frames at 800x400 pixels each. That's a total area of 128 million pixels. If your texture page size is 1024x1024, that means that just this one cutscene is going to take up 122 texture pages - all of which have to be loaded in when the cutscene starts playing. And that's a pretty short cutscene. You can imagine what would happen if you had a full game made this way.

Using a video extension is pretty safe also, but it limits to what platforms you can ship your game.

Your last option is coding all the cutscenes yourself, one by one, by hand. And that's a lot of boring work. But, depending on how big your game is, this might actually turn out to be the fastest and most compatible way to do it - making your own cutscene engine is going to take a lot of time, and when that's done, you still have to make all your cutscenes.
Considering my knowledge in GML, which is literally the only langauge I know right now, I lack the necessary education to create my own animation engine, a task that would probably tackle GML experts, I wouldn’t even know where to begin, so that’s crossed off the list for being downright impossible

You say the method I was fixed upon will cause huge compability issues, (this GIF is 300% it’s regular size btw, for the sake of display, but I guess that’s not relevant), so I guess I can’t use that as well

Programming in the scene would be the longest option, wouldn’t it? Not only would I have to mess around for hours for correct positions, speed, camera angles and such, I’d have to create the animation in a seperate program first because, without reference, complicated scenes will be a hell that costs me precious development time that could have been used to noticeably progress my game.
So this option is extremley time consuming, and as a result, off-putting the will to make the game and rate at which I develop my game...

So, to the final option, buying and using the video extension that was reccomended to me,
This seems like the best option, aside from cost, I can have smooth video playing the animations I made, as simple and comfortable as it gets, as long as there’s no “black screen ticks” before and after the video plays that might ruin the continuity (though it seems that even if that’s the case, guess I’ll just have to live with it)
But what was it that you said about it limiting my platform export options? Do you mean just IOS and Android, or everything but windows?

To sum this wall of text.. Is GameMaker Studio even a good option for what I want? Should I cut the losses and try moving an engine..? I spent the past few months studying courses, but if there’s a good time to move, it’s as early as possible..
 
A

AndrewFM

Guest
The cctVideo player I posted earlier supports Windows, Mac, and Ubuntu. For HTML5, there's HTML5 Video Control, and exVideo HTML5. The only platforms that may be problematic are IOS and Android. There apparently used to be a video playing extension on the marketplace by PlayLight Studios for mobile, but it seems to have been taken down. The only remaining one that supports mobile is FMV Edge, but the author describes it as experimental, so use at your own risk.
 

BLang

Member
Yes, I did mean iOS and Android, shoulda made that clear from the getgo.

Trust me, GMS is THE tool for 2D videogames. Not only would doing this in a different engine be just as hard/even harder, but you'd have to relearn the language, the IDE, etc. Few tools are as intuitive as GMS!
 

Khao

Member
You can create cutscenes by animating them in an external program (such as Spine) and then just play them as animations when necessary. The game I'm currently working on uses this method and it works perfectly.
 
C

Chironyx

Guest
The cctVideo player I posted earlier supports Windows, Mac, and Ubuntu. For HTML5, there's HTML5 Video Control, and exVideo HTML5. The only platforms that may be problematic are IOS and Android. There apparently used to be a video playing extension on the marketplace by PlayLight Studios for mobile, but it seems to have been taken down. The only remaining one that supports mobile is FMV Edge, but the author describes it as experimental, so use at your own risk.
I will only be needing cctVideo player in that case, guess one who wants quality must pay the price!

Yes, I did mean iOS and Android, shoulda made that clear from the getgo.

Trust me, GMS is THE tool for 2D videogames. Not only would doing this in a different engine be just as hard/even harder, but you'd have to relearn the language, the IDE, etc. Few tools are as intuitive as GMS!
Alright, I'm not planning cutscenes for any mobile game, so that's fine, and if I will be, programmed simple ones will have to do, all mobile games are pretty simple anyways, especially 2D ones.
And okay, I was just making sure, I love GameMaker and really don't feel like moving after all I've seen and done haha, thanks for the advice!

You can create cutscenes by animating them in an external program (such as Spine) and then just play them as animations when necessary. The game I'm currently working on uses this method and it works perfectly.
In case you didn't read the other responses, I've been through the suggestion of this method, but playing them as an animation from a sprite inside an object can use a HUGE amount texture pages (the image files gamemaker uses to store your sprites and sprite frames on), which in turn can cause huge compability issues because of excessive use of RAM...
 

Morendral

Member
In case you didn't read the other responses, I've been through the suggestion of this method, but playing them as an animation from a sprite inside an object can use a HUGE amount texture pages (the image files gamemaker uses to store your sprites and sprite frames on), which in turn can cause huge compability issues because of excessive use of RAM...
You aren't understanding what spine is. Basically it moves sprites around on the screen by just storing where, how, and when they are displayed. For your cutscene you would only have a few sprites to have on a texture page. Check it out in the documentation
 
C

Chironyx

Guest
You aren't understanding what spine is. Basically it moves sprites around on the screen by just storing where, how, and when they are displayed. For your cutscene you would only have a few sprites to have on a texture page. Check it out in the documentation
I just checked it out
Basically it just lets you move parts of a sprite, say the arms, to make it animate, doesn't it?
It wouldn't let someone take frames and use them efficiently as a scene though.. only to animate a single character, that way I still have to make the cutscene inside of gamemaker instead of inside an animating program...
 
There's no particularly good way to do this, and the playing-a-video route would probably be the one that will cause you the least amount of headaches... the main reason being that it'll give you the freedom to actually use a program that's designed for animation to make your animations. Game Maker, while they offer certain features like Timelines to help facilitate making cutscenes, is really not designed for stuff of that complexity.

Hyper Light Drifter, for example, is a game maker game that does its main cinematics using this method. They use the cctVideoPlayer extension from the GM Marketplace to play the video files.

The biggest issue with going the coding route is, as you said, it's difficult to tweak the animations. With a naive approach, you'll have to constantly recompile and rerun you game for every little tweak... and making good cutscenes requires a lot of tweaking. This is an issue I've run into a lot, so personally I've built a little timeline-animation engine in Game Maker to allow me to alter the values of variables at runtime. I accomplish this mainly using ds_maps. Here's some examples of it being used for various animation stuff:


Given that I made this for my own use, though, I wasn't concerned with making it particuarly accessible or intuitive to use. If there's actually demand for this sort of thing, I could maybe try to polish it up and release it in the marketplace...
Let us know if you happen to release one of these tools, Send me a message if you are interested in working with us on implementing such a system for a solid price.
 
Top