Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Multi player game - 2 screens

Author
Message
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Mar 2009 14:04
Hello everyone!

I am not sure if this is possible, and I haven't seen any game that has done this yet, but I want to try it.

I have read through TDK's multi player tutorial on the network. This sets up a game using the network commands on two separate computers connected either with a network cable or over a wireless network. However, I don't like the complexity in setting up a network game, I am more for the "plug and play" way. What I mean is I prefer the game to run on one computer with the screen split.

My laptop has a screen output, a blue plug at the back. You can connect any monitor or screen to it and the displayed graphics on my laptop can be seen on the monitor. Now, is it possible to display the 1st player's view on the laptop screen, and the 2nd player's view on the monitor?

I have no idea how this could work or if it is possible, but please give your advice!

TheComet

Peachy, and the Chaos of the Gems

That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 6th Mar 2009 16:06 Edited at: 6th Mar 2009 16:24
what you want to do is create a bitmap, then type this after one players stuff is moved:



then move P2's stuff and do this:



and finally:



basically it turns out as what player 2 should see, only scaled down to half its height, on top of what player 1 should see, also scaled down. If you want P1 on top instead then switch the order of the two blocks of code. I made this from memory without DB running so dont be surprised if i overlooked something obvious
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 6th Mar 2009 17:21
I think TheComet's talking about a dual monitor display.

Does the laptop display the same thing as the monitor when the monitor is plugged in, or does the monitor override the laptop's display and the laptop display's nothing?

If there is a display on both, you should be able to go to Settings > Control Panel > Display > Settings and setup the two monitors. There should be options to configure the display between the two - in which case you'd have to set up your game to match.

Enjoy your day.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 6th Mar 2009 17:30
Quote: "Does the laptop display the same thing as the monitor when the monitor is plugged in, or does the monitor override the laptop's display and the laptop display's nothing?"


It displays the same thing at once. I will try and set it up, thanks!

Peachy, and the Chaos of the Gems

Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 6th Mar 2009 17:35
but using that would the player have to go into there computer and change that for themself also?
Quirkyjim
16
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 6th Mar 2009 22:49
If they display the same thing at once, then no. That just means that the monitor is an alternate display, not a separate one. If you can set it up so that they're different, there might be a way. I know a game (Supreme Commander) that had some Dual-monitor stuff. I think DX8 or 9. If you get anything, then post it: I use two *different* monitors and would be glad to test.

~QJ
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 8th Mar 2009 15:33
OK, I managed to set it up so both monitors are my desktop, however, although I can drag my mouse and windows from one to the other, they are both separately drawn. So when I execute any DarkBasic program on the left one, it turns black and runs, but the right one still shows the Desktop. They are both different bitmaps being drawn.

How can I combine them both to execute together and share the same bitmap?

TheComet

Peachy, and the Chaos of the Gems

Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 8th Mar 2009 15:46
i wouldn't know how but just wondering so your trying to combine 2 monitors to make one "wide" monitor?
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 8th Mar 2009 16:58
Yeah, exactly. They are combined already, but when I execute a DB program it only executes on one monitor and the other displays my desktop...

Peachy, and the Chaos of the Gems

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 9th Mar 2009 00:31 Edited at: 9th Mar 2009 00:36
Am I understanding you by saying, half of the dbc window is displayed and working in one monitor and the other half is invisible? If you run DBC in windowed mode off the bat with a picture in it that covers the whole window, just dragging the window will tell you if it can be displayed in both monitors. To be thorough:

Try running DBC in windowed mode. DO NOT MAXIMIZE THE WINDOW. Use a small window that you can drag for the test. Drag the window from the primary monitor towards the secondary monitor. Does the dragging window split and spill over to the second monitor so that there is a portion on each monitor? If so, drag the sizing borders of the DBC window such that an equal portion is displayed on both monitors.

If this is working, once you have the window centered and dragged to size, hopefully in DBC you can split the camera view for each player at the center position of the DBC window between the 2 monitors. Avoid maximizing the window. If you maximize the window, it will only maximize on one monitor I think(which ever one you are currently working on). But test this. I could be completely wrong. I don't think FULL-SCREEN mode will work for a split view... I could be wrong about that too...

Let me know what happens.

Enjoy your day.
Caleb1994
16
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 9th Mar 2009 02:47
this is interesting i have never used 2 monitors sounds cool lol

Login to post a reply

Server time is: 2025-06-08 02:21:27
Your offset time is: 2025-06-08 02:21:27