Making a Telnet-based game?

Started by
17 comments, last by Kylotan 17 years, 9 months ago
Hello everyone! You guys gave me some good tutorials on pixel art - but I just suck at it... Anyways. I'm not very familiar with Telnet, and I've only used it a couple of times... But I've seen some people making online games for it... Here's some questions I have: 1. Can I code it in C or C++? 2. Do people need broadband Internet? 3. Is it cross-platform? I assume so, since it just sends data to a Telnet client... Thanks!
Advertisement
1. Yes, you can. Or vb, or java, or asm, or whatever other language you have that has access to sockets.
2. Nope. You could use a 300 baud modem if you wanted to. Thats why these things were popular way back when, because the amount of data really is small (and the latencies that you can have are rather large :))
3. Yes, it is cross platform. Anybody with a telnet client (or similar) can play your game :)

Are you interested in making a little mud using telnet?
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
What the... Really?! That's so damn cool! :D
I haven't really thought of what the game will be, I'll learn network proggying before going onto that... Hey, what libs do you recommend? I've used SDL_Net, but I tried to go too complex without actually knowing anything... *Embarrassed*
Thanks!

[edit] Can I use color too? [/edit]
Colour, in telnet. Yes, you can. Assuming you can find the characters.... (telnet does what you tell it to do. Its a dumb terminal).

In C++, SDL_net should be fine. Theres a reson muds are so popular. It doesn't have the insane sort of complexity that other games have. (even the world itself is easier to make).

[Edited by - Nice Coder on November 24, 2009 3:22:14 AM]
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Wikipedia has a list of the commands you'd want to use to get color in telnet here.

If you want to set up a proper server you'll also want to implement the functionality described in RFC 854 as well, although most MUD servers and similar applications can safely ignore that. (Unless you're interested in more complex features like MCCP)
-Arek the Absolute"The full quartet is pirates, ninjas, zombies, and robots. Create a game which involves all four, and you risk being blinded by the sheer level of coolness involved." - Superpig
Remember to correctly implement the telnet protocol, it is easy to get it wrong. There are a lot of crap and broken clients out there too you have to work with (NCSA telnet, Windows telnet).

I don't think it's something that you should really be doing in 2006 :)

Mark
MUD development is a fine tradition, and something you can certainly do in 2006 -- especially to learn. If you want to shoot for an MMORPG in the future, doing a MUD first would be an excellent way to learn (better than, say, a single-player 3D game, in some respects).

There are lots of resources on developing MUDs online, just google for something like "MUD telnet development" and you'll find what you need. I recommend implementing at least the very basics of the telnet protocol correctly (offer and request, IIRC) else some clients will be very confused.

There are also some MUD development mailing lists, such as (IIRC) MUD-DEV you might want to check out (there are FAQs and archives online).
enum Bool { True, False, FileNotFound };
Sorry to butt into this topic, but don't most firewalls block the Telnet port 23 because its not very secure? (Easy filtration into your system?)
D. "Nex" ShankarRed Winter Studios
Most firewalls worth anything will block absolutely every port except those you choose to open. So, simply choose to open port 23. There's no danger there. Having said that, most MUDs or other telnet-like games don't run on port 23 anyway, instead choosing an arbitrary one above 1024. (Not that it makes any significant difference on a security level - it's the services you're running that constitute the risk. Ports are really just numbers.)
You can run the telnet protocol on any port. A MUD will typically expose the port in question as part of the address -- "For glurb-mud, do 'telnet glurb.mud.com 1234'".

Also, firewalls may block port 23 for incoming connections, but as a telnet client, you are making an outgoing connection. Presumably, if the other end is hosting a telnet server, they arrange for the appropriate ports to get to the server.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement