On Aug 19, 10:05 am, Jooma __ <[email protected]> wrote:
> [b]The Problem:[/b] I want to include PVP as an option. So if you're in
> a zone and you see in your /who list another player from the opposed
> faction, you can choose to attack them. But how do I implement this so
> they can join in turn based combat? I was looking at Smartfox Server
> lite, but this is just a project for friends and friends of friends. I'm
> with HostGator and I really don't think I can install something like
> Smartfox on the shared hosting server.
>
> Also for Chat, I was thinking of just having a database that stored the
> last 30 or so entries and updated them on refresh. Is there a better way
> to implement that on a shared hosting server?

I think at the very least, you'll need to use a Xen-based VPS where
you get root access, such as a Rackspace Cloud server.

I'd look at messaging/queuing options, such as Jabber/XMPP or AMQP
implementations. That'd work for both managing a turn-based combat as
well as chat. You'd write it like the old MUDs. If you're willing to
sacrifice HTML4 support, you can try the Websocket stuff in HTML5 and
require all players to install browsers that support it (such as
Chrome and Safari).

I wouldn't try using a browser-refresh scheme written using Rails; a
background process at the very least or a separate server using
http://www.mikeperham.com/2010/04/03/introducing-phat-an-asynchronous-rails-app/
, or even using Node.js for the server-side. The Rails side would work
well if you take advantage of REST to describe resources (such as,
descriptions of game objects and user avatars), but not specifically
to manage the combat (ephemeral, state-ful, evented system vs. the
shared-nothing, stateless system that Rails and the Web is based on).
So I think Redis works better than a SQL db for handling the combat
states itself.

The downside is that this starts getting pretty intricate. The beauty
of the auto-combat system in current web-browser games is that they
give the *llusion* of control, which is enough for most players (see
http://blog.wolfire.com/2009/07/creating-the-illusion-of-accomplishment/).
If you implement AIs as part of the gameplay, I suggest looking at
making its perceived user control of the new system match the
perceived user control of the old system.

Good luck.

Ho-Sheng Hsiao
http://ruby-lambda.blogspot.com/

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to