• Advertisement

Archived

This topic is now archived and is closed to further replies.

Online text based game

This topic is 5096 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What programming would i need to make a text based game? php? Perl? javascript? I am buying a book in a few hours so.... thank you

Share this post


Link to post
Share on other sites
Advertisement
If you''re thinking of something like a MUD, and have no real background programing, I would recommend downloading one various open-source or public domain MUDs and cut your teeth on adding new classes/skills/etc. to one of them. I started out this way making modifications to the ROT codebase - adding various features and such. If you don''t have a UNIX server to run a MUD on, there are ones that run on Windows as well. If I find a good site with some examples, I''ll post it here.

BTW, ROT in done in C, as it''s based on Diku.

Share this post


Link to post
Share on other sites
Thanks, could someone please define MUD please?

My server does support PHP, dont know about Unix though

Share this post


Link to post
Share on other sites
Thanks, could someone please define MUD please?

My server does support PHP, dont know about Unix though

Share this post


Link to post
Share on other sites
Multi
User
Dungeon

---------------------------

std::cout << "Pwned.";

[edited by - Dagnarus on February 8, 2004 1:02:06 PM]

Share this post


Link to post
Share on other sites
If your server is a webhotel then you probably don't have the option of running your own programs in C, Java etc.
If you want that you need to run it on your own comp or get a shell account which is quite expensive.
Writing a MUD in PHP wouldn't be a good idea because of http's client-server structure. I would go for a turn-based game, like Archmage.
For that you'll need a database too, like MySQL.

Oh yeah MUD: Like Dagnarus said it's a MultiUser Dungeon.
Typically it's a real-time textbased online adventure/rpg game. To play it all you have to do is connect to the server with telnet or a mudclient. http://www.mudconnector.com is a good place to find muds. (Careful, it might get VERY addictive if you like it)

***
For Java games and Java related resources, go to http://www.javaengines.dk
***

[edited by - blackone on February 8, 2004 7:24:34 PM]

Share this post


Link to post
Share on other sites
I am currently developing a MUD myself from scratch. One thing to say, it''s not really a beginners project. You are going to have to deal with sockets, threading, proper timing, items, rooms, users, combat, etc. My current system is around 2500 lines of code, only supporting rooms and users with privileges and a handfull of commands.

If you still want to develop your own MUD, take a codebase and work from there. If you got the hang of things, you can always write your own codebase.

Toolmaker



-Earth is 98% full. Please delete anybody you can.

Share this post


Link to post
Share on other sites
Or maybe someone could give me their mud? well the code at least. What sort of ''file'' are the names stored on? Php? I guess when the person signs up to this multi userer thing, a code is created for them and is updated every time they do something like ''gain points''...

thanks

Share this post


Link to post
Share on other sites
Mine is still heavily under development. I currently have working user login/logoff, rooms and account creation. So far I am tweaking the server and removing a hand full of bugs before moving on.

As storage I use a MySQL server using a self written MySQL wrapper class that directly connects to the database(MySQL DAO v0.1.3) using the MySQL API. This has some advantages over using files, since data storage is handle by an external application. And the library built in type conversions, so data can be retrieved with great ease:


CMySQLRecordset Res;

Res = Database.OpenRecordset("SELECT * FROM ROOMS");
Room.Name = Res.FieldToChar("R_Name");
Room.Id = Res.FieldToLong("R_ID");


The MUD itself is written in C++, running in an empty Win32 window. This will later on be replaced to make it a service. This will make the MUD server start on server boot.

Data for a user is maintained "online" in the MUD''s memory. This has the advantage that user data is much more quickly accesseable that needing to retrieve it everytime from the DB for checking/updating. The data is forcefully stored after each 60 minutes of online time for a user. When a user disconnects, it''s profile is saved aswell.

I do not plan on handing out the source, at least not in it''s current form since it''s buggy, not well coded and under development. Best would to take an existing code base, such as ROT, CircleMUD or whatever.

Toolmaker

ps. If you plan on making your own MUD, start with sockets first, and read the first chapter of MUD programming book(It''s in the article section) and Andrew Russell''s MUD pies part 1.




-Earth is 98% full. Please delete anybody you can.

Share this post


Link to post
Share on other sites

  • Advertisement