Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Implementing Web-based RPG fighting?

Reply
Thread Tools

Implementing Web-based RPG fighting?

 
 
Leif K-Brooks
Guest
Posts: n/a
 
      05-21-2005
I'm in the process of coding what amounts to a Web-based multi-player
RPG. An important feature will be player-versus-player fighting. Since
the players in a fight will never move instantly (or even close to it),
there will need to be a way to inform players when their opponents have
made a move.

The most common implementation I've seen is using the Refresh header
(possibly simulated via http-equiv -- ew!) with a period of around one
refresh per second. When the opponent has moved, the page stops
refreshing and displays the results of the turn along with a form for
the player to make their move.

This approach has a few problems: it's non-standard (although
widely-supported, the Refresh header isn't in any HTTP spec), the
constant reloading can cause high server load, and it takes at least one
second for a player to be notified of their opponent's move (since
that's how long it takes for the page to refresh).

One alternative I've thought of is having keeping the HTTP connection
open until the opponent moves, so that the page would look like this:

------------------------------------------------------------------------
<p>Your opponent is moving, please wait...</p>

(The page will stop loading at this point, but the connection will stay
open. When the opponent moves, the loading will continue

<p>Your opponent, <strong>Big Meanie</strong>, has kicked you in the
crotch doing 30HP of damage.</p>
------------------------------------------------------------------------

Unfortunately, this approach has a few problems of its own: the user
might be confused by the page continuing to load even when nothing
appears to be happening; some proxies would probably only send the user
the page once it has been completely sent by the server (which could
take over a minute in some cases); some browsers might timeout the
request after a while; also, this approach would work with an
asynchronous server, but wouldn't work so well with a multi-threaded or
multi-process server (since the whole thread or process would be tied up
until the opponent moved).

Does anyone have suggestions for approaches I haven't thought of?
Accessibility is a concern, but I recognize that this might be something
that simply can't be done in every environment, so my biggest concern at
the moment is usability in common visual browsers.
 
Reply With Quote
 
 
 
 
Travis Newbury
Guest
Posts: n/a
 
      05-21-2005
Leif K-Brooks wrote:
> I'm in the process of coding what amounts to a Web-based multi-player
> RPG.....


Why would you want to do this when there are so many obviously better
options out there. I seriously doubt someone who wants to play a RPG on
line is worried about using Flash or Java or (maybe less so) activeX.

I am not trying to be a smart ass, I seriously want to know why you dont
want to use those technologies. What you are proposing is akin to using
a chisel and rock to send mail.

--
-=tn=-
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
E3 Hands-On with The Witcher: A Small RPG Looking to Make it Big @ ThinkGaming.org Silverstrand Front Page News 0 05-17-2006 12:38 PM
My small RPG in UML weer1@gmx.net Java 4 09-26-2005 10:03 AM
I want to make a scrolling RPG game... Kevin Jennings Java 4 06-06-2004 11:11 PM
Volume while playing an RPG Fito Computer Support 6 04-03-2004 01:32 PM
Re: AMAZING ADDICTIVE FREE RPG *NOT OUTWAR* 2442 MiniDisc_2k2 C++ 1 07-03-2003 04:03 PM



Advertisments