• 12
• 10
• 10
• 13
• 10

Getting Started with Client/Server

This topic is 4464 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

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.

Share on other sites
Isn't VB6 obsolete by now?

Share on other sites
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.

Share on other sites
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.

Share on other sites
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++?

Share on other sites
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.

http://msdn.microsoft.com/vstudio/express/default.aspx

Luck!
Guimo

Share on other sites
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.

Share on other sites
Would Dev C++ work for a MUD game? That's what i'm using at the moment

Share on other sites
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.