PC Toys 14 Cool Projects for Home, Office and Entertainment
By Barry Press Marcia Press
John Wiley & Sons ISBN: 0-7645-4229-X
Chapter One Throw a Networked Head-to-Head Video Gaming Party
These humiliations are the essence of the game.
~Alistair Cooke, quoted in Bob Chieger and Pat Sullivan, Eds., Inside Golf
Hysterical assertions that video games are turning youths into antisocial loners notwithstanding, we'll absolutely stand on this one point: every video game we've ever played that had a multiplayer option was a whole lot more fun with a room full of people second guessing and laughing at your every move. It's hard to retain a sense of pride under those conditions, but they make for an incredible amount of fun.
Let the Screaming Begin
One of the hardest things to build into video games is a realistic, intelligent opponent. It's easy to build an enemy you can never beat, but very hard to build one that is realistically difficult-one that plays as well as a human, even as well as the best humans, but no better. Multiplayer games solve that problem by providing people as opponents. People may well be better and faster than you, but they make mistakes, lose concentration, and have off days. People have characteristics you can learn, but they learn yours at the same time.
As wonderful as online, multiplayer games can be over the Internet, LAN parties with your friends within earshot are infinitely better,because the screams, taunts, and epithets from both players and spectators add a unique dimension to play. Microsoft understood this when they built voice communication into their Xbox Live Internet gaming service, but even the good implementation they built can't match the immediacy of a party.
Assuming your guests bring their own PCs, a LAN party is easy to throw. Some inexpensive network equipment and some of your time is all it takes. Well, that and good food. Here's what you'll learn to do in this chapter:
* Set up the network cabling and connections
* Make sure each person's computer can talk to the others
* Create servers to host game sessions, and directories to simplify finding and joining games
* Provide spectator camera views for bystanders to see what's happening in each game
* Track results and statistics (not that the winner needs to matter so much, but because it's one more way to compete and interact.)
Guest's Computers, Your Network
Table 13-1 lists all the parts you'll need for a party, including cabling, hubs and switches, and game software. We're assuming your guests will bring their own PCs, so the only PCs you'll have to supply are the one you play on plus the one you use as a games server.
There's no guaranteed sufficient minimum PC configuration for client or server machines-you'll have to check the requirements based on the game itself. Nevertheless, if you're playing Unreal Tournament 2003 as we describe in this chapter, you'll want to at least meet the requirements shown in Table 13-2 for the machine you play on. First person shooter (FPS) games usually have the most stringent hardware requirements, so you might get away with somewhat less playing other games. Don't try to cut back too far, though, because generating the graphics for any fast-paced game is demanding.
The most basic work you must do, and should ideally do in advance, is to set up the cabling and equipment you'll use to connect your guests' computers together. You can use cables, wireless connections, or a combination of both.
If you use wired connections, the first choice you need to make is what cabling technology to use. Nearly always, the right choice will be standard 10/100Base-T Ethernet (see Figure 13-1). You'll recognize 10/100Base-T cabling by the characteristic 8-wire RJ-45 modular connectors. Use CAT-5 wiring or better to make sure you can handle 100-megabit connections.
Unless you need cables to connect a lot of guests' computers to the LAN, you're probably better off buying the cables that connect the computers to the switches or hubs. Those patch cables will each cost you anywhere from $1.50 to $35 and up, depending on where you buy them. If you can plan ahead and give yourself enough time to order cables, look at the pages we listed in Table 13-1 for Cables N Mor cablesnmor.com/cat-5-cable.html; even a 100-foot cable there won't cost more than $28.
If you're only connecting two computers, meaning at any one time two players are head to head with each other, with no separate machines for spectators, you can use just a crossover cable to directly connect the two. Otherwise, you'll need an Ethernet switch or hub. Searching shopper.com for ethernet hub and ethernet switch respectively, we found five-port Ethernet hubs for as little as $24.95, and switches as low as $31.83.
The difference between a hub and a switch is that a hub can pass only one packet at a time, because all computers share the hub equally, while a switch pairs the source and destination ports for packets and can pass many packets simultaneously as long as the packets each use different pairs of ports. The ability to pass multiple packets at a time means switches can carry more traffic than hubs and will burden the receiving computers with less irrelevant traffic. That benefit won't matter if you're running only a few games at a time, but if you stack multiple switches and hubs in a tree to let lots of people play or watch at once, the traffic near the root (see Figure 13-2) can mount and start to bog down if you're not using a switch.
Even if you are using switches, the traffic into and out of the server will be the sum of all the traffic in the network, so if you have a lot of clients, make sure the server is on a 100-megabit port.
Be sure you don't accidentally connect the cables to form a loop, because if you do, your network won't work. Once you've cabled the entire infrastructure and checked for the usual green link OK lights everywhere two parts are joined, it's time to wire up the computers. Unless you know that all the visiting computers have network ports, you're safest assuming that some of them won't, and therefore you'll have a few loaner network interface cards (NICs) on hand. If nobody objects to slapping a PCI card into their computer, they're a really cheap alternative. You always run a risk of problems when you open a computer or install a PCI driver, though; if you're concerned, could use the somewhat more expensive USB NICs instead. You may still have to do a driver installation, but USB drivers cause problems far less often, and you won't have to open the computer case.
There's a saying that God watches over drunks and fools. Neither of those were in short supply in the more raucous parties we remember, and given all the other, more important problems in the world, trusting in divine providence means all those Ethernet cables strung around on the floor are disaster waiting to happen.
At some cost, you can avoid that problem by using a wireless LAN. The most commonly available wireless LAN technology, and the least expensive, follows the IEEE 802.11b (or WiFi) standard. The equipment operates in the 2.4 GHz band, which means that it's vulnerable to interference from some wireless phones and-rarely-Bluetooth computer equipment, but overall it works well. You'll want to think about the following four issues when using 802.11b wireless:
* Primary equipment configuration
By primary equipment configuration we mean the choice of what type of wireless equipment to use. The 802.11b technology itself permits both direct computer-to-computer connections and computer-to-LAN connections (see Figure 13-3). The direct computer-to-computer, or ad hoc mode creates a wireless connection from every computer to every other computer, with no one computer managing the network. The computer-to-LAN, or infrastructure mode creates a wireless connection from each wirelessly connected computer to a central access point, with a connection to the LAN at the access point. Infrastructure mode is less expensive for your gaming network, because otherwise every computer needs its own wireless interface whether it's on the wired LAN or not. That's workable if you set up a purely wireless LAN, but not otherwise.
If you need more coverage than a single router can provide, or already have a router without wireless capability and simply want to bridge other computers into your existing LAN, you can use a wireless access point (WAP), which functions much like a hub with wireless connections.
Coverage describes the physical space within which computers can connect to your wireless network. Coverage isn't just a matter of distance, although it's strongly affected by distance-antenna patterns, blockage, and interference play a big role too. The wireless signals travel in a straight line, but it's likely that not all directions are equally favored by the antenna pattern. Some antennas may radiate in a circle, but not well up or down, some may radiate front to back and up /down but not side-to-side, and others will have different patterns yet.
Moreover, different materials block signals to varying extents. Metal is particularly bad, but non-metallic substances will block signals somewhat, and materials that seem non-metallic can nevertheless have metallic powders or other forms of metal in their makeup. You can be assured that only active, powered electronics will radiate interfering signals, but knowing the frequencies at which a device radiates, and how strongly, is almost impossible without instruments. Computers and monitors are potential sources of interference, but so are some wireless telephones and microwave ovens.
It's hard to predict just how an antenna will radiate by looking at it, much less how much power an access point or interface card have, what the interference sources are, and what objects are causing more or less blockage. The easiest thing to do is walk around with a laptop in different directions and at different distances, looking at the received signal strength. Doing that survey lets you map out the net effects of radiated signal strength, antenna performance, blockage, and interference.
Your wireless LAN's signal will not stop at the walls of your building, nor at your property line. The signal simply continues without boundaries until it becomes too weak to be received. It can easily overlap onto the street, into the apartment unit above or below you, and to your next-door neighbor. If you've done nothing to prohibit access from those points outside your control, your network is open and insecure. Not something you want, so here's what you need to do.
Secure Your Wireless 802.11b LAN
1. Turn off the broadcast SSID. The Service Set Identifier (SSID) is, effectively, a password for access to your wireless LAN. If you leave the broadcast SSID enabled anyone can join your network without knowing the password. That's nice for your guests, but you might have other visitors.
2. Set a specific SSID that is different from the default. The default SSID is well known for many different brands of routers: Linksys routers come set to linksys, Cisco routers come set to tsunami, Intel is intel, 3Com is 101, and so on. Change the SSID, preferably to something not easily guessed. (For that matter, you might want to set one SSID for your party, and then change it afterwards.) Because you've turned off the broadcast SSID, everyone will have to set the specific SSID in their configuration.
3. Turn on WEP. Wired Equivalent Privacy (WEP) encrypts the transmissions over your wireless network, and adds a good (but crackable) layer of security. Set your router for 128-bit keys, then enter a passphrase into the router and generate a key. Give the key (in hex) to your guests; it's not likely you can simply have each of them enter the passphrase and end up with a working key. You tell wirelessly connected guests the specific channel number you're using if they're having problems connecting.
If you really want to lock down your wireless LAN, you can restrict access to specific physical hardware by their built-in unique addresses, called MAC addresses, explicitly defining the set of cards allowed to access the router. No other cards will have access. This might be overkill for a party of a few hours, but it's not a bad idea for a wireless LAN when you normally have few visitors.
The latency sending messages from one computer to another is higher over wireless links than over Ethernet cables. The difference isn't large-on our network, for example, we see ping times of 2-3 milliseconds over the wireless network and less than a millisecond over the Ethernet cables. That may not seem a lot, but some really fanatic gamers may be concerned that it's enough to give their opponent a split-second advantage. Evaluate your guests' fanaticism and proceed accordingly.
Before You Frag-Setting Up the LAN
Once you've set up connections, be they wired or wireless, you need to make sure the necessary protocols work on your LAN and make provisions for guests to use those protocols. You'll use either the IPX or TCP/IP protocols, depending on what else you do with your LAN and on what the games support.
IPX, the protocol that originated with Novell's Netware, is a great choice if you're just putting a LAN together temporarily for your party. It requires no administration beyond making sure the protocol stack is available on every computer, because it assigns addresses to computers automatically. For many years, the default Windows installation loaded IPX onto every networked computer along with the NetBEUI protocol stack, making LANs as easy to set up as could be. At one time, every multiplayer game supported IPX because it was so prevalent.
Nevertheless, IPX is becoming rare today because TCP/IP is the protocol of the Internet. There's no good reason to support both IPX and TCP/IP on a computer, and because so many LANs are connected to the Internet, TCP/IP has become the protocol of choice.
With the exception of the nonstandard behavior of Windows when it can't otherwise obtain an address, TCP/IP has no way for a single computer to automatically assign itself a network address. Instead, computers running TCP/IP either have their network addresses assigned manually or employ Dynamic Host Configuration Protocol (DHCP) to receive their address assignment. DHCP simplifies other elements of TCP/IP setup too, in that computers receiving DHCP information-the DHCP clients-can also be given their subnet mask (which lets the computer determine whether another address is on the same network segment or requires routing) and the address of a Domain Name System (DNS) server used to convert computer names to numeric TCP/IP addresses and vice versa.
Excerpted from PC Toys by Barry Press Marcia Press Excerpted by permission.
All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.