Skip to main content
GameDev.net gamedev.net
🔒 Locked

Network Game Skeleton - free, well-commented source code!

Started by Karl G Mar 27, 2007 at 4:18 PM 2 replies 1.8k views
Original Post
Karl G
Karl G
Download the Source (6 MB) View the Documentation Hello fellow developers! It's been quite a while since I have posted here, but I still check the boards often and finally believe I might have something you would be interested in. This is a bit of a cross-forum project, but I figured I would post it here as DirectX makes up the bulk of the complex code. I dug up some old source code that I had created almost a year ago now, and tweaked it a bit so all of you who want to have a look at a real, working networked 3d application can do so. This project contains:
  • Fully-functional client
  • Fully-functional server (yes, it works over the internet)
  • Support for up to 16 players simultaneously (although this is only limited by a #define statement)
  • OPTIMIZED, ANIMATED .X MESHES!
  • DirectInput keyboard and mouse recognition
  • Camera control
  • Only ~3500 lines of code
  • Simple, funtion-oriented design
  • Complete online documentation (also included in download)
  • Precompiled demos in the /Bin/ directory
  • Licensing under the GPL
Now, for the disclaimer. This source doesn't have any kind of chat capability, items, weapons, terrain (other than a flat sheet of grass), etc. Essentially, it has no content--but the core of the application is there for you to tinker with, and add on to. Also, you might find that the server code isn't too well documented. Most of the documentation for this code can be found in the source files itself--I have yet to go through and add comments to all of the function declarations in the headers. Enjoy! I'd love to hear from anyone who finds this useful :D Karl
DividedByZero
DividedByZero
Absolutly awesome!
Got this running under VC 7.1 without too many hassles.
The main problem being the strncpy_s function. But I replaced the following in the clients 'animation.cpp' file.

//strncpy_s( strAllocString, dwLen + 1, strString, dwLen );strncpy( strAllocString, strString, dwLen );

Seems to be happy enough like that.

Thanks heaps Karl G.

[Edited by - lonewolff on March 28, 2007 1:55:14 AM]
Karl G
Karl G
Ah! You found the one line of code I had to change to update to VC2005 (it was complaining that strncpy was deprecated). Your listing is what I originally had :)

If you have any problems or need anything explained, let me know and I'll be happy to help.

Karl
DividedByZero
DividedByZero
Sounds great.

Just skimming over the code, I know most of this is over my head. And I still consider myself a noob. I know enough to sort out include/linker problems and can normally get around problems like above.

I think the best thing for me to do is fire this out to the laser printer and go through section by section with a highlighter and cross reference with MSDN to see what does what.

I am surprised that there are not more posts on this topic. Every second person wants to write an MMORPG (as do I - hehe!). Well here it is guys! A huge start right there.

Thanks again Karl G for a massive contribution to us for this. This is truly generous of you!

Consider your homepage bookmarked :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.