I know a little of asp.net, but one thing is bugging me before I write a simple multiuser dungeon with it, the fact that you can only refresh the html when the user clicks a button to, it cant be automatically triggered from the server... or can it? Does anyone know this?
Or is php or some other language something I should use, cause it enables this "auto resend updated page"
Thats the thing thats bugging me at the moment, without it the game is just about working, but with only a really nasty "click me updated" and you could dead if you dont click it every now and again.... just in case a monster starts eating your toes off, youd never know until you clicked "update" which makes no sense at all.
You can absolutely have the server update the page continuously. It is called "Comet". Some languages are not a very good fit for this, though, like PHP. PHP will usually have a execution time limit of 30 seconds or so. It an be configured, but most web hosts won't let you.
Oh! And**learn jQuery**! It will save you hours and hours of pain, and teach you good functional design.
cheers geon for the advice, I guess it would be more bandwidth hungry than a client server exe setup, where you could compress and decompress messages, and really cut them down, how much extra bandwidth do you waste sending html?
COMET is a generic term for any asynchronous information fetching. It's also known as HTTP streaming. An HTTP server can be set such that connections do not timeout and keep flushing buffers such that the client can make use of constant flow of info.
It is likely to be upstaged by HTML5's Websockets, so make sure you consider that too.
Of course, what you want to use is a cross-platform, cross-browser framework that abstracts COMET, Websockets and other solutions (like long-polling, which has nothing to do with pron), ex: orbited.
Also, the HTML5 spec has another possible "tool" called Server-Side Events, which is unidirectional push from server to client.
how much extra bandwidth do you waste sending html?
The format is basically
memberName: "some string",
yetAnotherOne: ["an", "array", "of", "strings"]
The wasted bandwidth wouldn't be that bad. Basically HTTP headers + the raw data in text format + whatever member names you use. It would compress pretty well too, if you enable gz compression on the server. I know Apache supports that. It is part of the HTTP protocol.