Author Topic: Allowing multiple logins  (Read 1317 times)

Offline edmazur

  • Level 6
  • *
  • Posts: 26
  • Reputation: +0/-0
    • View Profile
    • bots4.net
Allowing multiple logins
« on: February 02, 2010, 12:05:44 AM »
I want to allow multiple logins on my game, but I want it to be built into the game. That is, it shouldn't involve the user making separate browser sessions on their own. Players will have a main login which will bring them to a character select screen (think WoW character select). From there, you can load up multiple characters each into their own browser windows.

What would be the easiest way to implement this? You can't get by using just sessions now because you need to be able to distinguish between characters. The only way I can think of is to keep the character info stored in the url and maintain it across pages. For example, selecting character "mychar4" would load mygame.net/play.php?char=mychar4 and all of the links on that page would include char=mychar4 in the url. This could of course be cleaned up using something like mod_rewrite into mygame.net/mychar4/play.php. Any better solutions?
My game - bots4.net

Offline AcidicOne

  • Level 16
  • *
  • Posts: 147
  • Reputation: +0/-0
    • View Profile
Re: Allowing multiple logins
« Reply #1 on: February 02, 2010, 01:21:14 AM »
Using WoW as example is probaly best, keeping your login separate from chars. could probably call the chars the same as if they where items in your inventory,just a separate table with user id, char id etc to ink each individual char with the corresponding login account.


So you would have your user table

id,name,email etc

user_char table
main id- linking to the main account
char_id- if using say the tutorial stats setup to give each char individual stats/inventorys



keeping them entirely separate allows you to also be able to remove them individual by not linking anything between the chars,and allowing for less crossover just as used in WoW.
People Like You, Are the Reason People Like Me Need Medication

Offline edmazur

  • Level 6
  • *
  • Posts: 26
  • Reputation: +0/-0
    • View Profile
    • bots4.net
Re: Allowing multiple logins
« Reply #2 on: February 02, 2010, 01:33:39 AM »
Whoops, I should have been more specific. I'm talking about simultaneous logins on the same account: you login to your account and then fire up mychar4, mychar7, and mychar8, all into separate browser tabs/windows. I'm asking about how to track each character separately at this point. It seems traditional session-based approaches will not work with this scenario.
My game - bots4.net

Offline AcidicOne

  • Level 16
  • *
  • Posts: 147
  • Reputation: +0/-0
    • View Profile
Re: Allowing multiple logins
« Reply #3 on: February 02, 2010, 02:08:21 AM »
Not that I am trying to change you from your idea, but what exactly would be the reason for allowing multiple char logged in at the same time from one account? I only ask because that in itself would basically remove the need for multiplayer usage seeing a single user could basically run a "party" all by himsef.
People Like You, Are the Reason People Like Me Need Medication

Offline dsheroh

  • Level 21
  • *
  • Posts: 235
  • Reputation: +6/-0
  • Perl Vicar
    • View Profile
    • Psi Rangers
Re: Allowing multiple logins
« Reply #4 on: February 02, 2010, 02:36:18 AM »
I want to allow multiple logins on my game, but I want it to be built into the game. That is, it shouldn't involve the user making separate browser sessions on their own. Players will have a main login which will bring them to a character select screen (think WoW character select). From there, you can load up multiple characters each into their own browser windows.

What would be the easiest way to implement this? You can't get by using just sessions now because you need to be able to distinguish between characters. The only way I can think of is to keep the character info stored in the url and maintain it across pages. For example, selecting character "mychar4" would load mygame.net/play.php?char=mychar4 and all of the links on that page would include char=mychar4 in the url. This could of course be cleaned up using something like mod_rewrite into mygame.net/mychar4/play.php. Any better solutions?
I'd say that sounds like pretty much the only way to do it.  The only other alternative I can think of (within the context of a pure-HTML interaction with the server) would be a hidden form parameter to identify the character, but that's primarily applicable to POST requests and, in the case of GETs, it degrades into your idea anyhow.

