DXStudio embedded and Enet -- Section: DXStudio Goodies --
VS C++ .net with MFC, DXStudio embedded and Enet
This time, I'm testing how DXStudio is doing when embedded as an ActiveX control. The hosting application is a VS C++ .net MFC dialog. To make things even worse, I skipped the DXStudio built-in network functions and used Enet, a light-weight network layer for both, linux and windows. This gives us the possibility to create a native server application on a linux machine.
Both programs, server and client, basically show how communication for an online game (server: Linux; client: Windows) could be set up, using DXStudio in embedded mode. The code is far from being complete, it rather shows a 'design study'. So, making a 'WoW-Killer' would still take you some work, even when giving it a head-start using the files below. ;-P
The set up is shown here:
The Enet source code (to compile a lib on Windows or Linux) is not included in the files below. It can be downloaded at their website: http://enet.bespin.org/. My compiled *.lib and *.a is, though.
Features
- The client app got a plane and one object. On start, it registers with it's unique ID at the server. On receiving positions for the object, it will place it accordingly
- The server app will check for clients and periodically send new object positions. It does handle connect/disconnect events aswell
Please note that you might need to update the file location of the DXStudio player and the server IP/port in the client's code.
This picture shows 4 clients running on my windows pc, connected to a server app on a local old laptop, running Debian.
Any feedback is welcome. Thank you.
Download
| Description |
File |
Filedate |
Size |
Remarks |
| DXStudio embedded in MFC with enet. Demo |
dxs_MMOG.zip |
3/5/2009 |
10.5 MB |
Including VC C++ .net project, dxstudio document, server c-code, makefile, compiled enet libs. |
|