Top Mud Sites Forum

Top Mud Sites Forum (http://www.topmudsites.com/forums/index.php)
-   MUD Coding (http://www.topmudsites.com/forums/forumdisplay.php?f=9)
-   -   Telnet Options? (http://www.topmudsites.com/forums/showthread.php?t=466)

Raewyn 02-04-2006 11:33 PM

Hi everyone,

I've been tinkering around with SocketMUD to study ways sockets work. The C++ version of the program is nothing more than a simple program that echoes messages back to the client.

While I am unsure if it was caused by the program, I did encounter strange behaviors when using a simple terminal to test it. I am unsure if this is specific to the code in use or if it happens regularly with any terminal. When I'm connected to the server, I can type a message -- but when I attempt to use backspace the output gets garbled.. example:

Hi there!
Hi there^R
Hi ther^R

That's what gets placed on the screen when I type "Hi there!" and hit the backspace key two times.

What causes this? Are there ways of preventing this from happening, and if so, what other things should I look out for if I want to create an intuitive interface?

Thanks,

Rae

Smith 02-05-2006 09:58 AM

When coding a mud you need to handle the backspace character to delete previous input characters yourself, as if the telnet client which connects is in character mode rather then line mode, it is the servers responsibility to handle this correctly.
However, the situation you have sounds almost like you are using a client which is in line mode, but is automatically typing ctrl-R for you each time you press delete. In a unix-like console running in line mode ctrl-R refreshes the current line to the screen incase you have become confused because of other text received while you were typing. It can be paticually confusing while backspacing, so a console may 'help you out' by typing Ctrl-R each time you press delete.


All times are GMT -4. The time now is 02:47 PM.

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright Top Mud Sites.com 2022