Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate ways of doing split-screen cameras #338

Closed
eonarheim opened this issue Sep 6, 2014 · 8 comments
Closed

Investigate ways of doing split-screen cameras #338

eonarheim opened this issue Sep 6, 2014 · 8 comments
Labels
feature Label applied to new feature requests stale This issue or PR has not had any activity recently

Comments

@eonarheim
Copy link
Member

In order to do this, the entire in memory canvas needs to be up for grabs for rendering. Then you take the pixels in the specific camera frustum and compose the multiple frustums together.

engine.currentScene.cameras = [camera1, camera2];

// get individual frustums
var frustum1: ex.Texture = camera1.getFrustum();
var frustum2: ex.Texture = camera2.getFrustum();

// compose cameras
var composer = new CameraComposer();

engine.currentScene.cameraComposer = composer;

This will break all off screen culling logic :/

@eonarheim eonarheim added this to the vNext milestone Sep 6, 2014
@jedeen jedeen added the feature Label applied to new feature requests label Apr 24, 2016
@eonarheim eonarheim modified the milestones: Cameras, vNext Aug 29, 2017
@pathurs
Copy link
Contributor

pathurs commented Mar 11, 2018

Proposal:

We shouldn't confine this feature to just 'split-screen' scenarios, we should allow different types of camera displays, in a 'Multi-camera' system.

multi-camera

In the above screenshot, you can see 2 players, with their own camera in a rectangle. On top of each player, they both have a mini-map, which is a separate camera that separately displays the map from each player's own position. On the bottom, a smaller version of the other player's view can be seen, for co-op style game play.

Obviously this is just an example, but I believe that allowing very custom/dynamic camera rendering would allow developers to do anything they can imagine (maybe?).

@eonarheim fyi

@kamranayub
Copy link
Member

kamranayub commented Mar 11, 2018 via email

@eonarheim
Copy link
Member Author

@pathurs Good point, I totally agree

@github-actions
Copy link

This issue hasn't had any recent activity lately and is being marked as stale automatically.

@github-actions github-actions bot added the stale This issue or PR has not had any activity recently label Feb 17, 2021
@JumpLink
Copy link
Contributor

JumpLink commented Nov 3, 2021

Any updates here?

@eonarheim
Copy link
Member Author

@JumpLink nothing recent, there is some work going on to refactor the WebGL renderer to allow easier post processing to render targets that might be eventually useful in creating multiple cameras.

I'll slot this into our v1 roadmap, but no promises on a timeline. This potentially will require some plumbing changes in Excalibur to allow multiple cameras, running the draw routines per camera, and compositing the results together.

Tentatively I've placed this on v0.27.0 #1161

@JumpLink
Copy link
Contributor

JumpLink commented Nov 9, 2021

A possible workaround would be to create several canvas elements / engine objects for a split screen. In this way you would be forced to outsource the multiplayer, but that could also be an advantage, as you could also implement online multiplayer in this way (as if you had several browsers open more firmly). In addition, it would be possible for the players to be able to move around in different worlds, even on the split screen. What do you think?

@eonarheim eonarheim removed this from the cameras milestone Feb 1, 2022
@eonarheim
Copy link
Member Author

The current recommendation is to use multiple instances of excalibur once v0.28.0 drops which supports that.

Closing for now, I think we'll potentially revisit this as a post v1 feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Label applied to new feature requests stale This issue or PR has not had any activity recently
Projects
None yet
Development

No branches or pull requests

5 participants