For example I have C++/C# server side with sockets or http web server and UDK client.

I am interesting what about experience with networking in UDK: could I connect UDK client to C++/C# socket server via UDP/TCP? Maybe some tutorials/examples?


5 Answers 5


I'm assuming your question is asking about just trying to get some information from a server via TCP and not creating your own networking interface for UDK. The latter which would be impossible unless you had access to the UE3 source code just because classes like Actor and such have native replication which you wouldn't be able to override.

As for your original question, yes you can connect your UDK game client to a TCP server. There are two primary options:

  1. DLLBind
  2. TCPLink

With DLLBind you would have to write a DLL in C++ and then have something a class that reads from that DLL like this:

class NewDLLBind extends Object

Then inside this unrealscript class, you can call functions as necessary to either send information/get information from your DLL which would handle the TCP/UDP networking for you.

More information about DLLBind can be found here: http://udn.epicgames.com/Three/DLLBind.html.

The other option is to use TCPLink. I've personally never tried it before but it should work although it might take some tinkering around with because the documentation is pretty scarce for it. From my understanding you can just create a class that extends from TcpLink and use it to connect to a server via TCP.

More information here: http://udn.epicgames.com/Three/TcpLink.html and they have examples at the bottom that I would suggest looking at.

Good luck!


I think what you'll find is that the UDK networking protocol which runs on top of UDP and TCP, is tied up with their proprietary client and server code. So no, if you wish to use the actual UDK networking client, you very likely wouldn't be able to write your own socket or webserver, even if you knew what the packet structure was (and wanted to try to reimplement based on that).

However if you want to just use the UDK client for display purposes... maybe; I'm not sure this is possible, though, since AFAIK UDK is entirely scripted, so anything not supported "under the hood" is probably not supported at all. If it were possible, consider the following:

  • It takes an impressive amount of work to construct a protocol on top of TCP that has low enough latency and bandwidth requirements to be suitable for a current generation FPS. TCP is a stream-based protocol and as such, suffers from issues of latency that UDP=based game protocols tend to avoid.

  • It takes an even more impressive amount of work (at least a couple of months from an experienced, dedicated network developer) to construct a suitable protocol on top of UDP on the other hand, because you need to reimplement the degree of (a) reliability and (b) flow control that TCP provides natively, while avoiding TCP stream aspect, so as to avoid latency issues inherent to TCP.

In both of the above instances (implementing your own TCP or UDP), you also would need to consider implementing security through some encryption layer. This is pretty much a necessity for any FPS, for obvious reasons.

If you want to learn the nitty gritty of socket-based networking, great. But be prepared to put in a substantial amount of time, as there are many ins and outs. If, on the other hand, you want to get a game up and running, use the networking provided as part of UDK. Or use some other libraries to help you achieve your goals, in conjunction with the rest of their engine (if possible) or some other engine (if not). YMMV, dependent on your game's requirements.


If you want to create your own C++ servers, you would have write the entire networking part by yourself which is quite difficult as Nick Wiggill describes.

I wouldn't recommend it, but it can be done. UDK can use DLL libraries and thus you could write your own networking part. It would be a huge project, but it could be done.

However if you stick with Unrealscript for the game networking and using C++ networking via DLL's for other data, maybe metainformation like player XP or other persistent progress systems.


I think this is posible, you can use dllbind, in order use another net system like raknet.

And you can select what you want transport by net, but you should read the raknet license, cause if udk consumes 30% of your benefits I dont know how much, raknet or another net library could cost.

to Use raknet is quite simple and it brings many examples, I built a windows client with OGRE3D, it was a small world, my friends could connect it, and we could seen each other.

Server was program for linux os, and client for windows.

raknet use udp reliable packets which is very interesting.

At this moment, I´m trying learn UDK, cause to build a level and many others features are pretty easy.

sorry by me english. :(

be free to contact me, to try learn udk together.


Why not take a chapter out of Obsidian and Bethesda and create a single player experience that all can enjoy, suffice to say the even the big shots seem to feel the need for single player games. Multiplayer with servers is a tough challenge, you won't need game programmers for it you will need a separate dedicated group of people to write and maintain a persistent DB that ensure security to all connected clients. The problem here is you will need a third party group as well a group of people overseeing the implementation of the server code and plugging that into your game code and keeping both code stacks clean. You not only lack the skills and resources for such a feat but chances are even if you get past the hurdles you wouldn't be able to afford the needed help.

The full license for the Unreal Engine starts at: $250k

The gives you access to this: http://news.bigdownload.com/2009/03/17/feature-more-on-unreal-engine-3s-atlas-technology/

Good luck!


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .