Search found 191 matches

by tchen
11 Feb 2011, 04:36
Forum: SFS2X C# API
Topic: Event handlers swallowing exceptions
Replies: 3
Views: 6436

You could (and should) put your own code in a try-catch block and process it there. The reason event callbacks are wrapped in their own master try-catch is that several might get processed during your update loop. You don't want one slightly malformed custom handler to suddenly stop all message proc...
by tchen
11 Feb 2011, 04:22
Forum: SFS2X Questions
Topic: user.getId compared to user.getPlayerId
Replies: 4
Views: 8550

I suggest just using the (SFSGame)room.getPlayersList() call instead of doing your own tracking. What you just described is basically what SFS already gives you. Plus it handles spectators too. Some things are better left to use the user id (permissions, authentication, account), some are better for...
by tchen
10 Feb 2011, 22:27
Forum: SFS2X Questions
Topic: Initial connection test to MySQL DB
Replies: 4
Views: 7274

It won't log if there's no error.
by tchen
10 Feb 2011, 21:37
Forum: SFS2X Questions
Topic: changing a room variable on the server side
Replies: 1
Views: 3742

It might seem ugly, but at least it's thread safe :D
by tchen
10 Feb 2011, 21:27
Forum: SFS2X Questions
Topic: Created New Extension
Replies: 4
Views: 7013

SFS FPS piggybacks on the SimpleChat zone and Lobby rooms. You always need a zone.

The SimpleChat and Lobby are very permissive as examples. They'll let you ask the server to create anything: in this case a new room with an attached fps extension specified by the client code.
by tchen
10 Feb 2011, 05:15
Forum: SFS2X Questions
Topic: Initial connection test to MySQL DB
Replies: 4
Views: 7274

Use 127.0.0.1 for your db host. By default, MySQL doesn't allow remote network access and only binds to the above ip.
by tchen
10 Feb 2011, 00:48
Forum: SFS2X C# API
Topic: SFSConstants.NEW_LOGIN_NAME Does'nt exists
Replies: 14
Views: 18530

Double check that the jar version you're referencing in the IDE is the same as the one you overwrote in the server folders when installing the patch.
by tchen
09 Feb 2011, 21:19
Forum: SFS2X Questions
Topic: SFS2X behavior at bandwidth saturation
Replies: 12
Views: 22506

Thanks Thomas for the update on the situation. Would there be some sort of event callback we can hook into as well so we can initiate our resync and validation code on the client - that would help a lot.

Cheers,
Ted
by tchen
09 Feb 2011, 19:56
Forum: SFS2X Questions
Topic: Session object on Disconnect
Replies: 3
Views: 5845

That event is fired after the session has been closed, hence it's not part of the listed parameters. http://docs2x.smartfoxserver.com/api-docs/javadoc/com/smartfoxserver/v2/core/SFSEventType.html#USER_DISCONNECT Any particular reason why you want the session object anyways? You could try getting the...
by tchen
09 Feb 2011, 16:30
Forum: SFS2X Questions
Topic: SFS2X behavior at bandwidth saturation
Replies: 12
Views: 22506

Throwing up the test client code for review using System; using System.Collections.Generic; using System.Linq; using System.Text; using Sfs2X; using Sfs2X.Core; using Sfs2X.Entities; using Sfs2X.Entities.Data; using Sfs2X.Requests; using Sfs2X.Logging; namespace ChatterBox { class Program {...
by tchen
09 Feb 2011, 16:29
Forum: SFS2X Questions
Topic: SFS2X behavior at bandwidth saturation
Replies: 12
Views: 22506

SFS2X behavior at bandwidth saturation

I am doing some load testing and am noticing that the client driver doesn't recover gracefully after experiencing packet loss. Maybe I'm doing something wrong, but my crude test consists of getting SFS's built in public message system to reflect inbound messages. http://img268.imageshack.us/img268/2...
by tchen
07 Feb 2011, 22:10
Forum: SFS2X C# API
Topic: ICollection supported by Unity?
Replies: 2
Views: 5826

ICollection<T> is an interface and as such, doesn't support creation directly. You need to use an implementing class such as List<T> or Dictionary<K,V> There's a whole bunch of them in the system.collections.generic namespace http://msdn.microsoft.com/en-us/library/system.collections.generic%28v=VS....
by tchen
07 Feb 2011, 02:42
Forum: SFS2X Questions
Topic: How to receive vicinity users?
Replies: 4
Views: 7286

If we're talking about the sphere trees, the partitioning algorithm has to be server side. That's the only place where all server objects have their positions updated and the spheres can be adjusted. If you were talking about the grid method, ideally it'd be server side as well. You could invoke it ...
by tchen
06 Feb 2011, 20:23
Forum: SFS2X Questions
Topic: How to receive vicinity users?
Replies: 4
Views: 7286

The Island demo (or most games for that matter) don't need a full 3d algorithm. It'll save you cost and time. The simplest to understand and implement would be grid partitioning. Subdivide your world into a finite grid and then store a list per cell. Update the cell lists as players move into and ou...

Go to advanced search