Tiny NAT-traversing Age of Empires 2 Multiplayer client.
VERY work in progress, it's probably pretty difficult to get it to compile.
The idea is to get a single portable zero-install executable that you can hand to a few friends and immediately start playing. No creating accounts, no installation, no router configuration, etc. Just the bare minimum.
Fluctuating. I wanted to build the matchmaking part using IRC, but that's turning out to be a bit difficult, because you would need server-side adjustments to get IP addresses for the NAT traversal stuff (…I think.)
Anyway, it comes in two parts: matchmaking and connecting. Matchmaking will be using a nickname (no real authentication), and using public or passworded rooms (like IRC channels). Players can chat in rooms and the first player to join a room (the host) can start the game. Initially, up to 8 players can join a room, but in the future there'll have to be more for UserPatch spectator mode. (≤8 players + ≤32 spectators.) Connecting is probably going to be using ICE somehow (libnice?), but I don't know yet how to direct Age of Empires traffic onto an ICE-established socket. All in due time :D
UserPatch includes automatic port forwarding using UPNP, but that doesn't always cut it, and you still need to exchange IP addresses manually.
On Linuxes:
- Install Wine and Mingw32. Something like
apt-get install wine mingw32 mingw32-binutils
. - Download and build wxWidgets 3.1.0 using MinGW.
- Download the last DirectX SDK with DirectPlay (August 2007).
- Symlink
dxguid.lib
anddplayx.lib
from the DirectPlay SDK intolib/
. make
to buildmake run
to run
On Windowses with Visual Studio:
- Download and build wxWidgets using Visual Studio. Import one of the VS project files that comes with wxWidgets and build it.
- Download the last DirectX SDK with DirectPlay (August 2007).
- Configure environment variables:
WXWIN=
path to your wxWidgets build base directory.
- Import the AoCMultiny.sln solution file.
- IRC: Took clues (and an IRC message parser) from Fredi/IRCClient
- DirectPlay: I used @biegleux's Delphi DPLobbySystem as a reference for most of the DirectPlay lobby/game setup. I'm not sure if the sources are still online, but I'll link them here if I can find them.
- DirectPlay: The DirectPlay sections in the DirectX 7 SDK documentation.
- nicesp: Took clues from @RazZziel's dpwsockx implementation and @solemnwarning's ipxwrapper.