• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE Does GameMaker 2.0 have better support for video files?

I want to use a video file as a background to my game, this is proving next to impossible on GM1 without marketplace extensions. Does GM 2 have better support for video files, can anyone tell me?
 

Sandro

Member
You really don't want to do that. Just think about that very large, constant stream of data being transferred from SSD/HDD to RAM and then to Graphics every frame, bogging down the data BUS and the CPU as it needs to decompress it. As a background this would eat away at your games performance. Look into using timelines instead. Videos would be nice for intros and cut scenes thou.
 

gnysek

Member
You really don't want to do that. Just think about that very large, constant stream of data being transferred from SSD/HDD to RAM and then to Graphics every frame, bogging down the data BUS and the CPU as it needs to decompress it. As a background this would eat away at your games performance. Look into using timelines instead. Videos would be nice for intros and cut scenes thou.
When you watching youtube, you care about it? Video in GMS would use less resources, as browsers are observing lot of DOM/JS events while you watching and redrawing screen all the time. Also, (compressed) videos were able to play even on PlayStation One which have 1MB of memory, so saying "bogging down data BUS and CPU" is just wrong. Of course, playing HD at high quality may require it, but playing at youtube quality with 720p or less shouldn't be so killing.
 

Juju

Member
You really don't want to do that. Just think about that very large, constant stream of data being transferred from SSD/HDD to RAM and then to Graphics every frame, bogging down the data BUS and the CPU as it needs to decompress it. As a background this would eat away at your games performance. Look into using timelines instead. Videos would be nice for intros and cut scenes thou.
The videos were (originally) the only parts of Hyper Light Drifter that ran above 60FPS.
 

Sandro

Member
When you watching youtube, you care about it?
no, i'm not playing a game WHILE watching youtube; if both are running, one is paused.

Video in GMS would use less resources, as browsers are observing lot of DOM/JS events while you watching and redrawing screen all the time.
sort of, although the DOM shouldn't be changing while a video is being played. When a web page is loaded the browser uses CPU power to construct the DOM and render the page, but then it becomes static until some Javascript decides to change it, which should not happen when the user is playing a video, but rather when the they click on things.

Also, (compressed) videos were able to play even on PlayStation One which have 1MB of memory, so saying "bogging down data BUS and CPU" is just wrong. Of course, playing HD at high quality may require it, but playing at youtube quality with 720p or less shouldn't be so killing.
During Gameplay? As I said in my previous post, Intros/Cutsenes are not a problem as long as the game's not playing, the video can use all the CUP power it wants. The original post specifically asked to use a video as the background, which means it would need to be running at the same time as the game. It also worth mentioning that the TOTAL amount of memory needed is not the issue. Keep in mind when you play a video The video is loaded from the file, to ram, decompressed by the CUP, back to ram where it's stored in a buffer until being transferred to graphics. This happens frame by frame, so only a small part of the video is being stored on ram at any given time. The issue here is the transfer from disk-to-ram-to-cup-to-ram-to-graphics, every frame. This is quite a bit of memory, witch any computer can handle as long a it's not trying to play a game at the same time. Granted a powerhouse gaming PC, boasting a quadcore whatever could, but average computers could not. Mobile phone defiantly could not. Also, btw the PS1 had 4mb of memory.

Edit: Well given a very simple game and/or low res video it could work, but it's very wasteful. A large game with full 1080p Video won't; so it'll generally fore you to either compromise video quality and/or gameplay; not recommended when the are far more efficient way to achieve an animated background. Timeline, Particles Effects, Paths, Shaders, ect will give you a lot more control if tiles/objects aren't enough. Heck, in most cases, it would prolly be more efficient to run all that at the same time, then to play a video.
 
Last edited:

gnysek

Member
During Gameplay?.
Yes, during gameplay. In Final Fantasy games (7, 8, 9), you were able to move your player over video playing in background in some places. Those were short cutscenes, but they were.

Edit:
- from 4:35
 

GMWolf

aka fel666
You can check all functions in GMS2 here: http://docs2.yoyogames.com/

But, answer is - no. Except of layers, and removing some d3d functions, features are nearly same.
That is untrue.
There now are tilemaps.
As in, REAL tilemaps, not the useless garbage GM had before.

There is also a couple neat language features like array literals. An audio mixer. A new camera system...

