Game Development Reference
In-Depth Information
The final part of the loop is to render the scene. In this example that's fairly simple—we
just have to render the two shapes:
We then have a fully functional (if somewhat simple) example of a networking applica-
tion. This wouldn't be classified as a game by most people, as a game needs more game-
play elements than just moving around. However that's definitely not out of the question
as you can use this example to build your own logic on top of it, using the same formula
(or an alternative one, if you prefer).
Since this is a networking example, it is important to note that, if you try to use the pro-
gram over the internet and the host is behind a router, they need to forward the 45000 TCP
port. Otherwise the router will reject the connection and the client will fail to connect to
the host. You can test the example on the same PC by using IpAddress::LocalHost
IP, which is 127.0.0.1 —you just need to run two instances of the program - one as the host
and one as the client.
And that concludes the last section of the networking chapter.
Search WWH ::




Custom Search