Closed Thread Icon

Topic awaiting preservation: would a mud be possible? Pages that link to <a href="https://ozoneasylum.com/backlink?for=26056" title="Pages that link to Topic awaiting preservation: would a mud be possible?" rel="nofollow" >Topic awaiting preservation: would a mud be possible?\

 
Author Thread
gunder
Nervous Wreck (II) Inmate

From:
Insane since: Apr 2005

posted posted 06-17-2005 22:14

I know I just made a post about generating a hex map but this just popped into my head. If I were to use javascript and php would a web based mud be possible? I would have the actual game engine written in php and use XMLHttpRequest and javascript to get the input/output. I am currently working on a interactive fiction engine in javascript just for fun and thought it would be fun if a mud would at all be possible. After seeing the chat boxes that are on so my web pages now and looking at weboggle, I would think it would be possible. Probably not the easiest (or smartest) way to do it, but it would be a fun experiment. So could it be made to work or is my understanding completely off?

-gunder

TwoD
Bipolar (III) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 06-17-2005 23:08

I'd say it's possible.
If you only use JS to draw maps and generate dynamic lists or things like that PHP should be able to keep track of it all. You might need an SQL database to easier store all the info about players and items etc depending on what gamestyle you want.
Anything involving security should not involve JS, the rest is up to your imagination.

/TwoD

gunder
Nervous Wreck (II) Inmate

From:
Insane since: Apr 2005

posted posted 06-18-2005 00:42

TwoD,
Thanks, that's how I thought it would have to work. So it would be able to be real time then? For example say I was standing in this room and you walked in, would it be able to alert me as soon as you walked in or would I have to wait until the page was told to refresh? From what I remember about the chatterboxs I have seen around, it will only update every five seconds or so. I don't think that would work out too well.

-gunder

TwoD
Bipolar (III) Inmate

From: Sweden
Insane since: Aug 2004

posted posted 06-18-2005 02:25

I THINK you could use the xmlhttpwhatever object to request info about the current room say every second, if you can keep the call and respons short there should be no problems. If there's a new charry in the room the respons would say so. Same thing if someone leaves the room.
Never done this myself though, other people here are better at that.

/TwoD

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-18-2005 07:38

Yeah, you can basically do anything you want with HTTP (including a MUD) as long as it works under the restriction that the server can't tell the client anything except when the client asks for it.

So it's best if you avoid using any time-critical game mechanics. Give the player a list of players nearby and give them a little 'refresh' button. Frequent updates could cause bandwidth issues if the game got popular.


 

« BackwardsOnwards »

Show Forum Drop Down Menu