But still Jo video support :'(
 

Sandro

Member
@gnysek, alright well you got me there.

I fell like the above video overall is a good example on how to do various tricks with scenes and backgrounds, so I like to go in to detail on how that was done.
0:04 - This is a repeating background, with a blur effect(as part of the image) scrolling at a fast speed. Same with 0:28
0:38 - Shaky View

2:08 - Is entirely video except for the 3 main characters. Same with 4:35
This works, because there is very little going on besides the video at that exact moment. What's loaded in ram doesn't matter here, it's the transfer between ram,cpu and graphics. SquareSoft was very good at switching back and fourth, even rendering a few models to make it seamless. Keep in mind tho, there is a reason why the hole thing isn't a video -- and it's not just because that game was already 4 discs. It's not impossible, but with a video running you don't have much room to work with.

Edit: The old FF game in general kept to a low polygon count, just so they could afford to rapidly swap out large pre-rendered images and video, by loading the next image ahead of time before it was really needed. Compare that to the Resident Evil games for example. Tho that not much of an issue today given much faster loading times.
 
Last edited:

gnysek

Member
@Sandro: Please run any HD file on your PC, and check how many resources video player takes. Then, stop this discussion, as playing video in GameMaker wouldn't kill it's performance, especially if playing a movie would stop rendering game. There are extensions for 1.4 which does that, so I see no issue here - it's just not supported as default, and I didn't saw yet extension which will support most of platforms (let's say Win/Mac/Linux/HTML5/Android/iOS at lest).
 

GMWolf

aka fel666
@Sandro: Please run any HD file on your PC, and check how many resources video player takes. Then, stop this discussion, as playing video in GameMaker wouldn't kill it's performance, especially if playing a movie would stop rendering game. There are extensions for 1.4 which does that, so I see no issue here - it's just not supported as default, and I didn't saw yet extension which will support most of platforms (let's say Win/Mac/Linux/HTML5/Android/iOS at lest).
This will depend on the encoding. Some are more demanding than others.
But there have been formats developed specifically for games. Like bink, for example.
 

gnysek

Member
This will depend on the encoding. Some are more demanding than others.
But there have been formats developed specifically for games. Like bink, for example.
Exactly. I know games from 1980-1990 which have videos and at those times PC have no problem to play it, so why they should have now?
 

DeScruff

Member
During Gameplay?
Were you around PC gaming in the early 90s? There were a million "FMV" games - and not all of them were "press the button at the right time or you die" kind. You had adventure games like Phantasmagoria 1 & 2.
Or games like Hot Wheels Stunt racer, where the whole track was actually a video.

As for PS1... Well there was that PS1 game: Fear Effect (also Fear Effect 2).
It used prerendered backgrounds like the old Resident Evil games, but instead of the background being static bitmaps, the backgrounds were animated via looping video files.
 

Juju

Member
I semi-watch YouTube videos whilst devving on my 4-year-old coal-powered laptop and I see comfortable triple digit framerates. ¯\_(ツ)_/¯

Don't think we can make solid judgements on this until someone goes ahead and tries it. Bit early to completely discount it, mind.
 

GMWolf

aka fel666
And if you are worried about mobile platforms, SOCs have dedicated silicon for video decoding.
 

zbox

Member
GMC Elder
Feel like my input might be slightly valid here!

You really don't want to do that. Just think about that very large, constant stream of data being transferred from SSD/HDD to RAM and then to Graphics every frame, bogging down the data BUS and the CPU as it needs to decompress it. As a background this would eat away at your games performance. Look into using timelines instead. Videos would be nice for intros and cut scenes thou.
GMLVideo is actually extremely memory footprint and CPU usage light for what it is, hence you can run quite a few moderately high resolution videos all at once and still maintain a really great frame rate/lots of room to budge for game logic. This is also how you can get such great performance on mobile, which I feel addresses this:
The issue here is the transfer from disk-to-ram-to-cup-to-ram-to-graphics, every frame. This is quite a bit of memory, witch any computer can handle as long a it's not trying to play a game at the same time. Granted a powerhouse gaming PC, boasting a quadcore whatever could, but average computers could not. Mobile phone defiantly could not.
Got some very nicely fitted HDD streaming happening, you should check it out! Runs well on some very old phones.

Happy to answer more questions ;)
 
Top