Search found 77 matches

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

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: 2573

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: 1703

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: 1703

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: 1326

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: 1247

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: 3065

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: 3525

[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: 3150

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: 3150

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: 3150

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: 1225

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: 3150

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: 4099

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: 5580

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

Go to advanced search