Jibble

Author Topic: Does AGS plays MP4 files? Or compressed video files?/Displaying isolated Images  (Read 1194 times)

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
800x600 = 1,333(3) = 4:3 = old tv size. If you want it to be 16:9 that won't work.

Stick with one of the green (or the "standard" 320x180) res. on that table.
I normally use 640x360 or 1024x576 .  But what I use is irrelevant, you should pick the resolution that best carries your art. If you have lots of small details, and want people to enjoy them, then the extra pixels will be appreciated and you should pick a higher res. If your art is simple or pixel art 320x180 might be perfect for your needs.
There are those who believe that life here began out there...

Ok, Thanks a lot :) Can you guess why my video froze? Was it because of the high resolution, or the number of frames (50)?

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Sorry, don't know enough to answer that.
Maybe the high resolution being bigger than the game itself?
AGS should be able to deal with high frame rate, though I can't see why you would such a high frame rate. Cartoons run fine at 15 fps, and movies and TV run at 25-30 fps. AGS defaults at 40fps.
There are those who believe that life here began out there...

Filipe, could you send us your test game? We could try to investigate why the video freezes.

It was only a test.

I converted my MP4 to OGV. I guess fullHD with 50fps was too much. After I convert my video to 800X600.
« Last Edit: 08 Jan 2020, 22:50 by Filipe »

Cassiebsg, is 1024 X 800 strange resolution? I look at my game, and notice that it was in this resolution. For me it looks good. What do you think? By the way Is 1280 X 800 too much, or 720p? I really need to have around 800 pixels vertically. Thanks :)
« Last Edit: 08 Jan 2020, 22:51 by Filipe »

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
If you need 800 then go with 800. But decide what aspect ratio you want. But at the end of the day, it's your game, so you decide.
I don't dabble into such high resolutions. But 1280x800 sounds like a "normal" screen resolution (at least is an option for my Graphic card), so it should be fine. So you need all those pixels to cry your game's art, then go with it.
Just keep in mind that the higher the resolution the bigger and more resource hungry your game will be.
There are those who believe that life here began out there...

Thanks again. I will go with 720p... I changed it and it looks the way it should be :)


Anyway, I'm just beginning here, so I have a lot of doubts. I come from video, after effects, and it is so much easier to do cut scenes that way, so I was wondering If I could mix a lot of video with playable gaming. I did a video, and try to play it before, but unfortunately, there is a pause/lag/fade in between the video and the part where you actually play. Is it possible to remove that pause? To make the transition shall we say instantaneously? Because with videos you can add a lot of animated things... and effects... like lighting, etc...

I thought maybe I could do a zoom in of a scene, and then, zoomed it out, before my character enters the room. So, if video doesn't work, maybe I could just display frames, until it zoomed out, and continue playing. Is it possible? I thought maybe I could use object as big as the room, and just play with the visible property... What is the best way? What are dynamic sprites? Or the zoom out features of the AGS, where I can learn about it (Crimson Wizard told me about them Thanks Crimson :))? Are there any video tutorials on that? What about Parallax scrolling?

Also, If I use the zoom functions, is it possible to play while the camera is zooming?

Last question, I love animating the rooms... Why are so few rooms backdrops? Only 4? Maybe AGS "should" allow for 8, or 16 frames per room... It is really difficult to do animated loops with only 4 frames, specially clouds animations in the sky :(

Thanks, and sorry about al these questions :)
« Last Edit: 11 Jan 2020, 09:22 by Filipe »

Replacing video with just animating a single sprite may not be a good idea. Video is streaming, which means (as you may know) that program does not load all the video at the same time, and only buffers number of frames. With sprites you would have to either load them all up at once, or script your own loading/deletion, which will probably work worse. Also, video may be just compressed better than sprites in AGS.

So, just one big animated object or animating room background is not a good equivalent for the video. When you replace video with in-game objects you should be ready to simplify animation and also split the animation between multiple objects.

