|
One computer, two screens (in allegro) |
Aqua Regia
Member #9,855
June 2008
|
I want a multiplayer game where player1 has one screen and player2 has another one. I could think of two ways to do this: ¤ Use a "weird" screen resolution in allegro, like 1280x480. Then show half the buffer on each screen. Only problem is that when you're using a "weird" resolution, the game won't go fullscreen. Is there a way to fix that? ¤ Have two buffers writing to the both screens. You write player1's information to buffer1, then write buffer1 to screen1. And at the same time write player2's information to buffer2, then write buffer2 to screen2. Is there a way to do this in allegro? Atm there's no computer, no graphics card, no screens etc. It will be bought based on what's needed. Any ideas? |
Thomas Fjellstrom
Member #476
June 2000
|
Allegro 5 (4.9) supports that out of the box using 4.2-4.3 for that would be a pain in the rear. -- |
Peter Hull
Member #1,136
March 2001
|
As Thomas says Allegro 5 will be able to do it, here's the proof: A third option is to make a client/server system but with the server and 2 clients running on one PC. Then put one client on each monitor. That would work with Allegro 4, definitely. Pete
|
Tobias Dammers
Member #2,604
August 2002
|
Are you sure? How would the two windows have the focus at the same time? --- |
Thomas Fjellstrom
Member #476
June 2000
|
Windows I think is capable of noticing that you have two separate sets of input, and letting two windows have focus, but not by default, thats for sure. -- |
X-G
Member #856
December 2000
|
... why would you need two windows to have focus at the same time in the first place? Just have one client take care of the controls for both of them. -- |
Schyfis
Member #9,752
May 2008
|
Are you sure that's not just one window spanning both monitors? ________________________________________________________________________________________________________ |
Trent Gamblin
Member #261
April 2000
|
Yes, if you're running vista and have compiled with Direct3D9Ex you can get two real fullscreen devices (or more). Under XP, it uses two windows the size of each screen because of limitations of Direct3D9 (non-Ex).
|
Thomas Fjellstrom
Member #476
June 2000
|
Quote: why would you need two windows to have focus at the same time in the first place? Just have one client take care of the controls for both of them. How else would two separate windows take input from two sets of devices at the same time? Quote: Are you sure that's not just one window spanning both monitors? Quite sure. Try some of the allegro 4.9 examples out at any time. -- |
Matthew Leverton
Supreme Loser
January 1999
|
The problem with Allegro 4 is that a single fullscreen program takes over both monitors. You'd have to cheat with a windowed mode that spans the entire desktop (per screen). |
X-G
Member #856
December 2000
|
Quote: How else would two separate windows take input from two sets of devices at the same time? Why are you so obsessed with having both windows accept input? -- |
Thomas Fjellstrom
Member #476
June 2000
|
Quote: Why are you so obsessed with having both windows accept input? How else do two separate users interact with their own window? -- |
X-G
Member #856
December 2000
|
Why do they have to interact with their own window? Like I already said, what's wrong with one window accepting input for both? -- |
Schyfis
Member #9,752
May 2008
|
Quote: How else do two separate users interact with their own window? With two separate computers, the old fashioned way. ________________________________________________________________________________________________________ |
Matthew Leverton
Supreme Loser
January 1999
|
Instead of asking each other the same questions in a circular fashion, perhaps you could try to resolve your differences. If we are talking about mouse input, then we have a problem. (But Allegro only supports one mouse, so you could get around this if the mouse only was meant to work on the first display.) If we are talking about keyboard or joystick input, then one program can control both windows. |
Schyfis
Member #9,752
May 2008
|
Good idea. Maybe you could make a wrapper program that executes the target program twice (thus making two windows). The wrapper program could pass keyboard and joystick input to both programs. ________________________________________________________________________________________________________ |
Trezker
Member #1,739
December 2001
|
What? Allegro only supports one mouse? Of course more than on mouse is unusual, but it wouldn't hurt to support more. |
X-G
Member #856
December 2000
|
DirectX hasn't supported more than one keyboard or mouse for quite a while now. It can still be done without DirectX, it's just trickier... and most people don't have, let alone use, more than one of either at a time, so I guess it's never been much of a priority. -- |
Aqua Regia
Member #9,855
June 2008
|
Thank you for your answers. Just to clarify some things, I want a single exe-file running fullscreen in the both screens at the same time. Only one keyboard will be needed, and I won't be using a mouse at all. |
Schyfis
Member #9,752
May 2008
|
Quote: Use a "weird" screen resolution in allegro, like 1280x480. Then show half the buffer on each screen. This seems like the correct approach for one exe running fullscreen on both screens. Can any other applications that you have go fullscreen on both monitors? ________________________________________________________________________________________________________ |
BAF
Member #2,981
December 2002
|
What about one cup, two girls (in allegro)? |
piccolo
Member #3,163
January 2003
|
It would be sweet if allegro supported multiple of the same inputs such as keyboards and mice. Trust me when I say its the future. wow |
Matt Smith
Member #783
November 2000
|
You could could have 6 monochrome screens on one dual head card. That's enough for MORE THAN 9000 African schoolchildren. |
|