Tutorial 3: Cube World

In this tutorial we will cover the implementation of Cube World by examining the code. I have provided the source for download also so you can follow through the tutorial and make modifications and comments to the code as we go.


Source Code

Server Source Code: cw_server.zip

Client Source Code: cw_client.zip


Compiling the Code

The server code needs to be compiled on the linux operating system. I used Fedora 17 but it should work on any distribution although you may need some different includes. To compile the server code you will need to put all the files into a directory and type in make. This will create a binary file called server which you then execute and it will be online. Note you will need to open port 7000 for UDP traffic in your firewall.

The client code needs to be compiled on the windows operating system. You can setup a project and compile it just like the DirectX tutorials. You will need to change the IP address in the applicationclass.cpp file. Look for the line: result = m_Network->Initialize("192.168.0.106", 7000); Change that to the IP address of your linux server.

For the client you may want to just compile the code and use the binary with the data files and run it on more than one computer so you can see how things work when you are connected as multiple users.


How It All Works

Back to Tutorial Index