Search found 16 matches

by tommy408
16 Jan 2011, 05:06
Forum: Server Side Extension Development
Topic: Anyone notice JSON is really slow?
Replies: 0
Views: 3375

Anyone notice JSON is really slow?

The following test took 62ms in Java. In a game with a lot of concurrent users requesting small piece of data, this is really bad. I don't know any data structure that is has even 1ms for these operations. net.sf.json.JSONArray array = new net.sf.json.JSONArray(); Util.timeStart(); array.add(name); ...
by tommy408
01 Nov 2010, 23:35
Forum: SFS2X Questions
Topic: Is SFSObject inconvenient?
Replies: 18
Views: 24357

I actually would rather go back to SFS1.6 with my current game, and make new game in SFS2 instead. As I update my code I keep running into so many designs I have to change. 1) For example, I have 2 table row, one column is name and 2nd column is value. Stats Name Value Health 123 Armor Type Heavy Qu...
by tommy408
01 Nov 2010, 05:31
Forum: SFS2X Questions
Topic: Is SFSObject inconvenient?
Replies: 18
Views: 24357

I think ActionScript allowing generic Objects and dynamic types save a lot of time. SFS2 allows transmit of class instances, but my game for example, has over a hundred of different response data structures sending to client, there's just no time to make classes for all of them. I think allowing JSO...
by tommy408
31 Oct 2010, 11:30
Forum: SFS2X Questions
Topic: Is SFSObject inconvenient?
Replies: 18
Views: 24357

Is SFSObject inconvenient?

SFS 1.6 sending data with JSONObject to client and accessing those data were simple as: for (var i = 0; i < response.scoreList.length; i++) { trace(response.scoreList[i].name + " " + response.scoreList[i].score); } In SFS2: // Why ISFSArray instead of SFSArray? var scoreList:ISFSArray = re...
by tommy408
30 Oct 2010, 06:41
Forum: SFS2X Questions
Topic: Extension requires to build jar on every change?
Replies: 3
Views: 6890

I keep getting:
Extension creation failure: MyGame - Class not found: game.RequestDispatcher

In admin, I set extension file as:
game.RequestDispatcher

Anything else I should check for?
by tommy408
30 Oct 2010, 06:02
Forum: SFS2X Questions
Topic: Extension requires to build jar on every change?
Replies: 3
Views: 6890

Ok, I made an Ant script to build the jar file.
Took 359 milliseconds every time I update my Java files. I guess this is a good trade for extension hot deploy.
by tommy408
30 Oct 2010, 04:29
Forum: SFS2X Questions
Topic: Extension requires to build jar on every change?
Replies: 3
Views: 6890

Extension requires to build jar on every change?

In order to run the extension, it must be in a jar file? SFS1.6 just need .class files.

If this is the only way, any easy way to automatically build jar files from Eclipse into SFS2 folder? Ant script? And wouldn't building jar file on every I save add build time?
by tommy408
30 Oct 2010, 01:30
Forum: SFS2X Questions
Topic: Question about Custom login
Replies: 9
Views: 11895

Question about Custom login

In the doc: * USER_LOGIN: fired when a client requests to join a Zone. Here you can validate the client credentials and decide if the User can continue the login process. At this stage the client is represented as a Session object, not as an SFSUser yet. * USER_JOIN_ZONE: notified when a client has ...
by tommy408
29 Oct 2010, 16:13
Forum: SFS2X Questions
Topic: Question about SFSObject
Replies: 9
Views: 12798

Lapo, In 1.6, I have tons of code that uses JSONObject and I do the following: int aNum = 0; String aStr = "test"; JSONObject object = new JSONObject(); object.put("num", aNum); object.put("str", aStr); In SFS 2, from the docs, I have to do this: SFSObject object = new ...
by tommy408
29 Oct 2010, 06:36
Forum: SFS2X Questions
Topic: Which extension does SmartFox.send to?
Replies: 3
Views: 6582

Thank you Thomas.
by tommy408
29 Oct 2010, 05:43
Forum: SFS2X Questions
Topic: Question about SFSObject
Replies: 9
Views: 12798

Not on server side. It just adds more pain. They meant to have it there anyway. It's just not working. Client side part is working. I can't wait for updates though. It will take me another day to refractor.
by tommy408
29 Oct 2010, 02:04
Forum: SFS2X Questions
Topic: Question about SFSObject
Replies: 9
Views: 12798

It has changed. I've been using JSONObject which I'd have to change over 1000 lines.

I don't think SFSObject put(String key, SFSDataWrapper wrappedObject) is working. Hope it'll be fix soon. It'd save a lot of time.
by tommy408
28 Oct 2010, 22:09
Forum: SFS2X Questions
Topic: Question about SFSObject
Replies: 9
Views: 12798

First thing I did was reading the doc.
by tommy408
28 Oct 2010, 20:50
Forum: SFS2X Questions
Topic: Question about SFSObject
Replies: 9
Views: 12798

Question about SFSObject

I have to update over 50 classes from 1.6 to 2. In SFS 1.6, I send data to client like the following. And similar on the client sending data to server. int aNum = 0; String aStr = "test"; JSONObject object = new JSONObject(); object.put("num", aNum); object.put("str", a...
by tommy408
28 Oct 2010, 20:29
Forum: SFS2X Questions
Topic: Which extension does SmartFox.send to?
Replies: 3
Views: 6582

Which extension does SmartFox.send to?

I'm updating my SFS 1.6 game to SFS2, and I'm looking at these code from SFS 2. Where do I put the name of the extension? Client smartFox.send(new ExtensionRequest("add", params)) Server void handleClientRequest(String cmdName, User sender, ISFSObject params) So "add" is the cmdN...

Go to advanced search