|
MUD Engine: v0.05 - Online! |
LSd016
Member #3,561
May 2003
|
When you develop it into a stable system with scripting support, think about adding some simple story. Like a legendary sword buried in dungeons of the Kraków castle, which can then be used to defeat the mighty dragon sleeping deep inside the nearby lair. ____________________________________________ |
Derezo
Member #1,666
April 2001
|
Yeah, I intend to have a small base story in areas that I build. Then other areas that are built by other people will be sort of like side quests. There will eventually be more side quests than there is a base plot.. In a MUD though, it's difficult to keep a story throughout the entire thing.. since there's no real "beating" it.. just finishing different quests and what not.. So there never really is an end, when you finally save the world and vanquish all evil... you just kill evil (or good!) in different lands, and in different ways. "He who controls the stuffing controls the Universe" |
Thomas Fjellstrom
Member #476
June 2000
|
OF COURSE theres no real beating it yeesh, when you kill someone they don't die! Hows that work eh? (I'm dumb! or should I say "doesn't work".) -- |
Derezo
Member #1,666
April 2001
|
MUD said:
You have been KILLED!
When you kill npcs they die properly though. "He who controls the stuffing controls the Universe" |
Radagar
Member #2,768
September 2002
|
Heh, you're well on your way to having a decent MUD. Keep up the good work =) This thread inspired me to grab a stock copy of Smaug and start playing with it. So far, I'm having fun! ------------ |
Thomas Fjellstrom
Member #476
June 2000
|
How do you feel Derezo? You're know Inspiring! -- |
Derezo
Member #1,666
April 2001
|
emote sniffles. I feel so proud! Text games are definitely the most fun to program. You don't need any media (images, music, sounds, models) to start it up. Not even programmers art! BTW, Oscar, I can't see a problem in the name validation code. If you use the arrow keys to move your cursor back from the client, it sends the keys as part of your name.. and arrow keys aren't alpha characters.. so, it makes your name invalid. So if you pressed Gn<leftarrow>i<enter>, it would actually send it in that order. The i would be after a left arrow which is after the n. Stupid windows telnet. If that wasn't the problem, then I'll need to double check my buffering code to make sure it doesn't add characters on the end under certain conditions... and maybe strip spaces off the name when I check it, just in case. "He who controls the stuffing controls the Universe" |
X-G
Member #856
December 2000
|
Some telnet clients send some control sequences on connect that your server might not be able to cope with. These might be interpreted as part of the name on first attempt. -- |
Oscar Giner
Member #2,207
April 2002
|
Nope. I press 'Gin', only, no other character. It fails the first time, and accepts it the second. I tried a name with more than 3 characters and the same happens: the first time I connect and enter the name it says that the name should have at least 3 letters. I use Putty. I've tested with windows telnet and it works. (I spend some time trying to figure out how to set the port). So the problem doesn't seem to be CheckNameReq. One speed tip: save the value of strlen(str) in a variable, so there's not a function call every loop -- |
X-G
Member #856
December 2000
|
Like I said. Telnet sends control characters on connect. Derezo's server thinks these are part of your name (and obviously, they are not alphanumeric, hence the error). You can't see them, but they're in there. With putty, you could try connecting in Raw mode rather than Telnet mode. -- |
Oscar Giner
Member #2,207
April 2002
|
Yes, connecting in raw mode solved the problem. [edit]
I have 64090 HP! -- |
Derezo
Member #1,666
April 2001
|
Hmm.. I'll hafta look into that HP bug. CGames said: Derezo, you must send \r instead of \n, eh?
Yep, working on fixing them all. CGames said: Derezo, did you add support for backspace? if you did, you did, it seems to be a bit buggy. Yeah... I'll hafta check it out. I noticed sometimes it skips them for some reason. (Oh how I hate windows telnet..) X-G said: Some telnet clients send some control sequences on connect that your server might not be able to cope with.
It's not top priority, but I'll look into that. Oscar said: save the value of strlen(str) in a variable Yeah. Thanks for reminding me. In my head I was thinking it was only called twice.. but no, it's called every loop "He who controls the stuffing controls the Universe" |
CGamesPlay
Member #2,559
July 2002
|
Well, actually, this is the problem I've found with the backspace: > lookk^H<enter> Huh? > lookk^H <enter> //... > looo^hk<enter> //... > In other words, when you recieve a backspace, you decrement your string pointer, but what you should do is set the current location to ' ', then decrement. or even '\0'. -- Ryan Patterson - <http://cgamesplay.com/> |
Derezo
Member #1,666
April 2001
|
Of course. That's why sometimes if I do multiple backspaces it does nothing.. Thanks. "He who controls the stuffing controls the Universe" |
CGamesPlay
Member #2,559
July 2002
|
Also in Win telnet, I notice the death messages look something like this: SOmething something! blah! d dropped 31 platinum // assume 80 cols here coins! > Is that because of the \n problem? I thought a \n went to the next line and flushed, \r just flushed. Am I wrong? -- Ryan Patterson - <http://cgamesplay.com/> |
X-G
Member #856
December 2000
|
\n goes to the next line, \r resets the cursor to the column 0 again. -- |
Thomas Fjellstrom
Member #476
June 2000
|
\r is a carrige return, which returns the "carriage" to teh start. \n is a line feed, which feeds another line... Think in typwriter terms. a \n without a \r will just advance a line, a \r will just return the cursor to the start of the line. add em both and you get tot he first char on the next line. Thankfully, the best OS's chose a single char to do newlines. Derezo, have you looked at any Telnet specs? so you can correctly handle the Telent protocol? (yes, there is a protocol spec, it tells you how everything is handled, and lists the various controll chars) -- |
CGamesPlay
Member #2,559
July 2002
|
Ok, and in UNIX, \n does both? -- Ryan Patterson - <http://cgamesplay.com/> |
Thomas Fjellstrom
Member #476
June 2000
|
in text files and such.. yeah, and \r is just a carriage return. -- |
spellcaster
Member #1,493
September 2001
|
Isn't it great that Win, Unix and Mac all havwe different ways to handle the end of line? Makes programming more interesting ... -- |
Derezo
Member #1,666
April 2001
|
SC: Not unless by more interesting you mean more frustrating. Quote: Derezo, have you looked at any Telnet specs? so you can correctly handle the Telent protocol?
Nope. I'm winging it! "He who controls the stuffing controls the Universe" |
Thomas Fjellstrom
Member #476
June 2000
|
ugghhh... It will be sooo much easier if you dont have to worry about telnet getting int he way. -- |
Derezo
Member #1,666
April 2001
|
Yeah, I know. If windows telnet were non existant, I would still be using my old buffering method Now I treat the network like a keyboard buffer and use a readkey-style method of reading from it. "He who controls the stuffing controls the Universe" |
Thomas Fjellstrom
Member #476
June 2000
|
Thats how I had to deal with my HTTP server. belive that or not.. Headers are evil you can have multiple lines in one header, and stuff.. so I read one byte at a time till I find my plain \n or two \n\n... that header reader func is a wee convoluted. But what I meant, is if you followed the telnet specs (which most other protocols are based on, ie: ftp, http...), you wouldnt be having this problem I bet -- |
Radagar
Member #2,768
September 2002
|
Yeah, but who likes following a SPEC? I mean, come on.. takes all the fun out of it! Oh, wait.. I probably shouldn't be answering for Derezo. goes back into his MUD ------------ |
|
|