🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Need Lots of help with my MMORPG netcode!

Started by
10 comments, last by kalldrex 23 years, 5 months ago
Okay first of all where can i find a good tutorial about creating windows and printing text and having them interactive? I need to kknow that for the server program. Now to the netcode questions! Okay Our game is an MMORPG and I''ve figured out that i really must use UDP due to TCP''s overhead. That i''ve figured out. I also know that for a lot of the information (player movement etc...) won''t be needing a reliable system because it will be updated again in like a minute or whatever. But how exactly would i make the stuff that''s needed to be reliable (messages, spells etc...) to actully be reliable? I have a book from microsoft and all of their stuff is about like one connection networks with only one socket? how would i use multiple sockets and have it create new sockets when no more are available? I really need a way to use functions to edit features, add new features in, but how really would i do this? any ideas? sorry about all these hard questions. one more. I''m trying to have it set up where our server will have 2 computers networked together and they connect to them, one computer handles messages, coords, etc.. and is the main server while the other compiles logs and makes it so no time warps and stuff like this so that processing power won''t be taken away from the actual server. This will also allow us to update the server program without rebooting it because they will be connected to log computer and this way it makes it easire. any ideas? thanks for your time
ALL YOUR BASE ARE BELONG TO US!!!!
Advertisement
You need to slow down first of all. You should begin by having a single computer handle all of the server stuff. You can break it down later if you want but you''ve got to learn the basics first.

DPlay isn''t well documented. Winsock is. Get a simple client- server going with either. When you can successfully connect and send simple messages across, then you can move on from there to the next step.

You only need one connection. Every client should connect to the server through that connection. Think of it like a web-server. How many ports does a web-server have? 1. And usually port 80.

There''s no instant answer for what you want to do. It''s going to take months to learn first how to do it. And second to make it work how you want it to. Then you have to learn how to optimize it.

Focus on either DPlay or Winsock and read. And take small steps. Just like writing a paper outline the process to creating it.

How much programming experience do you have? MMORPG are the hardest to do. There''s so much you have to know how to do I can''t even begin to list it all.

Good luck,

Ben
http://therabbithole.redback.inficad.com



Go for WinSock.. it''s simply a lot more portable (DPlay uses some kind of weird internal protocol which isn''t documented).

And yes, slow down a bit

Another consideration you should make later is whether you really want your server to run in windowed mode. IMO it''s best for a server to run in textmode (Win32 console / any other OS''s console). This way you can concentrate on doing the server stuff, and you don''t need to worry about nice GUIs. Apart from that, windows take up resources.

If you want run-time configurability, why not write a simple (text-mode) remote control interface which allows you to log into the server (on a different port, not the game port) in a telnet-like manner and issue commands from there.

cu,
Prefect

---
Sanity is the trademark of a weak mind.
Widelands - laid back, free software strategy
Dont dismiss TCP_IP just yet. Unlike an action game, MMORPGs dont need to send postion/state data every tick. I suggest working with TCP_IP first, exchanging data, getting up your underlying protocosls (logging in etc..), and a very simple synchornization scheme (perhaps a purely event driven model).

Good Luck

-ddn
Ok windows 2000 doesn''t like winsock programs that runs in dos-like mode without windows. That is why to test out what i''ve learned i need to know how to create actaul windows. I would rather have the server program use windows anyways then a console because i have a lot more server side power like administrating accounts and setting things up like that. so if anyone knows of where to get some good tutorials on making windows i''d really appreciate it.

I am using winsock just so you guys know....

Yes i know that everyone uses the same connection port but I''ve been told that only one client can use a socket at a time which means for multiplayer games you would need multiple sockets... Is this correct?

Untill i figure out making windows i really can''t test out anything yet. Also I''ve been programming for a while and I''m pretty knowledgable in programming and c++ but i''m new to network programming.

Also i''ve ruled out TCP/IP because it has major overhead. Other MMORPGs use UDP/IP because of the less overhead and they have reliable packets for things like spells and stuff.

ALL YOUR BASE ARE BELONG TO US!!!!
For Windows 2000 I was using DirectDraw to display information and was pulling about 45fps max and that was with the window scrunched down. I switched to standard Win32 and I''m getting 1400fps with 320x240. I''m still working on getting text to display but I''m not going back to DDraw just for that. I use a log file anyway. The same program works on all versions of Windows.

"Black Art of Windows Game Programming" will help you there.

Ben
http://therabbithole.redback.inficad.com
I''m not using the windows app for the actual game i have a 3d engine for the game. I''m using the 3d app for the basic server program.
ALL YOUR BASE ARE BELONG TO US!!!!
I''m assuming your setup is server - client version where the server handles all game play information and the client just displays it. The server should only need to display some basic information like connection settings. If anything.

Use a 2d app for the server and go all out with the client.

The "Black Art" book will explain how to set the 2d windowed app up. And it will run on Win2000 and Win9x and WinMe.

Ben
http://therabbithole.redback.inficad.com










Question Kalvin. Your talking about doing this stuff in C++ right not VB because Winsock and netcode is a lot different in these 2 things as is the actaul code.
ALL YOUR BASE ARE BELONG TO US!!!!
Yes. I''m doing it in C++.

Ben
http://therabbithole.redback.inficad.com



This topic is closed to new replies.

Advertisement