Getting Started with Client/Server

Started by
15 comments, last by Moondragon 18 years, 3 months ago
I am wanting to create a standalone fantasy MUD using Visual Basic 6.0. I realize that I am going to have to work with some client/mud programs and mess with them until I understand what I am doing, does anyone have any suggestions for some good source code with this? Anyone have any suggestions for me as a somewhat newbie to programming? I've been doign small things for four to five years now, however I really can't find much success. Once I have a chat like program do you know where I should go with that? Im trying to understand what it will take to program the login stuff, and then how users moving from different rooms to rooms will playout with the code. Help is appreciated, Thanks.
Advertisement
Isn't VB6 obsolete by now?
Please, don't use VB 6 for this. VB.NET will be far superior if you can get hold of it and you want to stay with Basic. If not, something like Python is a good language. Java is almost as good. Even C++ is probably better than VB 6 for network programming, and 99% of existing muds are already in C or C++ so you'll get more examples that way. But VB6 is very poor as far as networking is concerned. Of all the languages I have used in the last decade, only Turbo Pascal was so lacking in the networking department.

If you insist on VB6, You will either have to (a) use the Winsock object, which requires some pretty awful hacks to get working in conjunction with Timers and the like, or (b) wrap the Winsock calls from the Win32 API yourself, which makes it just as hard - if not harder - than using C or C++ for it, or (c) find a 3rd party component to handle networking for you, which will probably cost you money.

Generally the layout of a mud engine is like this:
load up worldstart up listening socketloop forever:    check for new connections and accept them    update things in world    read commands from player connections    handle player commands and send any output back to the players


How to move from one room to another is the same as any other operation on the players - read the command, make the change to your data, send the output to the player. The data change in this case is likely to be updating a 'currentRoom' variable stored in the Player object, or something like that.
I have been told that it is better than .Net, as .NET is just annoying. Also I handle better with 6.0 anyway. I played with C++ back in the day, but I dont know as much about it as I do Visual Basic 6.0. As for being totally obselete I dont believe it is that yet. Of course I may be wrong.
I suppose I could work with C++, I have a copy of Visual C++, but I don't think I have .NET anywhere. Does anyone know of any sourcodes for chat programs that could be worked into a MUD that are in C++?
If you have programmed C++ and VB then you will find C# really easy to learn and in the long run it will reduce your development time as it has a lot of code ready to be used.

You can get the new Developer studio 2005 for free at:
http://msdn.microsoft.com/vstudio/express/default.aspx

Luck!
Guimo

So does the developer have a C# compiler within it? If that is easier then C++, I will probably use it. However still looking for some good starting source codes for prospective text-based game programming. Thanks for the help so far guys.
Would Dev C++ work for a MUD game? That's what i'm using at the moment
It probably would, I used it for awhile, however if C# is clearer and has a free compiler I see no point in not using it.
Yes, Visual C# 2005 integrates a C# compiler. You can also download and install Visual C++ 2005 if you want to use C. But after using C# for a while I have the opinion that its the perfect tool for the hobyist programmer as it gives a perfect blend of the power of C++ and the ease of use of VB making you productive while lowering the debugging time.

Luck!
Guimo

This topic is closed to new replies.

Advertisement