SmartFoxServer versions and .NET

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

delavega
Posts: 12
Joined: 25 Feb 2011, 19:32

SmartFoxServer versions and .NET

Postby delavega » 25 Feb 2011, 19:56

Hi, I'm a web programmer. I mainly develop in C#.

I was researching to develop a multiplayer online game and get here.

I was wondering if it is possible with the last version of SmartFoxServer to use C# and Visual Studio to code.

Is this possible in the previous version too?

Any help is much appreciated, I'm a bit lost in this new world.

Many thanks.
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 25 Feb 2011, 20:05

Sure thing - you should use the "Unity" API - which is in its core a simple C# assembly and works in regular C# too. But in the gaming world its primarily use in Unity.

So go ahead and take a look at that one. it exists both for SFS1 and SFS2X

For 2X please turn "thread safe mode" off when using it inside C#. There is a property on the SmartFox class.

Also - all Unity examples are written in C#. So although there are some Unity specific callbacks, you should be able to dissect them for usage in a regular C# program

/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
delavega
Posts: 12
Joined: 25 Feb 2011, 19:32

Postby delavega » 25 Feb 2011, 20:15

Thank you Thomas.

I'm reading a book called Flash Multiplayer Virtual Worlds and it seems the examples are based in SmartFox 1.6.

Do you suggest I start using 2.x instead?

What benefits do I have?

Many thanks!
tchen
Posts: 191
Joined: 11 Dec 2010, 14:14

Postby tchen » 25 Feb 2011, 23:13

It might have slipped Thomas's mind, which is understandable since he's worked so hard on the C# client, but it should be mentioned that the server-side is still Java.

That said, it's not too far of a jump from C# to Java. You'll miss certain things, but I think you'll be able to pick it up quick.
delavega
Posts: 12
Joined: 25 Feb 2011, 19:32

Postby delavega » 26 Feb 2011, 00:03

Thank you tchen, I was just going to ask that.

I noticed that I can use C# but only in the client, which I won't, because I'll use Flash in the client.

Correct me if I'm wrong, in the server I can use Java, Python, Action Script and JavaScript? (I read this in the book).

Where can I find examples of server programming with smartfoxserver with Java?

Many thanks again.
delavega
Posts: 12
Joined: 25 Feb 2011, 19:32

Postby delavega » 26 Feb 2011, 00:10

I add one question: what IDE do you use for Java? Eclipse?

Thanks!
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Postby ThomasLund » 26 Feb 2011, 06:25

Sooooo sorry and thanks for correcting me.

Yes - what I talked about was client side only. 2X Server is java only. SFS 1 has other options. Personally starting from scratch I would choose 2X (if for nothing else than the more generous starter license) and learn Java if I were you. C# and Java are pretty similar, so should not be a problem for you

Good java IDE: IntelliJ IDEA is the best, followed by Eclipse and further down the foodchain Netbeans and similar

/me ducks the Java IDE religion war
Full Control - maker of Unity/C# and Java SFS API and indie games

Follow on twitter: http://twitter.com/thomas_h_lund
tchen
Posts: 191
Joined: 11 Dec 2010, 14:14

Postby tchen » 26 Feb 2011, 12:35

I can vouch that Scala also works too. I'm using it alongside Java. I must say, it feels even closer to the more recent C# versions with anon functions and the like so that's also an option for you.

And haha, I'm down the food chain with Netbeans :oops:
delavega
Posts: 12
Joined: 25 Feb 2011, 19:32

Postby delavega » 26 Feb 2011, 15:38

Thomas, tchen, thanks a lot.

I'll give Java a try!

Scala is another languange supported in version 2? I thought Java was the only option in version 2.

Thanks
tchen
Posts: 191
Joined: 11 Dec 2010, 14:14

Postby tchen » 26 Feb 2011, 16:49

Technically Java is the only supported language and all documentation is based around that.

Scala, because of how it works, just piggybacks on the same JVM and has 1-1 interop so it can do exactly the same. Normally we don't talk about it here, but I just mentioned it because I know how frustratingly primitive Java can feel sometimes when you come from C#-land.
delavega
Posts: 12
Joined: 25 Feb 2011, 19:32

Postby delavega » 26 Feb 2011, 18:19

Thanks!

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 142 guests