The major question here is, how complex your animation is. May it be replaced with few objects moving around the room? Could you show a short example of your video? That would help to understand what you want to do, and figure out the best approach. Without it, our discussion will be quite abstract.

Last question, I love animating the rooms... Why are so few rooms backdrops? Only 4? Maybe AGS "should" allow for 8, or 16 frames per room... It is really difficult to do animated loops with only 4 frames, specially clouds animations in the sky :(

Although it's technically possible to increase max room backdrop count, it was never a high priority to do, because it's pretty inefficient to create long animations like this (as I explained above).
Usually people would create separate objects for each part of animation.
In my memory, room backdrops were used either for simple room-wide effects, such as raining on background, or simulating day time, or weather changes (one static background per variant).
« Last Edit: 11 Jan 2020, 11:39 by Crimson Wizard »

Thanks Crimson Wizard :)

What I want is like a pan down/up movement of the camera, or imagine, that I'm doing a close up, of a name of a street or something, and then do a pan right (with zoom out), and the main character appears, and then it change to an animated room static. I only need 5 or 6 frames before the static room show, so the room doesn't show always with a fade in. If you were able to just display frames, instantly on screen, you could easily do it (if the image is bigger then the room size), before the room shows, but without the fade in... Also, when you do video, there all all this sort of effects, you can add, like wind, sunshine, in different layers, etc, so the animation is more effective... Can you just display images with AGS? before the room appears on screen, with no delay (fade in)?

On the other hand, if you are doing an animated room, with  only 4 frames, it is difficult to to loop things, because you don't have margin to do fade ins, or fade outs. How can you animate the clouds in the sky with only 4 frames, and turn it to a loop, or the river flow, or the tide of the see, etc? 8 or 16 frames, per room, it would be fantastic... do you know if they working on it?
« Last Edit: 11 Jan 2020, 20:07 by Filipe »

Can you just display images with AGS? before the room appears on screen, with no delay (fade in)?

You can turn fade-in/out between rooms completely in the general settings (this is called "Default transition effect"), or run it the moment you like (script functions FadeIn() and FadeOut()).
You can display anything on screen either on room background, using room object, using Overlay, or using GUI. Objects and GUI buttons can also be animated using Views.
Any kind of additional effect may be added over the room using overlays and GUIs. For example, you may create a translucent GUI of certain color and simulate a fog or haze, or lighting effect.


On the other hand, if you are doing an animated room, with  only 4 frames, it is difficult to to loop things, because you don't have margin to do fade ins, or fade outs. How can you animate the clouds in the sky with only 4 frames, and turn it to a loop, or the river flow, or the tide of the see, etc? 8 or 16 frames, per room, it would be fantastic... do you know if they working on it?

You use room objects, or GUIs. Any object may be moved around and animated. Objects may have any number of frames per animation, in AGS this is done use Views.
Also, it's better to split complex animation into several objects to keep things efficient.
« Last Edit: 11 Jan 2020, 20:34 by Crimson Wizard »

Ok, thanks :) These are wonderful news :)

Can you just display images with AGS? before the room appears on screen, with no delay (fade in)?

You can turn fade-in/out between rooms completely in the general settings (this is called "Default transition effect"), or run it the moment you like (script functions FadeIn() and FadeOut()).
You can display anything on screen either on room background, using room object, using Overlay, or using GUI. Objects and GUI buttons can also be animated using Views.
Any kind of additional effect may be added over the room using overlays and GUIs. For example, you may create a translucent GUI of certain color and simulate a fog or haze, or lighting effect.


Hi again, I've tried using the Overlay on the before it enters the room function, and there was an error. It said I could not use the wait(). Also, when displying a video on that function there was only audio, and no video :(

Any way, If I use the Overlay  funtion, will I be able to play with my character? Or the wait() is also necessary? Thanks

