Page 1 of 2
How to create a new window?
Posted: Tue Aug 11, 2015 1:29 am
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!
Re: How to create a new window?
Posted: Tue Aug 11, 2015 11:00 am
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.
Re: How to create a new window?
Posted: Tue Aug 11, 2015 3:23 pm
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).
Re: How to create a new window?
Posted: Tue Aug 11, 2015 8:53 pm
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.
Re: How to create a new window?
Posted: Tue Aug 11, 2015 9:41 pm
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!
Re: How to create a new window?
Posted: Thu Aug 13, 2015 12:24 am
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
Re: How to create a new window?
Posted: Thu Aug 13, 2015 8:10 am
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!
Re: How to create a new window?
Posted: Thu Aug 13, 2015 10:18 am
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.
Re: How to create a new window?
Posted: Thu Aug 13, 2015 3:05 pm
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.
Re: How to create a new window?
Posted: Thu Aug 13, 2015 6:40 pm
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.