Split screen in Love

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Arthes
Prole
Posts: 10
Joined: Fri Dec 30, 2011 10:52 am

Split screen in Love

Post by Arthes »

Hello.
How to do split screen for two players in Love2D?
Thanks for replies.
User avatar
trubblegum
Party member
Posts: 192
Joined: Wed Feb 22, 2012 10:40 pm

Re: Split screen in Love

Post by trubblegum »

You probably want some of this : https://love2d.org/wiki/love.graphics.newFramebuffer

Beyond that, it would be dependent on what kind of game it is.
You could be looking at anything from simply rendering a scene from two different perspectives to creating two instances of your world state.
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Split screen in Love

Post by Robin »

Help us help you: attach a .love.
coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

Re: Split screen in Love

Post by coffee »

Both commands can help do it but actually we can do split screens quite well with using any of the any of indicated instructions. Draw only a "viewport" or two don't matter much. We just need to detect screen size, calculates how many space to reserve to each player and instead draw a big screen, draw a smaller portion for one and for another starting with other map x/y coordinates just bellow or at right. A method/technique that could be applied (or not) is resize each player viewport if is needed to see the same number of spaces (or aspect ratio) than in 1p mode and not let's say half "map".

What I'm trying to say is that you won't great science for 2p split screen because it will be using eventually the same processes as 1p or bigger screen. Just need draw twice and smaller.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Split screen in Love

Post by T-Bone »

If you know how to make a single-screen LÖVE game, then all you need is probably love.graphics.setScissor. Programming of graphics can be simplified with love.graphics.translate as well.
Post Reply

Who is online

Users browsing this forum: Amazon [Bot], Google [Bot] and 2 guests