Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

SmartFoxServer Multiplayer Games Engine

Discussion in 'Connected Games' started by g_a_p, Oct 12, 2018.

  1. digiross

    digiross

    Joined:
    Jun 29, 2012
    Posts:
    236
    I'm starting a new project and I've never done multiplayer before. I have read a bunch of stuff, and Photon PUN is the easiest but more limited/restrictive in what it can do/handle. From what little I know about SmartFoxServer it is between Photon and say UNet (although being deprecated). So more coding involved but cloud based hosting like Photon. And allows to save item/storage, logins, achievements, etc. Correct?
     
  2. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    121
    SmartFox is not cloud based. You can download the server and host it were you please, including the cloud. I am using it with Amazon EC2, for instance.
    It's different from PUN because with Photon all your game logic stays on the client, while with SmartFox you can decide what goes on the client and what on the server side. This can be pretty useful to defend from cheating and various attacks.
    Yes, because you have full access to your server's resources you can store data, connect to a local database, etc. With Photon you need to setup a separate server and use external HTTP calls to interact with it.
    Also, imho, SmartFox has a larger feature set compared to PUN. Either way, you should probably try them both and see what suits you best.
     
    g_a_p likes this.
  3. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    154
  4. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    154
  5. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    154
    The new version 2.13.7 of SmartFoxServer 2X is available for download at this url:
    https://www.smartfoxserver.com/download/sfs2x#p=updates

    We fixed an issue in the server-side JavaScript API, causing a SFSLoginException not triggering the related event on the client side.
     
  6. ysshetty96

    ysshetty96

    Joined:
    Feb 27, 2019
    Posts:
    3
    Hi everyone.
    Im developing a real time multiplayer game kind of "BRAWL STARS", im using unity and smart fox to sync character position.
    My question is how to sync character position so smoothly and almost accurately in real time using smart fox.
    I also heard about network interpolation and extrapolation concepts and also in smart fox unity examples they have used this concept. I want to know more about these concepts and any tutorial or c# code or full explanation will be really helpful.

    Other than this network interpolation and extrapolation concepts is there any way to sync character position so smoothly and almost accurately in real time??

    Any kind of help is appreciated.
     
  7. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    154
    Hi @ysshetty96,
    we have a couple of in-depth tutorials that will guide you to learn these concepts (and more) and apply them in a real-time multiplayer game.
    You can head to our documentation website: http://docs2x.smartfoxserver.com/ExamplesUnity/introduction
    and check the "First Person Shooter" and "SpaceWar" game demos. From there you will be able to download the relative projects and follow along with the tutorials.

    Just one note: if you're new to multiplayer development jumping right into these examples can be daunting. If so, please make sure to follow all the examples in the Unity section in order. This way you will start from the basic concepts and slowly make your way to the more complex stuff.

    Good luck!
     
  8. tanmaykulkarni15

    tanmaykulkarni15

    Joined:
    Nov 5, 2019
    Posts:
    1
    Please can anyone say that how to setup the whole SmartFox matchmaking in unity?
     
  9. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    154
    Check our documentation:
    1) How to create/ join Rooms: http://docs2x.smartfoxserver.com/DevelopmentBasics/join-and-create-rooms
    2) Server side Game API: http://docs2x.smartfoxserver.com/AdvancedTopics/game-api
    (explains match making, invitations, quick joins etc...)

    Also you can learn many of these concepts from our Examples here:
    http://docs2x.smartfoxserver.com/ExamplesUnity/introduction

    If you have other questions let us know.
     
  10. TomPo

    TomPo

    Joined:
    Nov 30, 2013
    Posts:
    68
    There only problem I can see with sfs2x is fact, that on server side you have to code in Java while Unity is c# based.
    Still don't know why this is not c# based solution :/
     
  11. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    154
    SmartFoxServer was created in 2003. At the time Unity didn't even exist and C# was still in its infancy :) In any case Java was chosen to make sure the server could run anywhere, i.e. on any Windows, Linux, or Unix derivatives running on 32 or 64 bit platforms.

    If you know C# already you should be able to write Java code pretty much instantly. They have a very similar syntax and in fact C# borrowed many concepts from it.
    If you really can't stand the idea of writing server side code in Java you can opt for Javascript instead, which is even simpler.
     
  12. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,283
    you can still write your server code in unity instance using smartfox c# api
     
  13. MrsPiggy

    MrsPiggy

    Joined:
    Jun 13, 2018
    Posts:
    121
    Interesting. You mean by using a Unity executable on the server side? Have you done this before?
    Could you give me an example of the flow of a typical request/response exchange?
    Also do you think it's scalable enough?
     
  14. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,283
    yes, there is documentation on their forum about running simulation inside unity instance.
    it is not as scalable as the java server.
     
    MrsPiggy likes this.
  15. g_a_p

    g_a_p

    Joined:
    Mar 16, 2015
    Posts:
    154
    Four new entry in our showcase, all by the guys at FR9: Cruzaletras / Chinchón / Poker / Bingo
    All games are available at their website: https://www.fr9.es

    fr9.jpg