Can I put some video in Defold?

Is a video player which works on all supported export platforms on the roadmap, or is video going to remain limited to macOS, iOS and Android?

1 Like

The extension is open so anyone can extend it / pay someone to.

I meant on the roadmap by King, but thanks for the info.

the idea of the engine is that is offers a set of very stable core. And even the core is strippable, so game developers can build their games according to their needs. Video player and many other things can be added as extensions, written by other game developers, within, or beyond King.

tl;dr; - the extension is the way to go. If you donā€™t like it, it is open source, so youā€™re very welcome to make it better.

4 Likes

Thanks guys, and hello Oleg! :slight_smile:

4 Likes

It shouldnā€™t be that hard to get the extension to work on more platforms. The libs itā€™s based on supports a ton of platforms.

3 Likes

Canā€™t wait to play with this tomorrow! Hope it still works in 2020

This extension was our first, and was basically an example of what you could do with native extensions.

If you want a true native videoplayer (e.g. with sound), you probably want:

This one was developed by the Pet Rescue Puzzle Saga team to show tutorials between their levels (download the game to see it in action).

4 Likes

I donā€™t need sound but I do need it to work on Mac! So Iā€™m going to try the original.

1 Like

Hi!

I have to ask something because Iā€™ve been playing around for a while and I canā€™t figure this out. Hereā€™s the code from the example which appears to deal with the size and ratio of the video:

local logosize = 12
local screen_width = sys.get_config("display.width", 20)
local screen_height = sys.get_config("display.height", 20)
local scale_width = screen_width / logosize
local scale_height = screen_height / logosize
go.set("#sprite", "scale", vmath.vector3(scale_width, scale_height, 1) )

I canā€™t seem to see how these variables affect the size and scale of the video. The sprite Iā€™m changing the texture of is 12 * 12, my window size is 1000 * 750, and the video isā€¦ letā€™s say 640 * 480. What numbers do i need to put up there? Thanks for your help.

The logo size is the size of the atlas, in texels.

The rest of the calculation makes it so that the sprite is scaled to fit the entire screen.

1 Like

ooooh, itā€™s the ATLAS size not the IMAGE size!!! Mathias thank you so much, that was the key information i was missing.

1 Like

The reason is that itā€™s the atlas texture youā€™re replacing.

2 Likes

ā€¦and THATā€™S why the you need to have the sprite you project onto in its own atlas. Thanks dude.

I still donā€™t entirely get screen_height = sys.get_config("display.height", 640). Is 640 a default value to return if display.height returns as nil?

1 Like

Yes, exactly, thatā€™s a default value. But it makes little sense since the setting display.height should always exist. You can omit that default value.

1 Like