Game Development Community

Split screen For the PC

by Christopher Mayfield · in General Discussion · 01/15/2002 (10:49 am) · 18 replies

Has any one thought of doing an option of split screen for the pc. would this take alot of coding to create this feature.
Another idea is accepting input from a usb keybord and sending out from an video out. Most computers come with a video out already cabible and ready to use.
this could be a BIG sell ing point for the torque engines. If done right it could help set us apart from the rest of the world.
Chris

#1
01/15/2002 (10:55 am)
I'm not quite with you there, why would being able to output to video out be so special? or read from USB keyboards?


I'm just wondering in what situation this would set torque apart?

As far as it goes, this is possible right now.

Phil.
#2
01/15/2002 (11:12 am)
I guess I was not clear enough. I beleive that if the engine makes it easier to accept inputs from multiple connections and send out to multiple outputs.

Imagine getting a computer from best buy and throwing on another keyboard adn running wires to your tv tv for a second player to play on the same computer.If I want to play a fps with my wife right now I will have to go out an buy another computer so that she can play. Is there any way to share the computer between two players.
#3
01/15/2002 (11:57 am)
Ahh, got you. No, I dont think so. You can split screen ok, but I dont think you can split between one vid card and another.

You could run 2 copies on 1 puter and have 2 video cards running into 2 screens, but that'd probably work out quite badly :))

Phil.
#4
01/15/2002 (1:10 pm)
I was just talking about split-screen gaming with a friend. It seems to be lost and has been since around the last Need for Speed :)
#5
01/15/2002 (1:24 pm)
The video outs that you're probably thinking of don't do that: They mirror the output of the vga port. To do what you're thinking will require either two video cards or one dual head video card, neither of which are tremendously common hardware configurations.

But it is technically possible. Some Cad/Cam software already does stuff like this.
#6
01/15/2002 (3:18 pm)
i remember the days of spending more time fighting for keyboard elbow room than world domination...... ive still got my amstrad cpc 464 somewhere....

question, if we do have 2 screens eg: standard first person view and a picture in picture view of a 3d map

are we instantly doubling up on visual processing? will it be just a little slower?
#7
01/15/2002 (6:33 pm)
AFAIK, The current implemtation of OGL on Windows will disable the H/W acceleration by default if you have 2 displays enabled on one computer at the same time.

