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?
]]>Allegro 5 (4.9) supports that out of the box
using 4.2-4.3 for that would be a pain in the rear.
]]>As Thomas says Allegro 5 will be able to do it, here's the proof:
{"name":"dualies.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/9\/5939f37322f6bcb0cc6b49f3222ad356.jpg","w":800,"h":600,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/9\/5939f37322f6bcb0cc6b49f3222ad356"}
(image from Trent's site). But you might have to wait awhile before Allegro 5 is ready...
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
]]>Are you sure? How would the two windows have the focus at the same time?
]]>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.
]]>... 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.
]]>Are you sure that's not just one window spanning both monitors?
]]>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).
]]>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?
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.
]]>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).
]]>
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?
]]>Why are you so obsessed with having both windows accept input?
How else do two separate users interact with their own window?
]]>Why do they have to interact with their own window? Like I already said, what's wrong with one window accepting input for both?
]]>How else do two separate users interact with their own window?
With two separate computers, the old fashioned way.
]]>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.
]]>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.
]]>What? Allegro only supports one mouse?
Of course more than on mouse is unusual, but it wouldn't hurt to support more.
]]>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.
]]>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.
]]>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?
]]>What about one cup, two girls (in allegro)?
]]>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.
I cant say any more or they will find out i really have a time machine
You could could have 6 monochrome screens on one dual head card. That's enough for MORE THAN 9000 African schoolchildren.
]]>