Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ ROM
➜ Compiling the server
➜ A Beginner
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| DavidMB13
(16 posts) Bio
|
Date
| Sat 02 Jun 2007 11:22 AM (UTC) |
Message
| Well, my friends, I am sure you have heard this many times, but it's time for me to start my own MUD. I've been mudding for over 8 years and have had experience as an Immortal.
My main questions are these:
Since I don't know anything about C++, what is the main route I want to take in creating a mud? I follow the basic compiling guidelines here and succesfully setup a MUD that is running on my computer.
Now where do I go from here?
Do I read a book on Unix and figure that out first? Or do I start reading up on C++.
The question is here, besides being an immortal on other MUDs, what is the best way to go about learning to code a MUD?
What is the exact process I should take or the steps I should go through in order to learn about coding a MUD succesfully.
Please let me know what the best plan of action to take is.
Thank you.
David | Top |
|
Posted by
| Conner
USA (381 posts) Bio
|
Date
| Reply #1 on Sat 02 Jun 2007 08:40 PM (UTC) |
Message
| Well, first off, most codebases are C rather than C++, but there are codebases that use neither as well, so I'd say the first step is going to be to decide which codebase you'll be using. After that, you can learn in a variety of ways, personally I started with a few books on C and linux (though I also started with some unix and programming, albeit in other languages, experience) and then kind of dove into the code. For the most part, depending on the codebase you've selected, there's likely to already be examples of most concepts in the code itself. Once you figure out what's being done by the code you've got, you can start making small changes to the existing code to learn the effects they have and then build up to adding new stuff from scratch. But mostly how you learn it best is a very individual thing, just be aware that there are plenty of us who are very willing (and usually quite able) to help you when/where needed, but do yourself a favor and try to figure things out some on your own first and don't hesitate to use your resources (like this forum, as one example) thoroughly (ie, search to see if the answer is already posted before asking the question), but don't be afraid to ask anything either. Confused yet? No fear, if you're not you will be eventually and then we'll do what we can to help unconfuse you. ;) |
-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #2 on Sat 02 Jun 2007 09:42 PM (UTC) |
Message
| |
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #3 on Sat 02 Jun 2007 09:44 PM (UTC) |
Message
| Conner's suggestions are very good. One thing I might add is that even though most code bases are in C, not C++, you should learn C++ anyhow because it is a superset of C. That is, everything you can do in C you can do in C++ with the same syntax, but the contrary is not true.
So you will be doing yourself a service by learning C++, because not only will you understand and be able to write C, but you will also be able to use the more advanced features and conveniences of C++.
Just as my personal opinion I don't think anybody should be writing new code in straight C unless they have a very good reason to do so. (I think there are some very good reasons, mind you, but many people who think they have one actually don't.) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| DavidMB13
(16 posts) Bio
|
Date
| Reply #4 on Sun 03 Jun 2007 02:50 AM (UTC) |
Message
| Alright, so I purchased a book called C++ For Dummies and I'm beginning to get the main concepts down. I installed Dev-C++ and I saw your tiny mud server here, Nick, and I tried to compile it with the program. I get the same error as with other mud source codes I try to compile - There's basically a billion lines with errors, but everytime the program hilights the same exact line:
#include <stddef.h>
What does this mean?
The only time I've ever fixed this problem is by changing the directory that the source code was in, but I've done the same process with the source code for MUDs and it always comes up with the same thing, even with your tiny MUD server.
I am dying to get this tiny mud up and running to just fool around with it a bit.
Please help me with some more suggestions, so far everyone has been really helpful. | Top |
|
Posted by
| DavidMB13
(16 posts) Bio
|
Date
| Reply #5 on Sun 03 Jun 2007 03:12 AM (UTC) |
Message
| I looked at the compile log and this is just a fraction of the errors:
Compiler: Default compiler
Executing g++.exe...
g++.exe "C:\tinymudserver\tinymudserver.cpp" -o "C:\tinymudserver\tinymudserver.exe" -fexceptions -g3 -I"C:\Dev-Cpp\include\c++" -I"C:\Dev-Cpp\include\c++\mingw32" -I"C:\Dev-Cpp\include\c++\backward" -I"C:\Dev-Cpp\include" -L"C:\Dev-Cpp\lib"
In file included from C:/Dev-Cpp/include/stdio.h:42,
from C:/Dev-Cpp/include/io.h:36,
from C:/Dev-Cpp/include/fcntl.h:39,
from C:/tinymudserver/tinymudserver.cpp:33:
C:/Dev-Cpp/include/stddef.h:6:24: no include path in which to find stddef.h
In file included from C:/Dev-Cpp/include/stdio.h:44,
from C:/Dev-Cpp/include/io.h:36,
from C:/Dev-Cpp/include/fcntl.h:39,
from C:/tinymudserver/tinymudserver.cpp:33:
C:/Dev-Cpp/include/stdarg.h:6:24: no include path in which to find stdarg.h
In file included from C:/Dev-Cpp/include/io.h:36,
from C:/Dev-Cpp/include/fcntl.h:39,
from C:/tinymudserver/tinymudserver.cpp:33:
C:/Dev-Cpp/include/stdio.h:204: type specifier omitted for parameter `size_t'
C:/Dev-Cpp/include/stdio.h:215: type specifier omitted for parameter `size_t'
C:/Dev-Cpp/include/stdio.h:216: type specifier omitted for parameter `
__gnuc_va_list'
C:/Dev-Cpp/include/stdio.h:217: type specifier omitted for parameter `
__gnuc_va_list'
C:/Dev-Cpp/include/stdio.h:218: type specifier omitted for parameter `
__gnuc_va_list'
C:/Dev-Cpp/include/stdio.h:219: type specifier omitted for parameter `size_t'
C:/Dev-Cpp/include/stdio.h:219: type specifier omitted for parameter `
__gnuc_va_list'
#include <stddef.h>
What is this garbage? :(
Help. | Top |
|
Posted by
| DavidMB13
(16 posts) Bio
|
Date
| Reply #6 on Sun 03 Jun 2007 03:12 AM (UTC) |
Message
| #include <stddef.h>
That is what's hilighted when a new tab called stdio.h pops up next to tinymudserver.cpp when I try to compile the source code. | Top |
|
Posted by
| Conner
USA (381 posts) Bio
|
Date
| Reply #7 on Sun 03 Jun 2007 03:21 AM (UTC) |
Message
| Just as a guess, I'd say check and see if you're missing the file stddef.h from your C:\Dev-Cpp\include folder (and those under it). *shrug* |
-=Conner=-
--
Come test your mettle in the Land of Legends at telnet://tcdbbs.zapto.org:4000
or, for a little family oriented medieval fun, come join us at The Castle's Dungeon BBS at telnet://tcdbbs.zapto.org
or, if you just want information about either, check our web page at http://tcdbbs.zapto.org | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #9 on Sun 03 Jun 2007 10:43 PM (UTC) |
Message
|
Quote:
I installed Dev-C++ and I saw your tiny mud server here, Nick, and I tried to compile it with the program.
My example server should compile under Cygwin using gcc.
However I caution you about trying to get a MUD running, and making code changes, if you are not familiar with C. You will get frustrated by heaps of error messages that are hard to understand, if you are just learning the language.
There are thousands of lines of code in MUD servers, and they use some of the more sophisticated concepts that programmers use, like dynamic memory allocation, asynchronous IO, string manipulation including hashing, bit manipulation (shifting left, right, anding, oring, and so on).
Grab a beginners' book on C (or C++), and work through some examples. You will save yourself a lot of grief.
An alternative it to grab a "precompiled" version of SMAUG (see http://www.gammon.com.au/downloads/dlsmaug.htm) or ROM (http://www.gammon.com.au/downloads/dlrom.htm), then you don't have to compile anything. Just fire it up and have fun running your own server. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
30,939 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top