Depends on how you code/change the code of the engine, it is possible to display 2 views at the same time on one display card with H/W acc enabled. Most graphic editor had already done it. (If anyone still thinking of making a editor from torque, this feature is essential). Doing so will result to render the same scene twice (or multiple times depends on how many views you open).
#8
01/15/2002 (6:47 pm)
or you can go out and get yourself a console...for one there are very few (i can't think of any) 2 player PC games...and those who play with more than one player do it via the net or LAN (does anyone still do it over the phone? heh).
#9
01/15/2002 (7:01 pm)
Actually, the Serious Sam expansion is going to include 4 player split-screen...

why? I don't have a clue.
#10
01/15/2002 (7:08 pm)
that's terrible.
#11
01/16/2002 (9:46 am)
I guess I misstook what the vieoout ports were for on the back of the PC. could you still have two keybords on one pc and play on a single screen. I know my favorite game for the nintendo is Spy Vs Spy. I was sortof thinking about doing the same for The Torque Engine.

PS. Does any one have any code to do split screen is it just a Quick hack or will it take some time and effort?

the article below tells about Single-machine multiplayer games
http://www.gamedev.net/reference/articles/article722.asp
#12
01/20/2002 (12:50 pm)
There certainly could be a way to do it. I'm not sure of the Torque setup, maybe have a second Client interface, and have a particular set of inputs (a given mouse, a given keyboard) or one half of the input (say one set of input bindings on left side of keyboard, one set on right) mapped to the second Client somehow. It also depends on the concept of 'player' in the engine. Someone more knowledgeable should be able to comment on this.

Split screen will however take a chunk of processing power, since you are potentially (depending on implementation) running things like physics twices, and your are rendering two different camera viewpoints which could thrash the scenegraph if it isn't Client attached, and would certainly thrash video memory if the two opponents aren't near each other.

We actually had a prototype of this for Dark Vengeance at one point, but decided it wasn't worth it.

However, there are cases where it might be useful, depends specifically on the game. On a dual monitor setup, if you say had the mouse controlling one monitor, the keyboard controlling the other, and a config based on generally having two people working in tandem, that could be interesting.

As two rendering to two monitors, any dual-head video card can render a viewport on each monitor just fine under Windows from what I know. I'm not sure what is done when there are physically two cards in the machine. On the Mac, two physical cards works just fine -- under Windows, someone with knowledge can kick in. And yes, there are cool things for an RPG game where the second monitor could show inventory, party stats, live topo map, etc., cleaning up the primary display for the view of the world.

If people have specific projects, and want some input on using two displays from a design aspect, feel free to drop me a line. From a coding aspect, at the moment I don't know that TGE directly supports multiple viewports on different displays (BUT, the Mac code can start up the game on the display of your choice in a multimon config -- and the PC will be able to at some point too).

-d
#13
01/20/2002 (2:05 pm)
Cost versus benefit...

I've never known anyone who has two monitor hook up on their windows based pc... so if you want to spend a large amount of time designing something 1% of your target audience might be able to you... go for it! :P

Of course... I'm sure that time could be used to do something a bit more constructive.

If it's just a hobby project (no release goal set) then I guess you can fool around with whatever you want... all I've learned is setting goals early (and following them) makes everything 100x easier.

I've played split-screen on the computer ONE TIME in all my years of computer gaming. That... paired with me never seeing anyone with a two monitor hook-up on a windows pc makes me wonder how tiny the audience is.

For the most part, if people have two monitors they have two pcs... and a home/office/school lan is fairly common, so small pickup games are plausible via lan (which requires no noticable changes to the code)

If you're just experimenting go for it! Of course... if you're working on a project with a team with any reasonable release date you might want to reconsider.

Especially since you'd have almost no testers to test that feature (unless you have some really wierd team-members who each have special vid cards and extra monitors) hehe, good luck if you go through on this.
#14
09/16/2006 (10:41 am)
I realy need help to split screen for my racing car game. two viewport 2 player 1 pc and keyboard
#15
09/16/2006 (2:51 pm)
Torque doesn't really have a scene graph, so it doesn't easily lend itself to rendering the same scene from more than one camera viewport. But with some hacking in the C++ code, it could potentially be done.

What I would do would be to get a dual-head graphics card, create a "span desktop" mode (where there are two monitors of the same size), and create a single window that covers both monitors. Then draw one player on the left half, and one player on the right.
#16
09/16/2006 (6:51 pm)
My approach to this would be to run two different instances of Torque on the same pc, with one instance of the server. You'd probably need to modify the engine code to get them to cooperate. You can create a separate program with a frame window and two or more OpenGL viewports, then modify the Torque clients to render to those viewports.
#17
09/16/2006 (7:02 pm)
Quote:My approach to this would be to run two different instances of Torque on the same pc

That's unlikely to work well, unless you have a dual-core CPU, because the Windows scheduler (and the Linux scheduler, too) chooses to give the same process time for a long while (like, 100-200 milliseconds) before they switch to another process. (Yes, this means that processes run for a number of pre-emption quanta.) This is because context switching costs performance.

The minimum you can do to give it a chance of working would be to add a ::Sleep(20) in the main loop for Windows, and an ::usleep(20000) in the main loop for UNIX-based OS-es.
#18
09/16/2006 (9:01 pm)
Based on what I found in a Google search, its more like 20-60ms. Overall, though, I agree that cpu scheduling would be a big factor, and adding a Sleep() call would probably help. Minimizing the in-game graphics in the game would help too :-).