I'll be interested to see whether a better option emerges, in any case.  One somewhere-down-the-road concept I'm working with for my current project is "emancipated clones", in which a player can spend some number of premium points to get additional in-game characters who are able to act independently, but I was thinking of it solely in terms of players being able to switch off between them at will.  Having multiple tabs open with a different clone in each tab hadn't occurred to me, but it would clearly be a very common use case now that you've mentioned it.

Not that I am trying to change you from your idea, but what exactly would be the reason for allowing multiple char logged in at the same time from one account?
Aside from it simply making in-setting sense for me, I see it as a tool in helping to minimize the rate of unsanctioned multis by making multi-character accounts an official part of the game.  Judging by the OP's opening sentence, I suspect he's had the same idea.

Also, I'm working with a model in which the player initiates an action, then it takes some amount of time for that action to complete.  (e.g., "Set course from Phobos to Mercury", then spend 15 minutes in transit before arriving.)  Being able to switch over to another character on the same account will give you more options for what to do in-game during that time.

I only ask because that in itself would basically remove the need for multiplayer usage seeing a single user could basically run a "party" all by himsef.
Is this necessarily a bad thing?  There are a lot of people (myself among them) who have complained in dedicated-client MMORPGs that they hate forced grouping.  If a player wants to play solo and only interact with other players via metagame channels (e.g., chat), then what's wrong with that?

Offline AcidicOne

  • Level 16
  • *
  • Posts: 147
  • Reputation: +0/-0
    • View Profile
Re: Allowing multiple logins
« Reply #5 on: February 02, 2010, 03:21:23 AM »
Not at all forced grouping  has its pro's and con's, Firstly I will be the first to admit i hate any game that forces me to solely depend on other players,that being said being able to do the majority of said game yourself is fine, but i do believe there should be some elements where users should be forced to act as a group ie Instances is WoW.But from a strictly owner/designer etc i can see how allowing multiples does basically dissipate the worrying about them,but also in the same respect is removing the community based element from the game if one where to allow the individual users the ability to do everything themselves.

All that being said If you where however say planning a Dungeon style game ie. Dungeon Dragons,Shadow Run etc where users had there main, and could make npc like chars that added to the storyline to help progress or add more variety to the DM, Or adding more of a Role Playing element then i could certainly see this system working great.
People Like You, Are the Reason People Like Me Need Medication

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Allowing multiple logins
« Reply #6 on: February 02, 2010, 08:29:38 AM »
Wouldn't it be better to have more of an "active character" mechanism instead of opening each in a new window by itself? Basically, you provide a party panel (think WoW again since you're familiar with it) but clicking on a character (you can also setup access keys for this) marks that character as being "active" and control is then switched to that character. This could still be represented with the standard session because it's simply an indicator of which character is currently selected. Unless your users have multiple arms and are very careful about how they setup their screens, they will be unable to control multiple characters at the same time.

It might be fun to test your theory out, but I have a very strong feeling that you're building in more complexity than is required and your UI is going to suffer because of it. Not to mention that you'll be burning up a greater amount of bandwidth for the multiple requests per player per character. However, if you're dead set on your current idea, the URL scheme seems like the only option that would work because the web server has no way to identify a particular window that a request is coming from.
Idiocy - Never underestimate the power of stupid people in large groups.


Offline dsheroh

  • Level 21
  • *
  • Posts: 235
  • Reputation: +6/-0
  • Perl Vicar
    • View Profile
    • Psi Rangers
Re: Allowing multiple logins
« Reply #7 on: February 02, 2010, 09:23:00 AM »
Wouldn't it be better to have more of an "active character" mechanism instead of opening each in a new window by itself?
<snip>
It might be fun to test your theory out, but I have a very strong feeling that you're building in more complexity than is required and your UI is going to suffer because of it.

An "active character" mechanism was my original plan, but, now that edmazur has brought up the multiple tabs question, I can see a definite potential for that to create UX issues.

Consider:

Player Joe has two clones of his character, Alpha and Beta.  He logs in to find Alpha on Earth, then opens a second tab and, in this second tab, checks on Beta.  Beta is now the active character and Joe sends Beta to Mars, then closes the tab.