On the other hand, if you are doing an animated room, with  only 4 frames, it is difficult to to loop things, because you don't have margin to do fade ins, or fade outs. How can you animate the clouds in the sky with only 4 frames, and turn it to a loop, or the river flow, or the tide of the see, etc? 8 or 16 frames, per room, it would be fantastic... do you know if they working on it?

You use room objects, or GUIs. Any object may be moved around and animated. Objects may have any number of frames per animation, in AGS this is done use Views.
Also, it's better to split complex animation into several objects to keep things efficient.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Quote
Hi again, I've tried using the Overlay on the before it enters the room function, and there was an error. It said I could not use the wait(). Also, when displying a video on that function there was only audio, and no video :(

You need to add those to After fade in, not before. Before fade in, means you are doing stuff before the screen is drawn to, which means you can't display any image, cause image is only shown after fade in. Before fade_in is used to setup the room, like placing the character, adjusting objects, and such stuff that you want to be ready when image is drawn.
There are those who believe that life here began out there...

Any way, If I use the Overlay  funtion, will I be able to play with my character? Or the wait() is also necessary?

Yes, you can keep it on screen while the game is going. For this you need to create a non-local variable to keep overlay on (otherwise it will be removed automatically).

For example:
Code: Adventure Game Studio
  1. Overlay *hangingImage; // declare Overlay variable outside of any function
  2.  
  3. function Room_BeforeFadeIn()
  4. {
  5.      // only create Overlay and assign to a variable here
  6.      hangingImage = Overlay.CreateGraphical(... parameters ...);
  7. }
  8.  
  9. function Room_Leave()
  10. {
  11.       // when leaving room, remove the overlay and reset variable
  12.       hangingImage.Remove();
  13.       hangingImage = null;
  14. }
  15.  

(Don't forget to link these functions on room events pane.)
« Last Edit: 12 Jan 2020, 14:21 by Crimson Wizard »

Ok Thank you guys for your help :)

I love AGS...I don't know, there is something about AGS, that it is addicting... :) I LOVE IT... It remind me those old days in front of ZX SPectrum.. :)  I like coding... engines such as Unity, etc. feel like cheating to me but, I just wish AGS had a better, or agraphic editor inside, also, a camera, so we could do zoom ins, etc... I just wish AGS had the basic 3D features of After effects... and a kind of new GUI (just for the camera) :(
« Last Edit: 13 Jan 2020, 23:01 by Filipe »

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Uhm? What do you mean with "no camera"? Did you not read CW's first post on this thread? I'll quote it here for you:

Hmm, depends on what exactly are you trying to do, but it's worth mentioning that AGS 3.5.0 supports full room zoom using Viewport/Camera script functions.
https://github.com/adventuregamestudio/ags-manual/wiki/UpgradeTo35#new-viewportcamera-system
https://github.com/adventuregamestudio/ags-manual/wiki/Camera
https://github.com/adventuregamestudio/ags-manual/wiki/Viewport

I did not mentioned it because it's rather new and I forgot about it.  :-[
There are those who believe that life here began out there...

Great :) Tell me, if you had a camera, what resolution should you use? If you are doing zoom ins, so it wan't come out very pixelated...

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
I can't answer that, I haven't even tried to use to, so have no idea.
But the fact that you do have a camera, means that you can have the resolution of your game at one size (keep the one you decided on) and encode your video at a higher res and zoom in. So my only advice here, is experiment!
Make a small clip (like 15-20 seconds or so) of your video at different resolutions, and experiment zooming in and out each one. Until you have found your favorite.
There are those who believe that life here began out there...

Great :) Tell me, if you had a camera, what resolution should you use? If you are doing zoom ins, so it wan't come out very pixelated...

Because AGS uses bitmaps for sprites, not vector graphics or models, no matter what you do, when zooming in things will become pixelated. The resulting effect depends on what game resolution you chose and how much zoom you do.

The best way to see is to try it yourself with different test scenes. AGS is an old engine, so it's quite possibly not suit for your needs.
« Last Edit: 14 Jan 2020, 07:20 by Crimson Wizard »