01. Downloading and Installing the UDK

Step 1: Download the UDK
The download mirrors for the UDK are here. I chose AOL Big Download as it did not send me through several other pages to get to the actual download first.

Step 2: Install the UDK
Double-click the downloaded installation file (or extract it first if you chose a mirror that zipped it). The installer will check that there is enough space first, then it will check if its major prerequisite, .NET 3.5, is present on your machine or not. If it is not present you will see a Microsoft net Framework installation screen. Just agree to the terms of the license, then click on the Install button.



You will need to restart your computer once the net Framework 3.5 SP1 has finished installing. Following the restart the UDK installation should resume automatically, and take you to the License page. Click the 'I Accept' button. The installer will then ask you to confirm or change the installation folder, and then you can click the Install button.

The UDK will then start the installation, starting with the installation of its prerequisites:
  • Visual Studio 2008 Redistributables
  • Microsoft DirectX 9.0c
  • Charting Tools
  • nVidea PhysX Drivers
On completion of the installation the main components of the UDK will be available via the Start button, Programs, Unreal Development Kit, UDK-2009-11.



The installation does not automatically place any shortcut icons on the desktop, but you can right-click and drag the Editor, the Game (Client) and the Unreal Frontend from the above onto the desktop, and Create Shortcut here, if you wish.

02. Creating a Game Package

There is no need to create a sample map/level in the UDK to test with, as the UDK already has 7 sample maps that can be used.

To create a standalone game, that friends can log into and play, follow these steps:

Step 1: Launch UnrealFrontend.exe, normally located here:
C:\UDK\UDK-2009-11\Binaries Unreal\Frontend.exe

Step 2: You will see a Menu at the top, under that some tool buttons, and under the tool buttons two tabs, called Game and Cooking, select Game. Click on Browse, next to the Map to Play box, and select one of the sample maps. I chose DM-Deck.udk

Step 3: Select the DM-Deck text in the Map to Play box, and copy it, then click the Cooking tab, and paste the text into the Maps to Cook box, then return to the Game tab.

Step 4: Leave (Use cooked map) unchecked, and in the Common section, leave all unchecked, except Multi-threaded.

Step 5: In the bottom section, PC, for server type choose Dedicated (Listen is to serve a game and also be able to play it from the same PC, but you will need a highly specified PC to do this well, so it is better to leave it as Dedicated), and for number of clients choose 0 (this is not the number of clients that can connect to the server, it is the number of clients that will be spawned on the same PC). Set the Resolution to 800x600 (can be increased later, once a low resolution is known to work). Leave the Show Log and Remote Control boxes unchecked.

Step 6: Now press the Cook tool-button (fourth button under the menu bar).

Step 7: Wait a few minutes until it has finished, and you see the following message:

[COMMANDLET 'UDK.exe CookPackages -platform=PC -noloccooking' SUCCEEDED]

Step 8: Now click the Package Game tool button. The Game Settings dialog will open. Enter a GameLongName (First Galactic War) and a shorter GameName (eg FGW), then press the Package Game button.

Step 9: If you now go to your C:\UDK\UDK-2009-11 folder you will see the packaged file, UDKInstall-FGW.exe (this can now be distributed to friends).

