Unity + SFS + MySQL - Good for Action RPG? Not massive..

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

kaligus
Posts: 45
Joined: 01 Sep 2009, 13:26

Unity + SFS + MySQL - Good for Action RPG? Not massive..

Postby kaligus » 01 Sep 2009, 17:49

Hello all,

please, I'm using SFS and Unity very much now on, learning fast, SFS have a very good documentation and the API is really good... but I have some doubts:

- I will use MySQL with SFS and extensions server-side to connect to MySQL when user needs and then I will exchange data between Unity User -> SFS -> MySQL. Do you think this is a bad way?

- I'm using SFS Island demo to learn how movements work in network. Is that the best method to use in a game?

- My game will be a hack-n-slash like, with some RPG elements, but is not a MMORPG, nor only Massive. It needs to support a couple hundreds of players. It will be for a private client. Do you know if what I'm using is enough?

- Anybody know how much data, at minimum, can a player playing in Unity transfer to SFS, with the controls walk, run, sword attack, hittinh, die, updating XP realtime... etc...?? (I know this will really depend in my game needs, but at least some minimum info will help).

- Only player attributes and XP will be saved into MySQL, but it needs to sync all the time with SFS and then SFS will use the extensions to connect and save data into MySQL database... is this right?

The game will be lobby based (lobby will show all the rooms available to play, players will be able to play alone or in groups of 3 users at max).

Thanks for all help and sorry the long questions :)
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Re: Unity + SFS + MySQL - Good for Action RPG? Not massive..

Postby ThomasLund » 01 Sep 2009, 20:57

Hi!

happy you have found it useful for your game dev :-)

kaligus wrote:Hello all,

please, I'm using SFS and Unity very much now on, learning fast, SFS have a very good documentation and the API is really good... but I have some doubts:

- I will use MySQL with SFS and extensions server-side to connect to MySQL when user needs and then I will exchange data between Unity User -> SFS -> MySQL. Do you think this is a bad way?


Excellent way. I cant see how you would do it otherwise.

- I'm using SFS Island demo to learn how movements work in network. Is that the best method to use in a game?


Yes and no.

You definitely need to sync the transforms "all the time" and use one-shot messages for animations, chats etc.

But like I wrote in the tutorial text, to optimize things you definitely should switch to a extension based messaging system where you can then encode/decode the transforms into "semi-binary" to save bandwidth. Also you can throttle things by zoning etc.etc.etc. So those parts are still left to do for you.

Once you've done the latter part, then yes - island demo is a good example.

- My game will be a hack-n-slash like, with some RPG elements, but is not a MMORPG, nor only Massive. It needs to support a couple hundreds of players. It will be for a private client. Do you know if what I'm using is enough?


Besides lots of bandwidth on the server, it should be able to handle it on that end. I am more worried if you think you can render several hundred users in the same scene view.

But there is absolutely no way around you doing some tests in a setup that will be as close to your specific game needs as possible. And no one other than you can answer the question based on those test + optimization work.

- Anybody know how much data, at minimum, can a player playing in Unity transfer to SFS, with the controls walk, run, sword attack, hittinh, die, updating XP realtime... etc...?? (I know this will really depend in my game needs, but at least some minimum info will help).


Sorry - no answer there. Depends on so many things.

- Only player attributes and XP will be saved into MySQL, but it needs to sync all the time with SFS and then SFS will use the extensions to connect and save data into MySQL database... is this right?


Cant see anything wrong there. Stuff wont get synced as often as transforms, but then they dont need to go to the database either. Unless you do a bad job on the database design, there should be no issue.

The game will be lobby based (lobby will show all the rooms available to play, players will be able to play alone or in groups of 3 users at max).

Thanks for all help and sorry the long questions :)


:-) Hope that helps you along!

Best
Thomas
kaligus
Posts: 45
Joined: 01 Sep 2009, 13:26

Postby kaligus » 01 Sep 2009, 21:34

Thank you for the answers, Thomas, yes it helped a lot.

Some more doubts :)

- The game will not have many players in the same scene view (well, at least not on same zone). It will be like a instancing thing, you know, there are the scene "Forest"... lots of players will be playing in there, because the scene is the same, but the sync will be on each room, I mean, diferent groups will see their players only. So, not many players in same place exavly. Do you think this ok?

- As for the zoning yes I will implement, I will take a look at the semi-binary thing... but for animations, it does not need to sync all the time???

- For your last comment, on database design... what I'm planning: right at the login process, I made a extension file in "AS script" to search for the name of the player into database... is this the right method already? I mean, SFS has built-in login players, etc. (still learning that login secure tutorial on SFS). And then I will sync players transforms and animations... they have to access the MySQL database as soon as players kill a monsters (or something) and gain XP, is this right? Because, otherwise, how I will save data in the server (or database)? And this way maybe it lots of data transfering to database, dont you think?

Thanks again
Fishypants
Posts: 57
Joined: 26 Oct 2010, 14:03
Location: South Pasadena California
Contact:

Postby Fishypants » 05 Dec 2010, 02:50

Hey kaligus, I am subscribing to your post, because your approach is exactly how I was planning on approaching this subject. Would like to see any information that gets shared.
kaligus
Posts: 45
Joined: 01 Sep 2009, 13:26

Postby kaligus » 05 Dec 2010, 12:45

The team choose not to use SFS at the moment (in that time) because of our time to work in this. We used the builtin network system of Unity, so cant help you anymore, sory, I dont use SFS for some time now.

We plan to use it again in 2011 =)

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 8 guests