[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUDs
. -> [Folder]  General
. . -> [Subject]  TinyMudServer
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

TinyMudServer

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1 2  

Posted by MJohnHBerry   USA  (9 posts)  [Biography] bio
Date Fri 24 Feb 2017 04:27 PM (UTC)
Message
Hello!
@Nick Gammon
I have recently been taking C++ tutorials in hopes of one day being able to create my very own MUD. I have noticed that your 'tinymudserver' on GitHub is like the only C++ starting point for someone in my shoes around the internet. I've been doing tutorials on SoloLearn and other places and will keep learning before I get too crazy and in too deep over my head. But I'd like to know if you had any plans to further your project?

I also read through some other threads on your forum, namely the 'Programming a Mud' topic about a book written just for that. It apparently also came with a CD and a sample server that was further along than your own server. I was wondering, since it seems that more than a few of the users on this forum bought that book, if anyone would like to sell it to me at a discount if you're no longer using it? It seems pretty pricey still for an old book from the places I was shopping around for it.

Well, that, or any other tips towards building a MUD in C++ I would greatly appreciate. Many thanks.
-John
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #1 on Fri 24 Feb 2017 05:17 PM (UTC)
Message
So I can't help with the book, but it looks like someone has mirrored the source code (original sourceforge site no longer seems to work) on GitHub. see https://github.com/briandamaged/bettermud

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by MJohnHBerry   USA  (9 posts)  [Biography] bio
Date Reply #2 on Fri 24 Feb 2017 05:36 PM (UTC)
Message
Oh, wow! You're the man! Thanks alot!
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Fri 24 Feb 2017 08:44 PM (UTC)
Message
MJohnHBerry said:

But I'd like to know if you had any plans to further your project?


I think about that from time to time, however I'm not sure it would be anything more than an exercise. My impression is that MUDs are decreasing in popularity (for example, the number of questions on this forum here is quite small compared to five years ago).

There are quite a few issues that need resolving in a workable server, for example: handling people who disconnect in the middle of a fight if they are about to lose, handling trades between players, some means of enhancing equipment (enchants), possibly handing ranged attacks, and so on.

It is fun to play with a minimal server, but making one that is likely to attract anyone other than you and close friends will be a lot of work.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by MJohnHBerry   USA  (9 posts)  [Biography] bio
Date Reply #4 on Fri 24 Feb 2017 09:18 PM (UTC)
Message
Oh, I've read many a posts about this topic. Even some of yours. You're well known around the MUD community.. obviously, hah. Even on other websites. I'm pretty young for a person who appreciates MUDs.. possibly one of the last of the mohicans of my generation. Kids that are up and coming now are more into visual effects. And as you've said..there has been a decline.

BUT.. maybe that's because there hasn't been a great enough MUD built within the last decade to attract more kids. I remember when I was 8-9.. starting off on AOL. I played a game called Darkness Falls.. Great MUD. I still have dreams about that game, 20 years later. I've always wanted to get involved in something like that. I just never had any friends or acquaintances interested in helping me learn, and the idea of learning to code by myself was intimidating.

Now that I'm older I want to create something akin to that Darkness Falls MUD though. I want it to be a MUD.. but I want visuals. Player pictures, item pictures, etc. Intricate combat system. And I want to build it with the idea that eventually it will be ported to mobile. You won't be able to go crazy on your phone in a text based game.. but if you want to handle political affairs, or grind out a little exp then it would be possible.

I unfortunately never met any friends in the 'real' world who shared my interests. I would hope that If I can at least get a project started and possibly start posting results.. than next year around this time I could have a demo and possibly attract other people to join the team.

But I've been interested in this idea for quite some time. Just wasn't sure where to start. I did check out the "Evennia" Python 2.7 community.. but I was to understand that C++ would be 10x faster than Python should I ever need that speed I would hate to have to recode my whole project later. Why not just start where I hope to be headed, right?

But I definitely think with your knowledge and love for MUDs that you shouldn't let them die, either.
[Go to top] top

Posted by MJohnHBerry   USA  (9 posts)  [Biography] bio
Date Reply #5 on Sat 25 Feb 2017 01:20 AM (UTC)
Message
Hey, sorry for bumping this. I have no clue how to build this file, lol. The BetterMUD is saying that it's not able to be compiled with new versions of Visual Studio. So I'm not sure how you guys got it running. And the tinymudserver I can't build because I don't know where to enter
gcc tinymudserver.cpp -o tinymudserver -g -Wall

or where to type 'make'. A little help?
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Sat 25 Feb 2017 08:19 AM (UTC)
Message
Quote:

I want it to be a MUD.. but I want visuals.


Me too.

Quote:

Player pictures, item pictures, etc. Intricate combat system.


Same.

Quote:

I unfortunately never met any friends in the 'real' world who shared my interests.


That's exactly what happened to me!

Quote:

I don't know where to enter

gcc tinymudserver.cpp -o tinymudserver -g -Wall


Time to ditch Windows. Either install Cygwin (Unix under Windows) or get yourself a Linux PC. Believe me, life is a lot easier! I even run MUSHclient under Linux (both as a Wine program and using a VirtualBox Windows subsystem).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #7 on Sat 25 Feb 2017 10:45 AM (UTC)
Message
Quote:
The BetterMUD is saying that it's not able to be compiled with new versions of Visual Studio.

Can you be more specific? The newer visual studio should convert the old sln and vcproj files to the new format for you. Anything else will be modern compiler errors that are probably fixable.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by MJohnHBerry   USA  (9 posts)  [Biography] bio
Date Reply #8 on Sat 25 Feb 2017 04:53 PM (UTC)

Amended on Sat 25 Feb 2017 09:23 PM (UTC) by MJohnHBerry

Message
Alright:
I had to click 'Open in Visual Studio' from the Gitub website in his repo section.
http://tinypic.com/view.php?pic=vzvmuw&s=9

When I click files to view inside of the project I get:
http://tinypic.com/view.php?pic=1z4weib&s=9

Then this:
http://tinypic.com/view.php?pic=r0yvit&s=9

And finally I go back to Visual Studio and get this:
http://tinypic.com/view.php?pic=28ssny0&s=9

And I'm looking into dual-booting Linux right now. I've wanted to try it out forever ago but I've just always used Windows and was intimidated.

Do you guys use Skype or Discord?
MJohnHBerry#3634 - Discord
MJohnHBerry - Skype
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #9 on Sat 25 Feb 2017 09:21 PM (UTC)
Message
So, at the risk of being _that_ guy..

Is learning C++ the means to learning how to build a MUD server? Or is having a MUD server the reason you want to learn C++?

If the latter, is there a reason you are opting for C++? The language is powerful, but I'd consider it a venerable minefield and not very productive.

There are some really interesting and already existing mud codebases out there. Most are written in C(++), but there's a couple written in languages that are a lot easier to digest due to the lack of housekeeping and other forms of verbosity.

Not reinventing the wheel - or being very good at borrowing features - is something that ought to not be underestimated. It can be very effective in just keeping yourself going simply because you keep seeing results that are also useful. Starting from scratch as a novice, it can be really easy to spend ages of finnicky details that are trivial on first glance, but end up surprisingly gotcha-ey and hard to debug (Sockets, I am talking about you.)
[Go to top] top

Posted by MJohnHBerry   USA  (9 posts)  [Biography] bio
Date Reply #10 on Sat 25 Feb 2017 09:32 PM (UTC)

Amended on Sun 26 Feb 2017 10:23 AM (UTC) by MJohnHBerry

Message
Oh, well.. I actually started off with Python and checked out the Evennia community. I am opting for C++ because of it's speed and I've always kind of been interested in learning it. However, I am no where near ready to 'start' the project I am after. I am just interested in these projects that are doing the difficult server setup for when I -am- ready to start my project.

If I could get that BetterMud up and running, or even the Tinymudserver, that would be a great starting point. I imagine in a few months after I've completed a few dozen minor/medium sized projects to get me in shape on C++ I'll start to grasp what exactly is going on behind the scenes here with these servers.

I've got like 100 pages of hand written pages and plenty of information saved on my laptop about my dream game. So now I just need to get to learning how to use it. I also want my game to have a stand-alone client. Other clients won't be able to connect to it.

I would also like to touch up on LUA and use it as my games scripting language for quests, etc. Or possibly Python.
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #11 on Sun 26 Feb 2017 03:33 AM (UTC)

Amended on Sun 26 Feb 2017 03:35 AM (UTC) by Nick Gammon

Message
I think the TinyMudServer compiles OK. For example under Cygwin I just tried it:


$ git clone git@github.com:nickgammon/tinymudserver.git

Cloning into 'tinymudserver'...
remote: Counting objects: 81, done.
Receiving objects:  34% (28/81)remote: Total 81 (delta 0), reused 0 (delta 0), pack-reused 81
Receiving objects: 100% (81/81), 41.36 KiB | 0 bytes/s, done.
Resolving deltas: 100% (36/36), done.
Checking connectivity... done.

$ cd tinymudserver/

$ make
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c tinymudserver.cpp
g++ -MM  tinymudserver.cpp > tinymudserver.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c strings.cpp
g++ -MM  strings.cpp > strings.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c player.cpp
g++ -MM  player.cpp > player.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c load.cpp
g++ -MM  load.cpp > load.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c commands.cpp
g++ -MM  commands.cpp > commands.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c states.cpp
g++ -MM  states.cpp > states.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c globals.cpp
g++ -MM  globals.cpp > globals.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c comms.cpp
g++ -MM  comms.cpp > comms.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c room.cpp
g++ -MM  room.cpp > room.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -o tinymudserver tinymudserver.o strings.o player.o load.o commands.o states.o globals.o comms.o room.o

$ ./tinymudserver.exe
Tiny MUD server version 2.2.0
Accepting connections from port 4000


See? No problems. Use Cygwin and ditch Visual Studio. It only took a few seconds to compile.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by MJohnHBerry   USA  (9 posts)  [Biography] bio
Date Reply #12 on Sun 26 Feb 2017 11:58 AM (UTC)

Amended on Sun 26 Feb 2017 09:39 PM (UTC) by MJohnHBerry

Message
I hadn't realized that the BetterMUD code hasn't really been working in like 10 years. After some more searching around for it I can see that I'm not the first person here to try and find/use it. Looks like it's mostly broken now and probably wouldn't be a good starting point to learn from as there are, I would imagine, more advanced ways of doing what he did 15 years ago. So I'll probably end up just starting off with your tinymudserver, Nick.

$ make
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c tinymudserver.cpp
g++ -MM  tinymudserver.cpp > tinymudserver.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c strings.cpp
g++ -MM  strings.cpp > strings.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c player.cpp
g++ -MM  player.cpp > player.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c load.cpp
g++ -MM  load.cpp > load.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c commands.cpp
g++ -MM  commands.cpp > commands.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c states.cpp
g++ -MM  states.cpp > states.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c globals.cpp
g++ -MM  globals.cpp > globals.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c comms.cpp
g++ -MM  comms.cpp > comms.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -c room.cpp
g++ -MM  room.cpp > room.d
g++ -g3 -Wall -w -pedantic -fmessage-length=0 -o tinymudserver tinymudserver.o strings.o player.o load.o commands.o states.o globals.o comms.o room.o

$ ./tinymudserver.exe
Tiny MUD server version 2.2.0
Bad vnum '' for exit  for room 1000
Bad vnum '' for exit  for room 1001
Bad vnum '' for exit  for room 1002
Bad vnum '' for exit  for room 1003
Bad vnum '' for exit  for room 1004
Bad vnum '' for exit  for room 1005
Accepting connections from port 4000
**** Terminated by player on signal 2 ****

Closing all comms connections.
Game shut down.
[Go to top] top

Posted by Nick Gammon   Australia  (21,321 posts)  [Biography] bio   Forum Administrator
Date Reply #13 on Sun 26 Feb 2017 09:33 PM (UTC)

Amended on Mon 27 Feb 2017 04:19 AM (UTC) by Nick Gammon

Message
Quote:

Bad vnum '' for exit for room 1000


OK, so it compiled OK. Is that the latest version of the server? Recently there was a fix about that. If you pulled it from Git, check you have the latest. You can do:


  git fetch
  git merge origin/master


Or if you downloaded the .zip file, get it again.

In particular, this commit:

https://github.com/nickgammon/tinymudserver/commit/1e42533151b1c

(You could check line 115 of load.cpp).

I am pretty sure the issue there is line endings on the rooms.txt file. The file should look like this:


1000
Starting room (room 1000).%rYou are standing in a fabulous, fabulous, exotic room, with all sorts of things that go 'hum' and 'plink' in the night.%r%rAs you glance around the room, you wonder what else might exist in this world.
n 1004 s 1001 e 1002 w 1003
1001
Room 1001.%rYou are in room 1001. It could look better. What a let-down! This rooms has no alabaster walls, no mystic fireplace, no marble floors.
n 1000
1002
Room 1002.%rYou lounge around in room 1002. The floors are carpeted with a sort of wool-nylon blend, so favoured in caverns these days. There is a corridor to the east.
w 1000 e 1005
1003
Room 1003.%rThis rooms looks as if it has been rough-hewn from the very granite that forms the basis of the world itself. Unfortunately the general effect is submerged somewhat by the presence of many audio CDs stuck to the wall with sticky tape.
e 1000
1004
Room 1004.%rThis is the training room. One day you might receive all sorts of interesting training here. Perhaps you might even purchase shields and armour. But not today.
s 1000
1005
Eastern corridor (room 1005).%rThis east-west corridor looks like it could be interesting to follow.
w 1002


Try editing the file in a text editor and re-saving with different line endings (eg. DOS rather than Unix).

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Fiendish   USA  (1,641 posts)  [Biography] bio   Global Moderator
Date Reply #14 on Mon 27 Feb 2017 12:24 AM (UTC)

Amended on Mon 27 Feb 2017 12:27 AM (UTC) by Fiendish

Message
MJohnHBerry said:

And finally I go back to Visual Studio and get this:
http://tinypic.com/view.php?pic=28ssny0&s=9


An error message saying that the compiler cannot find errno.h isn't a problem with the source. It's a problem with your install of Visual Studio. Either re-install, fix the install, or go find where your errno.h file actually lives if it's actually sitting somewhere and tell VS where to get it.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] 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.


4,367 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]