Joe's screen now displays Alpha, still docked at Earth, but the active character is Beta, in flight from Mercury to Mars.  If Joe attempts to buy some water, he'll get an error message because, even though he sees Alpha at a market full of water, the order went to Beta, who can't buy or sell anything at the moment and isn't close to any water even if he could.  If Joe gives an order to move to Io, Alpha will remain on Earth, while Beta changes course.

It seems like a recipe for user confusion to me, unless you devise and implement something to prevent the user from opening your site in multiple tabs, which would bring about a whole raft of other issues.  "What do you mean I can't bring up multiple market displays at once so that I can compare their prices?"

(Now, granted, in my particular case, I've got an AJAX status display at the top of the screen which displays the character's name and stats, so, when Joe switched back to the original tab, it would be showing Beta's info rather than Alpha's, so it is possible to avoid this issue, provided that the user is allowing Javascript to run.  This may not apply in the OP's case.)

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Allowing multiple logins
« Reply #8 on: February 02, 2010, 09:39:31 AM »
You can't protect users against being stupid. If someone gets confused that clicking on a different character selects that character and they will need to re-select their original character to perform an action with it... they probably also get confused about why when they walk out to their car that they now can't put a steak on the stove for some reason. ;)

Of course, another solution exists now that I've been given a usage example. You see, in application terms (because a game is an application and not a website) clicking on a link, submitting a form, etc. is giving the system a command. If you have an active character mechanism, you can, therefore, link the commands for a particular request to a unique character.

In your above example, you could implement all of the links on the first page (character Alpha) to go to: {whatever URL}?char=Alpha

When the user opened a new tab when clicking on character Beta (in a new window / tab) then you've set that character as being active for that view. So, any actions (URLS) in that window would look like: {whatever URL}?char=Beta

You could also implement the system to set the active character if you receive a command with a character parameter. In this way, you could actually play the game in multiple tabs or in a single window and utilize the session parameter. But, you can only use this scheme if you have an identified, active character.
Idiocy - Never underestimate the power of stupid people in large groups.


Offline edmazur

  • Level 6
  • *
  • Posts: 26
  • Reputation: +0/-0
    • View Profile
    • bots4.net
Re: Allowing multiple logins
« Reply #9 on: February 02, 2010, 09:48:06 AM »
To give some more background, this is for an existing, relatively simple game where some players already use 2-3 accounts at once (this is allowed). This is usually done by using separate browsers. I just want to have it done in a controlled way.
My game - bots4.net

Offline dsheroh

  • Level 21
  • *
  • Posts: 235
  • Reputation: +6/-0
  • Perl Vicar
    • View Profile
    • Psi Rangers
Re: Allowing multiple logins
« Reply #10 on: February 02, 2010, 10:26:46 AM »
You can't protect users against being stupid. If someone gets confused that clicking on a different character selects that character and they will need to re-select their original character to perform an action with it...

There's "users being stupid" and there's "you see one character on the screen, but your commands will be sent to a completely different character and there is no visible indication of this".  If the first tab continues to say "Alpha is the active character" even after Beta has been made active in the second tab, then users are quite justified in believing that Alpha is still active on the first tab.

You see, in application terms (because a game is an application and not a website)

Ah, but a browser-based game uses a website as its interface, so it inherits the corresponding limitations...  (Damned multiple inheritance.)

In your above example, you could implement all of the links on the first page (character Alpha) to go to: {whatever URL}?char=Alpha

When the user opened a new tab when clicking on character Beta (in a new window / tab) then you've set that character as being active for that view. So, any actions (URLS) in that window would look like: {whatever URL}?char=Beta

Isn't that essentially the "URL scheme" that the OP initially proposed and which I thought you were arguing was "building in more complexity than is required and your UI is going to suffer because of it"?  Or did I misunderstand you somewhere along the way?

Note that I'm making a distinction between having a global "active character" who is implicitly identified in the game's session state and having tab-specific "active characters" who are identified in the URL.  As I read the discussion to this point, the OP asked about alternate ways of handling tab-specific active characters without having to put them in the URL, then you advocated using a global-active-character design instead, and I saw issues with that confusing users if the global active character changes without this change being reflected on previously-opened tabs; as a solution to that, you have now proposed using tab-specific active characters who are identified in the URL...  I get the impression that we may both be arguing the same side here.  :P

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Allowing multiple logins
« Reply #11 on: February 02, 2010, 11:09:08 AM »
Agreed. But the user knows that they've clicked another character. Though, I admit, in our culture attention spans are limited to 30 second intervals anyways and you're probably right that they'll forget. ;)

