Step-by-step
From PX Documentation
Suggested order to study NetDog documentation:
1. Read the NetDog overview
2. Read about network connections
3. See the source code for the most basic client/server application using NetDog.
Look at the files 'server.cpp' and 'client.cpp' in the examples/Connect in the SDK.
4. Read about NetDog events
5. See the online tutorial for IrrlichtTutorial which shows how to integrate NetDog into a basic game using the Event model. The tutorial includes:
Note: don't worry about all the code--the sections relevant to NetDog have been highlighted in green.
The source code for this tutorial can be found in the SDK under tutorials/IrrlichtTutorial/server/servershell.cpp for the server and tutorials/IrrlichtTutorial/client/main.cpp for the client.
6. Read about NetDog objects
7. See the online tutorial for NetDog objects.
The source code for this tutorial is in the SDK under tutorials/ObjectTutorialObjectModel/server.cpp and client.cpp.
8. Briefly peruse the API function list to become familiar with the functions offered by NetDog.
Do not worry about learning all of the functions. The list is arranged roughly in order of relevance, so beginners can safely skip over the later sections such as Channel, Sessions, Zones, Tracker, Database. The main point now is to simply see where functions used in the above tutorials appear in the API function list.
9. Try writing a simple "Hello World" client/server application using NetDog. Just send the message "Hello World" from a client to a server using a NetDog event. If you get stuck, refer to the Connect example and IrrlichtTutorial examples to remember how to create client/server connections, and send events respectively.
10. Try writing a simple client/server application with objects using NetDog. For example, make an object which contains basic information about a game character, such as name, hit points, stamina, position, etc.
Next, have the client initialize an instance of that object and ask the server to create it.
Finally, try updating the values of one of these fields. E.g. change the position on the client's copy of the object then send a position update to the server. Print out the position each time it is changed on server and client to convince yourself that the value is being properly updated on both of them.
11. Congratulations, if you've done all the above, you know all the basics of using NetDog. You know how to send data in two different ways--as events, and as objects. Try creating more complicated examples, e.g. with multiple clients and/or use a graphical client, such as that in the Irrlicht tutorial.
