Left 4 Dead has had an unsupported feature from the very first demo that allows individuals to play with two players on one PC. It was implemented on the Xbox 360 version of the game. So, the good men and women at Valve kept it in the code for the PC version too.
This instructable will teach you how to use this unsupported feature and a variety of hardware and software modifications to use TWO keyboards and TWO mice on one computer.
I'm going to move quickly over a few things that will take many people a while to work through, and link to a few different tutorials that should help.
In this tutorial I use the Smarjtoy Frag Xbox controller modifier. You could easily use a lot of similar devices.
What you really need is something that would let a console operate a keyboard and mouse as if it were a controller. That's the secret to this work around. Use a gaming controller for the second player-- just make sure it's a keyboard and mouse.
For example, if you have a PS2, there's a gadget that does the same thing.
Or if you have a 360, there are a couple that would do the same kind of thing.
Step 1: Background and Materials Needed
ON the hardware side:
Two computer screens (or one, if it's big enough to display two people)
one Smartjoy Frag
one PS/2 Keyboard (though a usb keyboard can be connected, with the proper adapter support)
one PS/2 mouse (again, a usb variation could be used)
a last generation xbox to usb adapter adapter(I made mine)
the keyboard and mouse you normally use
On the software side:
Windows XP (may work with other OS's, but haven't tried them)
Left 4 Dead
Redcloud XBCD driver(free)
Step 2: Installing the Programs
Make sure to download and install the XBCD program too.
Don't forget PPJOY. WIthout this your controller will probably control player one, not two.
Step 3: Configure Left 4 Dead for Split Screen
Then, hit the tilde key (~). It's in the upper left hand corner of your keyboard next to your one (1) key.
You should see the console.
Now, type ss_enable 1.
This will let tell the game to enable split screen.
To make sure it works, start a single player campaign. Any will do. Once the campaign is loaded, you should see your screen halved. It may be halved horizontall or vertically, either is fine.
Step 4: Go to the Config Location
Open up my computer, and navigate to the l4d config file location. For people who installed steam to the normal location, it would look like this:
C:\Program Files\Steam\SteamApps\common\left 4 dead\left4dead\cfg
Step 5: Open the Config File
To open the config file, which probably has the 'no icon' thumbnail, double click, click "select program from list', and find Notepad. Open the file with Notepad.
You should see notepad open, along with a lot of random code.
Step 6: Customize the Smartjoy File
joy_advanced "1" // use advanced joystick options (allows for multiple axes)
joy_name "L4D Xbox Smartjoy Frag Config"
joy_advaxisx 3 // x-axis controls GAME_AXIS_SIDE (strafing left and right)
joy_advaxisy 1 // y-axis controls GAME_AXIS_FORWARD (move forward and back)
joy_advaxisz 4 // z-axis controls GAME_AXIS_YAW (look left and right)
joy_advaxisr 0 // r-axis
joy_advaxisu 0 // u-axis
joy_advaxisv 2 // v-axis controls GAME_AXIS_PITCH (look up and down)
joy_forwardsensitivity -1.0 // movement sensitivity
joy_forwardthreshold 0.1 // movement dead zone settings
joy_pitchsensitivity 1.0 // look sensitivity
joy_lowend 1 \\Tells the game where the edge of your joystick is.
joy_lowmap 1 \\at 0 nothing moves. Think it works like a joy_pitchsensitivity & joy_yawsensitivity multiplier.
joy_accelscale 0 \\tells the pc at what rate to accelerate once it reaches the end of your joystick.
joy_accelmax 0 \\ tells the pc how far the joystick can accelerate.
joy_yawthreshold 0 \\yaw deadzone.
joy_pitchthreshold 0 \\pitchdeadzone
joy_autoaimdampenrange 0.1\\ auto-aim
joy_autoaimdampen 0.1 \\ auto-aim
joyadvancedupdate // advanced joystick update allows for analog control of move and look
cmd2 bind "JOY1" "+jump;+menuAccept"
cmd2 bind "JOY2" "+reload"
cmd2 bind "JOY3" "+use"
cmd2 bind "JOY4" "lastinv"
cmd2 bind "JOY5" "invnext"
cmd2 bind "JOY6" "toggle_duck"
cmd2 bind "JOY7" "togglescores"
cmd2 bind "JOY8" "PAUSE"
cmd2 bind "JOY9" "invprev"
cmd2 bind "JOY10" "+zoom"
cmd2 bind "JOY11" "+attack2"
cmd2 bind "JOY12" "+attack"
cmd2 bind "POV_UP" "impulse 100"
cmd2 bind "POV_LEFT" "slot3"
cmd2 bind "POV_RIGHT" "slot4"
cmd2 bind "POV_DOWN" "slot5"
cmd2 bind "F3" "Vote Yes"
cmd2 bind "F4" "Vote No"
bind "`" "toggleconsole"
bind "START" "gameui_activate"
bind "TAB" "+showscores"
bind "SPACE" "+jump"
bind "0" "slot10"
bind "1" "slot1"
bind "2" "slot2"
bind "3" "slot3"
bind "4" "slot4"
bind "5" "slot5"
bind "6" "slot6"
bind "7" "slot7"
bind "8" "slot8"
bind "9" "slot9"
bind "a" "+moveleft"
bind "d" "+moveright"
bind "e" "+use"
bind "f" "impulse 100"
bind "h" "motd"
bind "m" "chooseteam"
bind "c" "+voicerecord"
bind "q" "lastinv"
bind "r" "+reload"
bind "s" "+back"
bind "t" "impulse 201"
bind "u" "messagemode2"
bind "w" "+forward"
bind "x" "+mouse_menu QA"
bind "y" "messagemode"
bind "z" "+mouse_menu Orders"
bind "CTRL" "+speed"
bind "F1" "Vote Yes"
bind "F2" "Vote No"
bind "F5" "jpeg"
bind "MWHEELDOWN" "invnext"
bind "MWHEELUP" "invprev"
bind "MOUSE1" "+attack"
bind "MOUSE2" "+attack2"
bind "MOUSE3" "+zoom"
bind - "toggle_duck"
bind shift "+duck"
cmd2 jointeam 2
//NOTE: This is my config file almost exactly. Sometimes you'll want to change it a bit. For example, you'll want to change name2 (which is the second player's name) from Jetzer_is_my_hero to something else :).
Step 7: Save the Config
Step 8: Run PPjoy
This program was originally created so folks could use parallel port joysticks on newer computers. To do that, it creates a virtual joystick. We're using it because it will create a virtual joystick that will take up the first joystick slot on your computer. That'll make sure the Smartjoy is bumped to slot two, which means it will control player two. It's explained in more detail in a steam forum thread.
Step 9: Connect All Your Hardware to Everything
Connect the USB-XBOX connector to the Smartjoy Frag by removing the end of the Smartjoy's cable from it's base. If you've used a last gen Xbox controller before, you know what I mean.
When done, you should have the PS/2 keyboard and mouse connected to the Smarjoy Frag, which has a USB attachment at it's end.
With XBCD installed, you can now plug everything in. If it's not installed, you'll have some minor issues.
Step 10: Re-organize XBCD
Step 11: Open XBCD and Change a Few Settings
The XBCD window should look like the first photo.
Now, change the RX- to Z- and RX+ to Z+. Also, set the Dead Zone sensitivity on the right stick to fourteen.
Step 12: Optimize Smartjoy Frag
Right now, some keys are in their normal spots for an l4d layout and some aren't. We're going to make sure they're put in just the right spots.
Take a second to read through a bit of the documentation for your Smartjoy Frag. Try to familiarize yourself with how to change what buttons are mapped where.
Step 13: Re-map the Keys
A -- spacebar
B -- R
X -- X
Y -- Q
white button -- shift
black button -- mouse wheel scroll down
right trigger -- left mouse click
left trigger -- right mouse click
start -- left tab
back -- left caps lock
thumb click left -- mouse wheel scroll up
thumb click right -- mouse wheel click
POV left -- 3
POV Right -- 4
POV up -- F
Note: you shouldn't need to map your WASD keys so I didn't include that instruction.
Note: this keyboard assignment has all the normal configurations of an l4d keyboard, but you can't select your pistol or main weapon by typing '1' or '2'. You'll have to use your mouse wheel or Q key.
Note: I found this to cause the most problems. Once you think you've got it, open the XBCD setup, and make sure each key is assigned to what it should be. As you press a key on your Smartjoy Frag keyboard, the equivalent should light up in XBCD.
Note: when you've got all this working, make sure to save the key layout by pressing ESC and an F key. I saved mine on F2.
Last note: I got myself screwed up a couple times by accidentally using my normal keyboard to try to program rather than my Smartjoy keyboard. Felt dumb afterward, too :).
Step 14: Put It All Together
Start up Left 4 dead, enter the console by hitting tilde (~), and type SS_enable 1. Start a single player campaign, and it should be working.
Congrats! You have everything set up now. You can officially play this game the way it was meant to be: with friends and with keyboards!
Step 15: Additional Info
If you need help, you can post here, but try there first.
Also, if you have an old Xbox controller, I'd recommend getting it working with that first, then adding in the smartjoy frag. That little implement adds a lot of complication to the matter, especially when trouble shooting. The config I gave you won't work perfectly with an xbox controller, but if you can get that to work, it should be mostly good.
If you want to play with more than just a single player campaign, you'll need to type these commands in the console once you are in game:
ss_connect \\this connect the second player to the game
cmd2 jointeam 2 \\ this makes the second player a survivor. I think jointeam 1 lets them join the infected, but I'm not sure.
Look up JayTheHam's guideto splitscreen if you have more than one monitor.
Don't give up! This is a very worth while modification, because it can turn two computers into a full fledged 4 player survival party in no time flat. Keep on working through the problems, troll through that l4d thread, and keep at it!
EDIT: With L4D2 coming out, please think about e-mailing ChetF@valvesoftware.com and asking to keep co-op as part of the game.