Defold app with two windows?

Hi!

One of my projects that I’d like to do is create something for DJ visuals. I’ve been working on something which, so far, has involved using the debug screen as a user interface, while the app itself displays all the visual stuff. That’s an absolutely genius solution for having a UI that doesn’t impede at all on the actual graphics. But i’d be curious to know if it’s possible to (on a mac at least) create a defold app that opens two windows, one with a UI and the other just generating visuals. (it would be something like VLC, which has a video player window and then a whole separate window with the controls)

I have no idea where to even start looking at this and I am secretly hoping someone will just says “the code you need is sys.open_new_window()” but i am sure it’s not going to be that simple.

any help?

This is not something we have ever considered I’m afraid and it’s not something that is very common in games.

Nah, it’s okay. The debug output thing is working pretty well right now.

For your use case, what I would do is have 2 different apps which communicate with each other. Or you could write the visualization in JS and have the main app host a HTTP server which broadcasts the data. Check out this for an idea on how to do that https://github.com/britzl/defcon With that you could even have multiple fullscreen browser tabs listening to a spcific output channel for each window if you wanted more than 2.

You are seriously overestimating my abilities as a programmer :sweat_smile::sweat_smile::sweat_smile:

Honestly I was just checking that there wasn’t a super-simple way of implementing that feature, how I am doing things at the moment is working really well.

2 Likes

You also could try crating both interfaces in one window: one in the left and the other in the right side and you could manage the changes made to the UI in the code as separate units. This way you could get the job done without so many workarounds.

PS: I don’t know if I expressed well the idea, I have to learn more english.

1 Like

I understand! but I think for going full screen on a seperate screen, the current method requires less work :sweat_smile::sweat_smile::sweat_smile: