Search found 77 matches

by Democre
10 Dec 2010, 20:44
Forum: SFS2X Questions
Topic: User.Disconnect?
Replies: 5
Views: 8818

Sorry about that, I had read over the webserver and the transmission of public keys. I too am storing salted MD5 hashes of passwords in my db. In the client I salt and hash the user's clearText password in the same manner. I then send the saltedHash as the password parameter in the login request. On...
by Democre
10 Dec 2010, 18:33
Forum: SFS2X Questions
Topic: User.Disconnect?
Replies: 5
Views: 8818

Just a quick ideological rather than technical note. It seems to me that kicking a user for mistyping a username/password combination is not appropriate. It is telling the user that, "Hey, you are wrong, and if you keep it up, you won't be able to play here." Instead, if you are validating...
by Democre
09 Dec 2010, 04:27
Forum: SFS2X Questions
Topic: servlet question
Replies: 3
Views: 5742

Certainly, I would like to accept payment through a 3rd party postback url. I would like to get the DBManager from the appropriate zone extension. In 1.6, this would have been done using smartfoxserver.getInstance() and finding the zone extension from there, and then calling handleInternalEvent. Is ...
by Democre
08 Dec 2010, 17:34
Forum: SFS2X Questions
Topic: servlet question
Replies: 3
Views: 5742

servlet question

Can you suggest a good place to start with making a servlet to interact with a zone or room extension in SFS2X?

I want to avoid editing my game's db directly, and force it to go through some game logic.
by Democre
08 Dec 2010, 14:57
Forum: SFS2X Questions
Topic: Zone/room extension
Replies: 2
Views: 4715

I am going to skip over the use of annotations and just give my 2 cents in the broad case. Handling everything through a zone extension has the advantage of less object creation. It requires more state handling for rooms via the room variables. It may get tricky deciding to which room the client may...
by Democre
06 Dec 2010, 18:05
Forum: SFS2X Questions
Topic: Connection event
Replies: 1
Views: 3981

Connection event

Is there a way to determine why a client could not connect to the server? In the API docs for the CONNECTION SFSEvent, I only see a success parameter. I would like to know a reason for false success. More specifically, I would like to display if the server is no longer receiving connections due to l...
by Democre
06 Dec 2010, 06:12
Forum: SFS2X Questions
Topic: DBManager on initialisation
Replies: 7
Views: 10533

I am using a room extension with a non handler, non extension class. I do pass the extension in as part of the constructor in the extension's init method. public void init() { trace("Started extension for room "+ getParentRoom().getName()); match = new ...
by Democre
06 Dec 2010, 03:56
Forum: The Gallery
Topic: [BETA] Starfall Frontier
Replies: 1
Views: 10407

[BETA] Starfall Frontier

Hello all! We have been running a facebook game based on smartfoxserver 2x since Thanksgiving. It is a 2 or 3 person version of a classic naval warfare boardgame. It is set in space. It is a free to play game, with purchasable strategic abilities and other features coming soon. check it out at: http...
by Democre
06 Dec 2010, 02:36
Forum: SFS2X Questions
Topic: SFSObject Indexed Arrays
Replies: 8
Views: 10880

yes it won't go in there so it won't do data[i].putUtfString(...) however on the next iteration, data[i].putUtfString uses the the current i i.e. thisArray[0].name = "Bob" data[0].putUtfString("name", "Bob") thisArray[1].name = null nothing is put in data[1] thi...
by Democre
06 Dec 2010, 01:16
Forum: SFS2X Questions
Topic: SFSObject Indexed Arrays
Replies: 8
Views: 10880

In your code, if thisArray[i].name does equal null, it will go on to the next index for both arrays. Ahh yes, that is actually the reason I am checking to see if the field is null or not. I don't need to store null fields into my database. ;) Right but then you could have empty SFSObjects at indexe...
by Democre
05 Dec 2010, 17:44
Forum: SFS2X Questions
Topic: SFSObject Indexed Arrays
Replies: 8
Views: 10880

Re: gaps In your code, if thisArray[i].name does equal null, it will go on to the next index for both arrays. Re: example ISFSArray data = SFSArray.NewInstance(); for(int i=0; i < thisArray.Length; i++){ if( thisArray[i].name != null){ ISFSObject datum = new SFSObje...
by Democre
05 Dec 2010, 02:49
Forum: SFS2X Questions
Topic: Server Side Game Map - Array or Other Object
Replies: 1
Views: 4430

You could use a 2 column primary key for db queries CREATE TABLE GridSpaces(      Xordinal int,      Yordinal int,      SpaceState int,      Constraint PK_GridSpaces PRIMARY KEY(Xordinal, Yordinal) ) You could also try to find or build a 2 key map in the ...
by Democre
05 Dec 2010, 02:26
Forum: SFS2X Questions
Topic: SFSObject Indexed Arrays
Replies: 8
Views: 10880

What is the type of thisArray?
Also the code you have could result in gaps in your data array.
I would use the SFSArray and AddSFSObject in the iteration.
by Democre
01 Dec 2010, 19:00
Forum: SFS2X C# API
Topic: Can't run in debugger... crossdomain policy error
Replies: 5
Views: 10680

I added this bit of code before any connection attempt: (this is in unityscript not .Net, but should be available in .Net as well) if(Application.isWebPlayer || Application.isEditor){ Security.PrefetchSocketPolicy(sfs2xIP, sfs2xPort); } This works for me running in the edit...
by Democre
25 Nov 2010, 16:03
Forum: SFS2X Questions
Topic: Prevent SQL injection with the new Api ?
Replies: 13
Views: 18059

Also, remember to close the connections when done using them.

Go to advanced search