how to show a short video before the game

Anything libgdx related goes here!

how to show a short video before the game

Postby TruePlayer » Sun Aug 11, 2019 10:32 pm

before the gameplay begins (running animation and parallax movement) I would like the user to see a short animation, for example, where a character breaking a window runs out into the street to run away, how to achieve such an effect?
TruePlayer
 
Posts: 103
Joined: Sun Jul 28, 2019 12:22 pm

Re: how to show a short video before the game

Postby shatterblast » Mon Aug 12, 2019 5:44 am

The best option right now I know of is "gdx-video", which sort of serves as abandon-ware. LibGDX dropped support for videos several years back. You may find the old repo here:
https://github.com/libgdx/gdx-video

I highly recommend updating all dependencies in the build.gradle and pom.xml files in the root folder of the project after forking it to your GitHub account. You can probably get the Desktop stuff to work reasonably well, but I have serious doubts about the Android side. Still, if you want to explore and feel like updating all the appropriate dependencies, Android might work. For Desktop, I believe that your computer of choice needs "ffmpeg" locally installed.

Also, I suggest avoiding the urge to pull from AdMob's stuff, because its structure applies to mobile ads, not short full-screen movies.

Now, if you felt like rendering something frame by frame and adding a Music object to it or similar, then it may work sort of okay. However, it would be relatively expensive performance-wise and also towards storage if you did it full-screen, especially in comparison to an actual video. That approach involves a sprite sheet.
shatterblast
 
Posts: 414
Joined: Sun Jul 06, 2014 1:14 pm

Re: how to show a short video before the game

Postby bmanmcfly » Tue Aug 13, 2019 6:36 pm

Why was video abandoned?

I mean was it more an issue of cross platform compatibility?
bmanmcfly
 
Posts: 44
Joined: Fri Oct 30, 2015 4:09 am

Re: how to show a short video before the game

Postby AnimeJoex » Tue Aug 13, 2019 8:42 pm

I did a short intro video sequence in one of my prototypes the expensive way. It worked, but was a little cumbersome and I imagine that the draw calls were a little on the astronomical side. ;) But still, it was fun.
AnimeJoex
 
Posts: 5
Joined: Thu Aug 08, 2019 1:25 am

Re: how to show a short video before the game

Postby shatterblast » Tue Aug 13, 2019 9:14 pm

bmanmcfly wrote:Why was video abandoned? I mean was it more an issue of cross platform compatibility?

I think there were a series of issues at the time that would make integration slow, and now these days, LibGDX mostly stays in maintenance mode. A few new features slip in here and there, but you might notice that the majority of new things that qualify as "features" come from the open source efforts of others, like Raeleus and MrStahlfelge just to name two individuals. "Ffmpeg" probably wouldn't be much of a hassle to package with an installer for a Desktop build. I don't know if the video technology of Android 4 will work with 9. The support libraries are compatible at least.
shatterblast
 
Posts: 414
Joined: Sun Jul 06, 2014 1:14 pm


Return to Libgdx

Who is online

Users browsing this forum: MSN [Bot] and 1 guest