multible windows A8 game

Posted By: NicolaB

multible windows A8 game - 05/03/21 21:43

Hello!
Is it possible to open a second window that has a different level loaded, but shares the same global vars? I am working on some sort of simulator. One screen shows an airplane on the other screen the instruments, would be the goal.
Any ideas?
Posted By: 3run

Re: multible windows A8 game - 05/04/21 09:06

Hey!

I've never done this myself, but recently when I was researching for multimonitor options, I've found out this:
Quote
-mon number P A7.20
In a multi monitor systen, uses the monitor with the given number (1,2,3,...) for fullscreen display, instead of the primary monitor. For using several monitors at the same time, start the main application in server mode (-sv, see below) and start one client application per monitor (-cl -mon).

It's related to the command line, search manual for 'Command line options' (in offline manual you can find it under 'Starting the Engine' section).

Best regards.
Posted By: NicolaB

Re: multible windows A8 game - 05/04/21 15:24

Hi 3run! Thanks for the quick reply. I thought i have to use server/client thing :-( which is at the moment a bit complicated. A good thing would be, if i can run the client in a different level instead the same level. I tryed to use level_load after if(connection == 2) but the engine stoped working with that :-(
Posted By: Dooley

Re: multible windows A8 game - 05/04/21 17:20

I am just theorizing, but if you saved all variables to a text file, and read from there, it's possible two applications could reference them. That would be an interesting problem to solve, and you would have to coordinate reading/writing from both applications carefully. Speed might be an issue, but maybe not, it's hard to say without trying it out...
Posted By: Dooley

Re: multible windows A8 game - 05/04/21 17:21

If you could have one application do all the writing, and the other one only reading, that might make things easier.
Posted By: 3run

Re: multible windows A8 game - 05/04/21 18:30

It might not be possible to load different levels for server and client at the same time... If that would be the case, I think you could merge those two levels into one. And if I understood correctly, on second screen nothing specials is going to happen (probably most of the things aren't going to move around that much?), so you could build a little level with BSP + PVS (to make things faster), place additional view inside of that small level which will contain all instruments and then handle the airplane flying etc on the primary monitor as usual.
So something like this:
Quote
-merge levels into one
-use one part of the level for the airplane with 'camera' view
-use second part of the level for instruments with additional view
These all are just quick thoughts, I've never done anything like this myself.


Best regards!
Posted By: JeyKey II

Re: multible windows A8 game - 05/05/21 10:03

.
Posted By: Quad

Re: multible windows A8 game - 05/05/21 22:46

You can run 2 separate engine windows with different windows/vars/levels with c++ api, but you would have to sync any engine vars that needs to be synced yourself and both would have to wait the other to render the frame to start rendering it's own, therefore also one would always be behind the other by 1 frame.

Otherwise you can use networking libraries of functions to communicate with the other window.
© 2024 lite-C Forums