Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Our Scripts Vault contains many game scripts that you can use to create your own game!
Home
Forum
Help
Login
Register
BBGameZone.net
»
Webmasters
»
General Game Discussion
»
Text Games
»
How do you handle multiple logins?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: How do you handle multiple logins? (Read 1086 times)
Qwerty
Level 12
Posts: 90
Reputation: +0/-0
How do you handle multiple logins?
«
on:
January 11, 2009, 06:23:25 PM »
I have a little problem with my game,
I haven't got something that checks if the user is already logged in when they try to log in. Should I have it so that they need to wait until their account sessions expires or automatically expire the previous session when they log in?
Logged
- "I sentance you to life"
- "You moron I'm already alive"
codestryke
Administrator
Level 33
Posts: 588
Reputation: +22/-0
Re: How do you handle multiple logins?
«
Reply #1 on:
January 11, 2009, 06:34:01 PM »
Is there a benefit of having multiple logins for a player?
With the advent of tabs sometimes I find myself opening a new tab in a game to complete the task at hand then close that tab.
I had a pretty intense attack code that would keep a player's record open during the attack. To prevent them from doing something else while attacking I placed a field in the database called isattack. If it was zero, they were not attacking and things could go on as they do. Set to one and everything the player could do in the game was blocked until the attack was resolved.
Logged
Creating online addictions, one game at a time:
Qwerty
Level 12
Posts: 90
Reputation: +0/-0
Re: How do you handle multiple logins?
«
Reply #2 on:
January 11, 2009, 07:32:21 PM »
I was thinking more about hackers and such, as well as accidently closing the window, and starting a new session. I have functions that handle user activities if they are fighting, harvesting, cooking, etc.
Logged
- "I sentance you to life"
- "You moron I'm already alive"
MystressNyx
Administrator
Level 16
Posts: 139
Reputation: +6/-0
Re: How do you handle multiple logins?
«
Reply #3 on:
January 11, 2009, 09:55:28 PM »
So long as there is no inherent danger to the DB by them doing something else while it is processing things (as Codestryke and I had with that game), it's not generally an issue to leave the session open. I am personally famous for closing the wrong tab and find it terribly irritating to have to log in again when nothing has actually changed in that last few seconds. As long as your scripts protect the base functions of the game from overlapping when they shouldn't, there are no additional dangers.
Logged
Qwerty
Level 12
Posts: 90
Reputation: +0/-0
Re: How do you handle multiple logins?
«
Reply #4 on:
January 11, 2009, 10:48:19 PM »
So expire the old session when they start a new one?
Ok.
Logged
- "I sentance you to life"
- "You moron I'm already alive"
JGadrow
Level 35
Posts: 1,133
Reputation: +23/-2
Re: How do you handle multiple logins?
«
Reply #5 on:
January 12, 2009, 07:11:52 AM »
It may be a good idea to only expire any sessions currently in progress from the same IP (maybe even additionally restricted to same useragent, depending on your view). It depends upon what you want and what your system is trying to achieve. Remember that sessions are intended as a state tracking mechanism for HTTP.
Logged
Idiocy - Never underestimate the power of stupid people in large groups.
Print
Pages: [
1
]
Go Up
« previous
next »
BBGameZone.net
»
Webmasters
»
General Game Discussion
»
Text Games
»
How do you handle multiple logins?
SimplePortal 2.3.3 © 2008-2010, SimplePortal