A website is not an interface. It's a collection of documents organized to be accessed via Universal Resource Location. Your interface consists of the web browser (which is responsible for rendering output from your application) and the protocol that you're using (typically http or https) which is your input mechanism. An application translates a command into a desired action. The web has moved beyond the "sites" concept and into the realm of an "application." It's helpful to the programmer to stop thinking of the URL as referring to a "page" and, instead, corresponding to a "command" issued to the application. The "page" is simply the output of the command. However, other results can be achieved with commands: redirection, data manipulation, media streaming / access, etc. Anyways, that's enough of my pet peeve of continued use of outdated terminology...

The above solution is the same (indeed, in my first post I specified this was the only option for playing multiple characters concurrently) with the addition that it becomes possible to play in a single or in multiple windows with multiple characters. As well as giving you a method of determining the URL to apply to the page without requiring an initial parameter. In the OP's method, there was a responsibility on the system for opening the additional windows, using the revision, that responsibility is left up to the end user who can play as they see fit.

However, I was wrong about the bandwidth consumption now that I actually saw a usage scenario. I had thought it more of a Neverwinter Nights style game where all the characters remain in, basically, the same game region and, therefore, there would be no need to re-render the region multiple times. The characters would always need fresh views so that consideration is unimportant.

I would suggest that you dismiss the use of clean urls for this unless you start getting a ton of user requests for this feature. Clean URLs are, mainly for SEO or (in smaller part) for ease of memory on the part of users (say, if they want to issue a specific command via direct entry rather than clicking a link). However, users who are going to prefer to direct-enter the URL probably possess enough intellect to determine how to do so from the current structure. And in the case of games, you really only want search robots to go to specific portions of your site (documentation, home page, etc.) and not really to allow them to try and "play" the game. You probably want to provide them with access to (and come up with a pretty URL scheme) for character or player profiles if you have them, but that would be about as far as a robot would need to go.

*edit - To clarify, my suggestion is only for improvement of the OP's suggestion. Not a new suggestion. I still believe there's no real need for multiple tab characters because I do not believe the interface would confuse them. But, you could always implement the "active character" and see if there is user confusion. If so, you can simply patch in the url solution on top of the active character solution if it's necessary. I'm just advocating a KISS policy here. :)
« Last Edit: February 02, 2010, 11:13:37 AM by JGadrow »
Idiocy - Never underestimate the power of stupid people in large groups.


Offline edmazur

  • Level 6
  • *
  • Posts: 26
  • Reputation: +0/-0
    • View Profile
    • bots4.net
Re: Allowing multiple logins
« Reply #12 on: February 02, 2010, 11:52:14 AM »
However, I was wrong about the bandwidth consumption now that I actually saw a usage scenario. I had thought it more of a Neverwinter Nights style game where all the characters remain in, basically, the same game region and, therefore, there would be no need to re-render the region multiple times. The characters would always need fresh views so that consideration is unimportant.

Ah yeah, bandwidth/system resources won't be an issue with this. It's a mostly text-based game and multiple concurrent logins is already common practice.

I would suggest that you dismiss the use of clean urls for this unless you start getting a ton of user requests for this feature. Clean URLs are, mainly for SEO or (in smaller part) for ease of memory on the part of users (say, if they want to issue a specific command via direct entry rather than clicking a link). However, users who are going to prefer to direct-enter the URL probably possess enough intellect to determine how to do so from the current structure. And in the case of games, you really only want search robots to go to specific portions of your site (documentation, home page, etc.) and not really to allow them to try and "play" the game. You probably want to provide them with access to (and come up with a pretty URL scheme) for character or player profiles if you have them, but that would be about as far as a robot would need to go.

Yeah, maybe I'll skip the url cleanup stuff then. That was mostly for my own personal aesthetics.
My game - bots4.net

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal