Sign in to follow this  

Getting Started with Client/Server

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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 world
start up listening socket
loop 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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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.

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

Luck!
Guimo

Share this post


Link to post
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 this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Of course you can still download Visual Basic 2005 from the same place. But VB has evolved and language is somewhat different. Looks more like C#.

Luck!
Guimo

Share this post


Link to post
Share on other sites
Quote:
Original post by Kylotan
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.

It isn't very difficult to get the Winsock object working with many players and a timer. I never made a MUD with it, but did make an online RPG, so it handled similarly.

I would recommend using .NET because it is newer and has more data structures. It is still possible to use the old Winsock with it, but Sockets would be better.

Share this post


Link to post
Share on other sites
Quote:
Original post by nprz
It isn't very difficult to get the Winsock object working with many players and a timer. I never made a MUD with it, but did make an online RPG, so it handled similarly.


I think you must have been lucky, as the timer callback has a nasty habit of interrupting important operations like your socket calls. Even with that sort of issue solved, the code you have to write is still very ugly.

Quote:
Original post by Mcloud313
I have been told that it is better than .Net, as .NET is just annoying. Also I handle better with 6.0 anyway.


You've been told wrong, I'm afraid. VB.NET is a vast improvement on VB6. True, many old VB6 programmers didn't like VB.NET because it changes a lot of things, but that was an inevitable side-effect of fixing the many problems that VB had in the past.

Quote:
Original post by willthiswork89
do it in VB if you know how, dont listen to these people. if he knows the language let him use it... instead of griping about it just answer his question reardless of your OPINION on the matter.


Did you even read as far as his second paragraph? It said, "Anyone have any suggestions for me as a somewhat newbie to programming?" 'Stop using VB6' is a suggestion, and one several people would agree with.

Share this post


Link to post
Share on other sites
Quote:
Original post by Mcloud313
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.



Heya, Mcloud. Whoever told you this simply hasn't sat down with VB.NET for more than 10 minutes. I promise you. I've been using VB since v1.0 in 1991. Trust me when I say, VB.NET is far superior.

Right now, you can download Visual Studio 2005 Express, which is *fully* functional, just doesn't come with all the supplementary applications that a full install of VS does. Microsoft is *giving* it away.

I've been using it only for a couple of days, and it is *incredible* from a developer's standpoint. Check it out.

Simon

Share this post


Link to post
Share on other sites
Quote:
Original post by Mcloud313
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.


If you're wanting to *learn programming*... write it from scratch.

If you want to learn programming but your focus is on *making a MUD*, then check this out: http://www.tigermud.com/

TigerMUD is a full-featured, open source, C# MUD, free for anyone to use. Source code is free. However, this will actually get you *programming* slower, because you'll also be learning all their systems -- and when I say 'full-featured'... I mean it. It's huge, and mostly completed. They do have a very well-written and informative developers guide to get you started, though.

As another optional route... I am a MUD developer myself, and have written a MUD engine from scratch in VB.NET. I am not willing to give it away, as it is for a proprietary system/world I've been working on for over 10 years -- but I am more than willing to provide code snippets, converse via IMs, discuss systems and design philosophies, etc...

My email is simon@mindmuse.net. Feel free to give a shout if you're interested in the last option. (This offer open to anyone who has a sincere desire to code MUDs in VB).

Be well,

Simon


Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this