Hi,
I am new to Smartfox server. I am developing a turn based game using Smartfoxsever. I am able to run application for two players it means single room
I am unable to write extension for dynamic room creation at server side .Please suggest the approach or provide source code...
Thanks & Regards
Veeru
Serialization in smartfox
-
- Posts: 11
- Joined: 31 Jul 2013, 09:08
Serialization in smartfox
Last edited by veeru.srinivas on 20 Nov 2013, 12:46, edited 1 time in total.
Re: Room creation
Hi Veeru,
writing an extension is pretty simple. You can follow this video tutorial:
http://www.youtube.com/watch?v=nKGxhwJ0Ccc
And of course there's tons more in our documentation mini-site:
http://docs2x.smartfoxserver.com/Develo ... extensions
http://docs2x.smartfoxserver.com/Develo ... ension-api
Hope it helps
writing an extension is pretty simple. You can follow this video tutorial:
http://www.youtube.com/watch?v=nKGxhwJ0Ccc
And of course there's tons more in our documentation mini-site:
http://docs2x.smartfoxserver.com/Develo ... extensions
http://docs2x.smartfoxserver.com/Develo ... ension-api
Hope it helps
-
- Posts: 11
- Joined: 31 Jul 2013, 09:08
Re: Room creation
Hi,
Thanks for reply!!!!
I am having idea of creation of extensions i have created an application which is able handle single room i wanna help regarding Dynamic room creation..
Thanks
veeru.
Thanks for reply!!!!
I am having idea of creation of extensions i have created an application which is able handle single room i wanna help regarding Dynamic room creation..
Thanks
veeru.
Re: Room creation
Hi,
I'm sorry but you have to provide further details.
When do you want to create those new rooms dinamically?
In the meantime, you can check the SFSApi class of the Java Server API Documentation, as it contains the createRoom() methods which are responsible for creating a room whenever you want.
Cheers
I'm sorry but you have to provide further details.
When do you want to create those new rooms dinamically?
In the meantime, you can check the SFSApi class of the Java Server API Documentation, as it contains the createRoom() methods which are responsible for creating a room whenever you want.
Cheers
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
- Posts: 11
- Joined: 31 Jul 2013, 09:08
Re: Room creation
Hi,
Thanks a lot for reply !!
Now i got the idea of dealing with dynamic room creation
Thanks & Regards
Veeru
Thanks a lot for reply !!
Now i got the idea of dealing with dynamic room creation
Thanks & Regards
Veeru
-
- Posts: 11
- Joined: 31 Jul 2013, 09:08
Serialization in smartfox
Hi,
I am trying to use smartfox server serialization concept which was given in ..http://docs2x.smartfoxserver.com/Advanc ... alization..
I am able to send data to the client side but while receiving data from client to server side java i am getting "Error deserializing request: com.smartfoxserver.v2..." classNotfound exception . I have followed all the steps given in sfs2x documentation... please provide me solution.
Thanks in Advance,
Regards ,
Veeru.
I am trying to use smartfox server serialization concept which was given in ..http://docs2x.smartfoxserver.com/Advanc ... alization..
I am able to send data to the client side but while receiving data from client to server side java i am getting "Error deserializing request: com.smartfoxserver.v2..." classNotfound exception . I have followed all the steps given in sfs2x documentation... please provide me solution.
Thanks in Advance,
Regards ,
Veeru.
Re: Room creation
Please post the full stack trace of the exception and also specify which client API language you are using.
Also post the code of the classes that you are sending, at least the one that is failing to deserialize.
Thanks
Also post the code of the classes that you are sending, at least the one that is failing to deserialize.
Thanks
-
- Posts: 11
- Joined: 31 Jul 2013, 09:08
Re:serialization problem in smartfox
Hi ,
I am using Java for server side and AS3 for client side.
This is i am finding in my logs :
17:27:29,648 WARN [SocketReader] protocol.SFSProtocolCodec - Error deserializing request: com.smartfoxserver.v2.exceptions.SFSRuntimeException: java.lang.ClassNotFoundException: sfs2x.extension.test.serialization.model.WaterFloodSpell
After this nothing is executed..
Java code:
AS3 Code:
Thanks & Regards
Veeru.
I am using Java for server side and AS3 for client side.
This is i am finding in my logs :
17:27:29,648 WARN [SocketReader] protocol.SFSProtocolCodec - Error deserializing request: com.smartfoxserver.v2.exceptions.SFSRuntimeException: java.lang.ClassNotFoundException: sfs2x.extension.test.serialization.model.WaterFloodSpell
After this nothing is executed..
Java code:
package sfs2x.extension.test.serialization.model;
import com.smartfoxserver.v2.protocol.serialization.SerializableSFSType;
public class WaterFloodSpell implements SerializableSFSType
{
String id;
int hitPoints;
int count = 7;
public WaterFloodSpell()
{
}
public WaterFloodSpell(String id, int hitPoints)
{
this.id = id;
this.hitPoints = hitPoints;
}
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
public int getHitPoints()
{
return hitPoints;
}
public void setHitPoints(int hitPoints)
{
this.hitPoints = hitPoints;
}
public void setCount(int count)
{
this.count = count;
}
public int getCount()
{
return count;
}
}
AS3 Code:
Code: Select all
package sfs2x.extension.test.serialization.model
{
import com.smartfoxserver.v2.protocol.serialization.SerializableSFSType
public class WaterFloodSpell implements SerializableSFSType
{
private var _id:String
private var _hitPoints:int
private var _count:int
public function WaterFloodSpell(id:String=null, hitPoints:int=70)
{
this._id = id
this._hitPoints = hitPoints
}
public function get id():String
{
return _id
}
public function set id(id:String):void
{
this._id = id
}
public function get hitPoints():int
{
return _hitPoints
}
public function set hitPoints(hitPoints:int):void
{
this._hitPoints = hitPoints
}
public function get count():int
{
return _count
}
public function set count(value:int):void
{
_count = value
}
}
}
Thanks & Regards
Veeru.
-
- Posts: 11
- Joined: 31 Jul 2013, 09:08
Re: Serialization in smartfox
Hi,
I am waiting for reply i have posted the information.. Am i doing any wrong...?
Thanks,
Veeru.
I am waiting for reply i have posted the information.. Am i doing any wrong...?
Thanks,
Veeru.
Re: Serialization in smartfox
In order for the model classes to be found by the SFS deserializer they need to be deployed in the extension/__lib__/ folder.
All the details are explained in the documentation:
http://docs2x.smartfoxserver.com/Advanc ... ialization
See the "Deploying the Extension" section at the bottom.
Hope it helps
All the details are explained in the documentation:
http://docs2x.smartfoxserver.com/Advanc ... ialization
See the "Deploying the Extension" section at the bottom.
Hope it helps
-
- Posts: 11
- Joined: 31 Jul 2013, 09:08
Re: Serialization in smartfox
Hi,
Thanks for reply !!!!! Its working fine ...
could you pls provide the tris game java server side source code.
Regards,
Veeru.
Thanks for reply !!!!! Its working fine ...
could you pls provide the tris game java server side source code.
Regards,
Veeru.
Re: Serialization in smartfox
The server code is already provided with the example.
cheers
cheers
Who is online
Users browsing this forum: No registered users and 67 guests