How to create a new window?

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.
User avatar
Khranos
Prole
Posts: 30
Joined: Tue Aug 11, 2015 1:22 am

How to create a new window?

Post by Khranos »

I am currently working with a project that will require the user to open new windows outside of the main program. I've looked though the love.window documentation but haven't seen anything that can be used in this instance. I'm just looking for the documentation on how to create a new window, if any exists within the love API (I understand that this can be done with standard Lua, but I'd prefer to use the love API wherever possible to avoid any conflicts). Any help is greatly appreciated!
Sosolol261
Party member
Posts: 125
Joined: Wed Nov 26, 2014 6:43 am

Re: How to create a new window?

Post by Sosolol261 »

I don't think that will be possible.. (Who knows I might be wrong)

Why don't you try developing your own "windows system"? Virtual windows you know.. But no don't try. It's gonna take too long.
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: How to create a new window?

Post by T-Bone »

Löve doesn't have such functionality built in. What are you trying to accomplish? There might be a workaround. Otherwise, you might want to look at other game frameworks (although I haven't heard of any with multiwindow support).
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: How to create a new window?

Post by Jasoco »

Wasn't this a feature that was being talked about being supported in the latest version of the library Löve uses, but isn't currently on track for implementation yet? Maybe Löve 1.0 will have it in a decade or so. lol

Would be cool to have though. If only for a niche developer audience.
User avatar
Khranos
Prole
Posts: 30
Joined: Tue Aug 11, 2015 1:22 am

Re: How to create a new window?

Post by Khranos »

Ah, that's no good to hear. I've been working with a platformer that would play through multiple windows, requiring the user to manually move windows around in order to complete the full puzzle. Of course, I'd also need to modify the transparency of these extra windows for certain aspects of this idea, which I've read is also not possible at this moment.

I'll likely just create my own imitation windows for this task (which will likely be easier to use and modify regardless). Thank you everybody for the help!
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: How to create a new window?

Post by Positive07 »

Why dont you [manual]os.execute[/manual] multiple instances of your game with different command line arguments then you can use the arg argument passed to [wiki]love.load[/wiki] to detect which tile you draw for each window and you can use Lua Socket ([wiki]socket[/wiki]) to connect all the windows and send data from one another
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
Khranos
Prole
Posts: 30
Joined: Tue Aug 11, 2015 1:22 am

Re: How to create a new window?

Post by Khranos »

That's a strange, but rather interesting workaround for this particular issue. I wasn't aware of the existence of os.execute but I can see its application being useful in this scenario. It sounds like the ticket to transparency on windows as well, which is the only other noticeable roadblock at this time.

I appreciate the information!
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: How to create a new window?

Post by zorg »

Transparency is another problematic issue (since from what i read, SDL2 doesn't really support it [yet]), but since unorthodox solutions are what this thread is seemingly about, with some delay, one could use [wiki]love.graphics.newScreenshot[/wiki], save that to the joint save folder, then the other could load it in, draw it out on the bottom, offset by the position difference of both windows... for slowly changing things like static backgrounds, this could be usable.
if it's not clear, i could whip up a demo thing later.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Rickton
Party member
Posts: 128
Joined: Tue Mar 19, 2013 4:59 pm
Contact:

Re: How to create a new window?

Post by Rickton »

Honestly I think fullscreening the game and creating your own pseudo-windows will be the easiest way to do what you want to do. It'll also let you have more control over what the windows look like and how they work, because otherwise you'd have to deal with them being different on different OSs.
Possession - Escape from the Nether Regions, my roguelike made in LÖVE for the 2013 7-Day Roguelike Challenge
And its sequel, simply called Possession , which is available on itch.io or Steam, and whose engine I've open-sourced!
User avatar
Khranos
Prole
Posts: 30
Joined: Tue Aug 11, 2015 1:22 am

Re: How to create a new window?

Post by Khranos »

zorg wrote:-Cut-
Heh, yeah... things are getting a bit unorthodox to say the least. I understand what you mean with that however, and yet again, it's an interesting suggestion to say the least.

Due to the nature of how the other windows will work, I can see it working well. All of the extra windows will only ever be transparent and contain nothing extra. I'll test it out once I have the multiple windows working for sure.
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot], Semrush [Bot] and 4 guests