Using a camera as a 'sprite animation' for objects

So, the idea is that you can use the live images of a camera as an infinite ‘animated sprite’ for objects, think of a TV; when on, the black is replaced by what’s on the network, continuously, image after image
Imagine that the black part of the TV is (on) an object in GDevelop. When you start the game/preview, it starts ‘streaming’ what a specific camera is capturing
I could be very useful!

Here’s some use case examples:

  1. The computer in alphys’ lab, UNDERTALE:


    The computer’s monitor is continually streaming what a camera right on top of the player is capturing

  2. studiopolice’s boss fight, SONIC MANIA:


    The giant TV shows a robot rooster off-screen, it is used to tell the player which weather the boss will use as an attack. Checking the weather on TV

  3. The cutscene after the previous boss fight, still SONIC MANIA:



    Now, the TV is showing the ‘‘flying battery’’ off-screen.
    The playable character(s) run to the right, leave the screen, then appear on the TV under the giant flying machine, then jumps on it.

  4. The split-screen multiplayer mode, SONIC 2:
    2player1 2player2
    As the name implies, the screen is split to allow more than one player to play independently
    It could be imitated with camera-streaming objects covering the whole screen on their own superior layer:

    sonic%202%20example2

  5. A small object onscreen showing the images of a zoomed-out camera could also be used as a mini-map, but I couldn’t find a game to use as an example.

What do you think? I hope that you agree with me.

I’m sure you will find many who agree with you that it would be great to have, especially for split screen. What you are referring to is called multiple “viewports”.

Unfortunately, multiple viewports are not supported by the underlying rendering engine GDevelop uses, PixiJS.

I’ve found these two:

Can none of them do it?

None of them do what you are asking for.
Pixi viewports are basically layers with extra stuff
Pixi scrollbox just adds scrollable boxes

Unfortunately, the only way I know that I’m aware of to do this type of Splitscreen/virtual camera is with some very hack-y methods, meaning you’re going to have to duplicate your map, objects, etc.

Here’s someone experiment with how to do it, almost all of the “Code” can be instead be done using GD5 events. PIXI, TypeScript: Dynamic Split Screen

Maybe we could add a camera-streaming functionality to the video object (in-game camera, not actual camera)
Then we could use video objects as “viewports”
But we will have to make sure that when streaming a camera, the past image is always being deleted right after being replaced by a newer one, or memory will be wasted

It would not be the best implementation but I think that it would be better than nothing until something better shows up.

Someone can do this one right?

That’s not how it works sadly

Ok. But can you explain, please

Like Silver Streak said, there is no way to do that. We already investigated a lot and couldn’t find any way.

Should I open a feature request on Pixijs’ issues page on GitHub?

If yes, would it be ok to link this discussion?

If you want to I guess

I will leave this here. . .