Hello!
I'm making a mobile game in Unity and hope I can add a "co-op" mode which allow up to 4 players to play together.
I previously tried Photon PUN but this does not work for me as I want server/client model.
I decided to try SmartfoxServer, after reading a bit of documents, I have a few questions:
1. about the license:
let say I have a license of 100 CCU,
if the 101st user try to connect to the server, that user will not be able to connect, is that right?
do I get any kinds of notification when that happen?
2. writing server logics in Java
Java actually is my favorite language, so I don't mind writing server logics in Java.
though... simulating the game world in Java without Unity library would be hard...
2.a> I mean, how do I check for movement collision on the server?
the server stores data about position, collision size/shape of the object
but how do I use Unity's Physics2D function like: Raycast, OverlapArea,... to perform this check? do we have equivalent library for this?
2.b> there are some expensive operations that I would like to perform on the server
example: path-finding
the path-finding library I'm using is written in C# (for Unity), so I can't use it in Java Extension
I have to find an equivalent libary in Java, is that right?
I would be greatly appreciate any pointers for this problem.
3. example source code
where can I download the Java source code for extension used in Unity Examples?
I mean this one: http://docs2x.smartfoxserver.com/ExamplesUnity/fps
Thanks in advance,
Hoang.
Some newbie questions
Re: Some newbie questions
Hello,
The login attempt of the 101th user will return an error saying that the server is full. The error can be handled from client side via a specific event handler (called LOGIN_ERROR)
It depends how much of the world you have to simulate, but yes if you need most of the data of the world from client side it can be a problem. In those cases you may need an headless Unity server handling the game logic.
We wrote a couple of articles on this subject in our blog, here:
https://smartfoxserver.com/blog/best-of ... -games-p1/
https://smartfoxserver.com/blog/best-of ... -games-p2/
The above should also clarify some of the other related questions. If not, let us know.
In the article you have linked, right after the overview, there's a link to download the source
Cheers
NMHoang05 wrote:Hello!
1. about the license:
let say I have a license of 100 CCU,
if the 101st user try to connect to the server, that user will not be able to connect, is that right?
do I get any kinds of notification when that happen?
The login attempt of the 101th user will return an error saying that the server is full. The error can be handled from client side via a specific event handler (called LOGIN_ERROR)
2. writing server logics in Java
Java actually is my favorite language, so I don't mind writing server logics in Java.
though... simulating the game world in Java without Unity library would be hard...
It depends how much of the world you have to simulate, but yes if you need most of the data of the world from client side it can be a problem. In those cases you may need an headless Unity server handling the game logic.
We wrote a couple of articles on this subject in our blog, here:
https://smartfoxserver.com/blog/best-of ... -games-p1/
https://smartfoxserver.com/blog/best-of ... -games-p2/
The above should also clarify some of the other related questions. If not, let us know.
3. example source code
where can I download the Java source code for extension used in Unity Examples?
I mean this one: http://docs2x.smartfoxserver.com/ExamplesUnity/fps
In the article you have linked, right after the overview, there's a link to download the source
Cheers
Re: Some newbie questions
Hi, again!
"SFS2X + server side Unity" is exactly what I want.
I'm building the game flow step by step and will soon get to "spawn headless Unity instance" step.
I have a few questions:
1> is there a deeper example for "SFS2X + server side Unity" ?
your article mentioned "AirHockeyGame", is source code for this project available to download? (did I miss a link somewhere?)
2> after spawning "headless Unity instance", how do I communicate directly with it?
must I send request to the extension, then the extension send data to this instance?
"SFS2X + server side Unity" is exactly what I want.
I'm building the game flow step by step and will soon get to "spawn headless Unity instance" step.
I have a few questions:
1> is there a deeper example for "SFS2X + server side Unity" ?
your article mentioned "AirHockeyGame", is source code for this project available to download? (did I miss a link somewhere?)
2> after spawning "headless Unity instance", how do I communicate directly with it?
must I send request to the extension, then the extension send data to this instance?
Who is online
Users browsing this forum: No registered users and 129 guests