Forum ActionScript 3.0 Preventing duplicate sign ons

Problems and discussions relating to ActionScript 3.0 here.

Preventing duplicate sign ons

Postby robscherer123 » July 5th, 2013, 1:49 pm

I was wondering if there is a way in flash to detect that the same SWF is running in AS3 or on the server or something? I plan on implementing a way today that involves using the SharedObject. Users will still be able to clear there cache or find other ways around it though, although it will at least make it a little harder. I'm not sure how to detect it if users are in different rooms. I have an "online" variable stored in the BigDB for whether a player is online or not, but that's not 100% trustworthy and sometimes fails to save on occassion. Is there some other way I'm not thinking about?
robscherer123
Paid Member
 
Posts: 309
Joined: December 12th, 2012, 8:46 pm

Re: Preventing duplicate sign ons

Postby Henrik » July 5th, 2013, 4:36 pm

Just out of curiosity, why does it matter?
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm

Re: Preventing duplicate sign ons

Postby robscherer123 » July 5th, 2013, 5:03 pm

Yep, it's definitely important. My game is a side scrolling MMORPG. If players sign on to the same account in different areas twice, they are able to drop their items, sell items, and do a number of things twice, and then with a different third account they can reap the benefits of having two of those things. I suppose I could save their player object after each time they drop or sell an item, but that's alot of waisted saving bandwidth especially when 99% of the time players won't be trying to do it.
robscherer123
Paid Member
 
Posts: 309
Joined: December 12th, 2012, 8:46 pm

Re: Preventing duplicate sign ons

Postby Henrik » July 5th, 2013, 7:22 pm

I don't think the bandwidth used for saving changes to a player's inventory will even be noticeable compared to the rest.

If I were you, I would instantly save all changes to a player's inventory, and use the optimistic locking feature of BigDB. That way, if a player is logged on twice, the first save will succeed, but the second will fail with an optimistic locking error, and then you know that the player might be trying to cheat.

http://playerio.com/documentation/bigdb/advanced
Henrik
.IO
 
Posts: 1832
Joined: January 4th, 2010, 1:53 pm

Re: Preventing duplicate sign ons

Postby robscherer123 » July 15th, 2013, 5:13 pm

Thanks for the help. I've got the problem under control now. Hopefully no one finds a way around, but it doesn't look like it.
robscherer123
Paid Member
 
Posts: 309
Joined: December 12th, 2012, 8:46 pm

Re: Preventing duplicate sign ons

Postby oonka » October 14th, 2015, 3:50 pm

Hey Just broadcast to c# to see if the same user is signed on inside the room if so Broadcast to as3 to kick him
oonka
 
Posts: 22
Joined: October 10th, 2015, 9:19 pm


Return to ActionScript 3.0



cron