Most efficient way to get live view of gameplay scene

I need to create such live view in my game:

Example from another game:
Notice top center - gameplay live view.

So record all scene or parts and put in some smaller view. How can I do that and what is the most efficient way?

Also, I’m looking for option for this live view - dynamically resize it. For example main scene size is 1136x640 and live view size set to 100x56. But when I need - I can resize it to 200x113 without losing quality, so not just upscale previous view, but by changing some real size parameter… I guess.

I think RenderTexture will be great for such things.
Also it will be efficient as you dont have to save any file or something.
Just call visit on your gameLayer on every update.
You can easily apply runAction so scaleTo/scaleBy will easily give you smooth dynamic resize.

1 Like

Looks like. But have you noticed that that view also showing that tractor closely, so it’s follow it if needed.

It’s not what I want because again:


Also, I hear about experimental::FrameBuffer but it’s safe to use it? Any documentation and examples? Can it size be changed as I waned? Or it’s enough of RenderTexture, but again how to change it size properly?

What I found is http://discuss.cocos2d-x.org/t/camera-refactoring-and-framebufferobject-feature/21593 but it’s - don’t have access to that topic! lol

I think you can easily achieve this by using another camera to render your stadium screen. Let the default camera render gameplay and HUD layer, use another camera to render gameplay to stadium screen. You need to experiment with it a little as AFAIR one node can have only one camera. Its a long time since i worked with cameras so you need to go figure exact details.
This might help you


and

Hope to see progress on this, do share your findings :slight_smile:

Actually I’ve searched all forum about this and read that topics too. But why buffer is experimental? Can I dynamically change render size? I wanted to have some official comment also, from engine devs. And sone good examples with explanations…