Step 10: Upload your packed game to one of file hosting sites for your friends to download from.

    To Install the Packaged File created from the procedure above, just double-click it.

    Step 11: It will give you first the license agreement, then the Install Location dialog, using as a default: C:\UDK\GameLongName (so in my case this was: C:\UDK\First Galactic War). Now click on the Install button

    Step 12: Next it will Install the Prerequisites for Unreal (if they are not on your system):
      • Visual Studio 2008 Redistributables
      • Microsoft DirectX 9.0c
      • Charting Tools
      • Nvidia PhysX System Software
        If UDK has any problems installing any of these prerequisites, go to this page for help:

        The installation processes should then complete, and the game is ready to play.

        03. Hosting on a Home PC or Dedicated Server?

        Using your home PC as the Game Server

        Step 1: Ensure your PC has a static IP address
        It is essential that the PC you are hosting your Game Server on has a static IP address, or the 'appearance' of a static IP address, if you want your friends to be able to connect. To find out whether your PC has a static (permanent) IP address, or whether it is dynamically assigned (meaning it can change from day to day) by either a router or your Internet Service Provider (ISP), do this:- Go to Start, and select Run..., type 'cmd' into the Open box, and hit OK. When the DOS window opens, type the command ipconfig/all. Make a note of the IP Address it gives you. If you see a value that says DHCP disabled, it means that your PC has a static IP address, and you can move to the next step. If it says DHCP enabled it means that the IP address is being supplied either by your router (if you have set up a home network, or LAN), or if you do not have a router, by your ISP. To change to a static IP if you have a router follow the procedure provided here. If you have no router and have a direct connection to the internet, then skip to Step 2.

        Step 2: Ensure your Firewall can pass the required Ports
        If you are using Windows Firewall, the method for opening ports is described here:


        Windows XP Firewall, opening ports


        Windows Vista Firewall, opening ports


        Windows 7 Firewall, opening ports


        If you are using a firewall that is part of a security suite (such as Zone Alarm, Norton, McAfee, etc) then consult your documentation for opening ports in these software firewalls.


        If you are using a router to connect to the internet, then it is likely you will be using the hardware firewall that comes with the router. There are detailed instructions on how to setup port-forwarding on your router on the PortForwarding website. Select your router from the list, then you will be taken to a page that lists most on-line games that need port-forwarding. Select Unreal Tournament 3, and follow the procedure given.

        Step 3: Setup a Dynamic DNS Service
        Most ISPs provide their customers with a dynamic IP address for their connections (static IP addresses are mostly used by commercial customers). If you connect to the internet directly without using a router, then your PC will have its IP address allocated via DHCP by the ISP. If you have a home LAN behind a router then the ISP will provide the IP address via DHCP to the router instead. In either case we must establish a static IP address (or rather the appearance of a static IP address), and that is where Dynamic DNS comes in. A very good explanation of what DNS and Dynamic DNS are is provided here. Basically, instead of having an IP address for your PC or router, such as http://79.234.23.06/ (which may change daily), you have a domain name, such as http://garys-game.servegame.org/ (which does not change). So, how does the domain name know which IP address to resolve to? Dynamic DNS hosts are kept up-to-date automatically with the IP address supplied by your ISP, using an update client. Update clients come in two types: software clients, which are installed on your PC, or hardware clients embedded in devices such as routers. Software clients are easier to set up than hardware clients, so I recommend the free client from the dynDNS.com website, called DYNDNS Updater. Obtaining a DNS host name is simple, and free, from this location


        Using a Dedicated Server

        If you have a dedicated server, or a Virtual Private Server (VPS) then getting it ready to host a game server is as simple as downloading and installing the UDK, as in Tutorial 1, and making a note of its fixed IP address.

        Now you have either a static IP address or a Domain Name (that resolves to the current IP address using an updater) you are ready to host a Game Server. The next tutorial will demostrate the two methods of doing.


        Troubleshooting
        Using your home PC as a server requires something else in addition to a fixed IP address (or Domain Name). It needs a good upload speed. Unfortunately many ISPs do not quote the upload speed of their service, only the download speed. They also may restrict your upload speed, or the amount of data you can upload daily or monthly, to prevent you from using your home PC as a server, in order to persuade you to use one of their Business Services that have no such restrictions, so they can charge you extra.

        There is an easy way to check your upload speed using one of the many speed testing sites. My favourite is the one from SpeedTest.net, just click the Begin Test button. It will then measure the Ping Time, the Download Speed and the Upload Speed of your internet connection. The site then allows you to compare the speeds you are getting from your current ISP with other ISPs in your area.

        04. Starting a Server and Remotely Connecting to it

        Starting a server in the UDK is simplicity itself. There are two methods, depending on whether you want to host the server on a dedicated server machine, or host the server and join the game/world from the same machine.

        Now you have either a static IP address or a Domain Name (that resolves to the current IP address using an updater) from Tutorial 3, you are ready to host a Game Server. To demostrate the two methods of doing this I will use one of the ready-made maps that comes with the UDK, DM-Deck.

        Hosting a Game Server: Method 1

        Step 1: Start your UDK client, C:\UDK\UDK-2009-11\Binaries\Win32\UDK.exe, then choose Multiplayer.

        Step 2: Choose Host Game




























        Step 3: For the Game Mode choose Deathmatch, and for the Map choose Deck. In the Server window you can select the max and min number of players (clients) that can connect to the server. You can now click on Start Game, and the Game Server is now running.

        (Now see the Connecting to the Game Server section below)


        Hosting a Game Server: Method 2 (the simple 3-click method)

        Step 1: Launch UnrealFrontend.exe, normally located here:
        C:\UDK\UDK-2009-11\Binaries Unreal\Frontend.exe




        Step 2: You will see a Menu at the top, under that some tool buttons, and under the tool buttons two tabs, called Game and Cooking, select Game. Click on Browse, next to the Map to Play box, and select one of the sample maps. I chose DM-Deck.udk

        Step 3: Leave (Use cooked map) unchecked, and in the Common section, leave all unchecked, except Multi-threaded.

        Step 4: In the bottom section, PC, for server type choose Dedicated* and for number of clients choose 0 (this is not the number of clients that can connect to the server, it is the number of clients that will be spawned on the same PC). Set the Resolution to 800x600 (can be increased later). Leave the Show Log and Remote Control boxes unchecked.

        * If you are using your Home PC as a server, and you wish to join the game/world from a client on the same machine, then choose Listen for the server type. This will be a resource hog, and it may not give you the performance you would like.

        Step 6: Now press the Server tool-button (third button under the menu bar).

        That is it! The server will now start,  and a cmd-like server window will pop up, and when you see 'Initializing Game Engine Completed' it is ready to be connected to.



















        Connecting to the Game Server

        Step 1: Start your UDK client, C:\UDK\UDK-2009-11\Binaries\Win32\UDK.exe, then choose Multiplayer.

        Step 2: Then choose Join, and the next page should be the Server Browser, which will be empty. At this point start the Console. To do this use the tilde key (~), or the upper single quote (') or this key (¬). If none of those keys work on your keyboard then you will have to experiment with all the non-alphanumeric keys on your keyboard until you find the one that works (unfortunately the key that brings up the console is keyboard and language specific).

        Step 3: Now type the command: open 85.17.234.172:7777 (or whatever the IP address or domain name of your dedicated server is, followed by the :7777 port number.


        That is it, you should now connect.


        Troubleshooting
        Followed all the above steps and still cannot connect remotely? Try these faultfinding steps:

        1. When using your home PC as the server it could be that it is the hostname that is causing the problem. Try using the external (router) IP address instead. Open a browser and go to this URL: www.checkmyip.com this will tell you what your external IP address is (eg: 78.154.28.7). Use this address in the console, i.e. use the command: Open 78.154.28.7:7777

        If that fixes it, then go to the DYNDNS website and check that the IP address currently assigned to your hostname matches what www.checkmyip.com tells you. If it doesn't then maybe the updater software is not working. Try reinstalling it.

        2. Firewalls and antivirus software can stop a connection from being made. If you have a router then it will already have a hardware firewall built in, so it is usually quite safe to switch off your other firewalls, such as Windows Firewall, ZoneAlarm, or any of your security suites that may have a firewall bundled. So just try switching them all off and then see if a connection can be made.

        3. Try to ping your external IP address. Go to Start, and in the Run box type cmd to get the DOS-like cmd console up. In here type (using the example above): ping 78.154.28.7
        If you get a response fine, but if the three attempts all time out then either your router is setup to ignore pings, or your ISP is blocking them. If your router manual provides no info on blocking pings, then try asking your ISP support if they block them.

        4. The most common reason I have found for not connecting has been that the router was not configured correctly to pass the required ports. Please double-check that you have opened the required ports, and their type (TCP&UDP) 100% correctly.

        If you had a problem connecting, and eventually got it resolved, please post your solution here, it may help others.