Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[Released] Bolt, The new generation of networking solution for unity!

Discussion in 'Assets and Asset Store' started by fholm, May 30, 2014.

  1. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    To build a stand-alone which can run through your own menus, etc. you would have to call BoltNetwork.InitializeServer and BoltNetwork.InitializeClient by hand. You can check in the BoltDebugStart and BoltDebugStartNonPro scripts found in bolt/scripts how do initialize the server and client by hand.

    I am looking into creating another type of "build" where when you start you get a list of maps on the server, and on the client you can punch in an IP (which defaults to the local LAN ip of the server).

    This is a known bug, there's an issue with the prefab serializing in Unity, quite possibly what you have done is this: you wanted to edit a prefab, so you dragged it into the scene, and then you dragged it back over the old prefab to replace it or you hit "apply" at the top... this causes bolt to register the whole prefab as a "scene object" which will auto-destroy on the clients...

    The way to fix this is to just *click* on the prefab itself in the project window, so that its inspector renders and make sure that "Scene Object" is unchecked. A fix for this is coming in 0.2.1 (the next release)
     
  2. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    I need more clarification about the rooms feature. You state that you can have up to about 128 players in a room. Is there also an unlimited amount of rooms? I'm basically wondering if this would solve our "100 simultaneous users" problem with PUN, where we have to pay if we have more, and buy a plan over there at Photon...
     
    Last edited: Jun 13, 2014
  3. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    Ahhh I see now how it works. Completely forgot about that. So essentially as the client could I make another scene just for the menus so when testing in the editor it launches straight to a certain scene (or should I be calling them maps) bypassing having to login and go through the menus like you have in the examples? Also would you recommend making two scenes or maps, one for client and one for server? I have been doing things this way and keeping a tight layer on what is exposed to the player. All server scripts are never seen by the client and vice-versa. How would you go about doing things as the best practice?

    That makes sense because it is exactly what I did / was doing. I was doing a lot of prefab editing to the client player at the time.

    How would one go about having a Master server that all the servers could register to?

    Thanks for the awesome ultra fast replies, really falling in love with this networking engine. It really really really fits my way of working better than anything else I have tried.
     
  4. LightSky

    LightSky

    Joined:
    Aug 12, 2012
    Posts:
    45
    Is there any functionality already implemented that will allow for users to join random Listen Servers based upon specified parameters? If not I assume something similar will be coming with the Lobby Server feature?

    Example from TNet:
    TNManager.JoinRandomChannel(string levelName, bool persistent, int playerLimit, string password)

    It is incredibly useful for basic matchmaking.
    Additionally, is there a way to request a list from the Dedicated Server for a list of all the Listen Servers currently running, or do you require the Hosts IP at the moment?

    Basically the Host Migration and some Lobby Server functionality is all I am worried about missing, else I would pickup Bolt in an instant. The Editor functionality and simplicity is what has me primarily sold.
     
  5. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Correct.


    In general I would recommend not doing this, and instead use the defines "#if BOLT_SERVER" and "#if BOLT_CLIENT" to do specific compilation for both of them. Right now bolt does not actually let you switch these on/off, but it will be added for the next release.

    You could do it by hand, some php script on a webserver, that talks over JSON or something. But we are launching a proper "master server" with a GUI and everything during July (for the first release candidate).

    No problem, and I'm glad you are enjoying bolt :)
     
  6. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    This is a planned feature for the master server, which will use a lobby which lets you connect to other, running, listen servers.

    I agree - but again you have to see the difference here, TNet (and Photon Cloud) will route *all* of your traffic through a central server. Bolt currently wants to connect the players directly instead, now the functionality to do this "room"/"lobby" thing will come in the master server.

    Currently host IP yes, again this is what the master server will solve.

    Host MIgration, since we want it to work in a number of different scenarios will come, but it's going to be during the fall/winter. Lobby system is the "master server", which will be out mid-late july
     
  7. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Just wanted to note that the latest version is up on the asset store, 0.2.0.5. It says "0.2.0.4" on the asset page but it is the 0.2.0.5 version (something went wrong after i re-submitted before being accepted)
     
  8. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    So, I looked into how TNet does its "host migration", my question is: has anyone tried this in practice, in a real game? Because the implementation just switches who is the host from the proxys point of view and starts sending packets that way instead, there is no hand-off for giving valid host-gamestate or anything like that, it looks to me like the amount of visual artifacts would be... significant, unless you are doing a game which isn't authoritative, but then you don't need a "host" anyway.

    Edit: If this is all people want, then... it's very simple to solve, but I do not see how this actually would work in real game with a lot of moving parts, as there is no state transfer from the old to the new host.
     
  9. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    I think you might have missed my question here :)
     
  10. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Oh, I'm so sorry... it's been one hectic day.

    So, the "128 player limitation" is per running instance of the server. Right now the two main ways to host Bolt server is either by doing so on one of the players (which still lets 128 players play, assuming that the person who's hosting is on good enough internet) or you can host dedicated servers yourself, where the max amount of players would end up being about ~128 per server.

    You are talking about Photon Cloud in your post and they are talking about CCU (which is TOTAL players playing at once), I am talking about players per host/server.

    Since we don't do any hosting for Bolt (there is a cloud service coming, and it will have the same sort of CCU payment model as photon) there is no direct CCU limit, so it's a little bit hard to compare.
     
  11. jaybennett

    jaybennett

    Joined:
    Jul 10, 2012
    Posts:
    165
    I can understand for sure that Bolt itself is not the rate limiting step!

    I've only been working with Photon before but realizing that I would have to re-implement all of the engine code (time, space, physics, etc) is what made me look for something that I can run in headless mode on the server. Bolt seems promising and I'm a big fan of your previous work :)

    Now this isn't directly bolt related, but since Unity is running mostly on a single thread does that mean that you could hypothetically get multiple game servers (at least one per core) to run on the same server machine?

    Do you have any rough CPU / RAM specs for your performance tests?

    I'm looking around at cloud instances and an 8GB ram / 8 CPU instance will run about $250/month. The calculations are very different if I can get ~100 users vs 8 x 100 users. I need to generate $2.50 per CCU per month in the first case vs ~900 users where I would only need to generate 31 cents per CCU per month to break even on the server (much easier).
     
  12. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Definately, as a general rule I normally run "CoreAmount-1" instances per server, so on an 8 core box you could run 7 instances. However, this is very dependent on your game, if your game is simpler and maybe runs ok with a 20 or 30 hz simulation, then you probably squeeze in a lot more (i would probably never go higher then "CoreAmount*2", even for a simple game tho)

    ~2ghz ~1gb of ram should be fine for 100 players I'd say. It depends heavily on if it's a VM or not and if it'a VM how it is ran (hyper-v, etc.).
     
  13. LightSky

    LightSky

    Joined:
    Aug 12, 2012
    Posts:
    45
    Just picked this asset up. :)
    Is there any pre-built working scenes available for download that have the basics up and running? (Such as the one from the tutorial videos)
    I just find it easier to pick it apart a working program while reading up on the documentation for how specific elements work together.
     
  14. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741
    Quick really noob question. I bought Bolt because it seemed like a great solution even before I'm actually familiar with how it works...(I do love a sale). So Here's a completely hypothetical question to see if I understand what it can do....

    Let's say I had a turn-based game, whatever, Checkers... I could use Bolt to allow 2 folk or more to play each other on their own devices. (A basic example, but I wanna get the basics so I could whip up a quick shooting proto or the like.

    Bolt, provided the ability to play head to head / device to device? Does more of course, but am I correct?

    Thanks.
     
  15. jaybennett

    jaybennett

    Joined:
    Jul 10, 2012
    Posts:
    165
    Awesome :) Purchased!!

    Do you have any tips on how you might synchronize point-and-click (navmesh) style movement?

    I was thinking of syncing target positions and allowing each client (and the server) to build their own path locally. But then sync the actual movement also? Might be kind of network intensive...
     
  16. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    You'll find a bunch of pre-built things in the bolt/samples directly, this incldues: third person movement, drivable cars, mecanim root motion.

    Yes Bolt allows this, and in fact today or tomorrow I am releasing the LAN/WiFi discovery which lets you play against and find each other on the local networking without having to muck around with IP addresses, etc.

    If you are looking to allow play over the internet between two mobile devices, it's a bit more complex right now as we are working on launching the cloud service (which will be like photon cloud) and also working on the master server (which you can run yourself, but we will also host one that you can subscribe to). They both solve this mobile-device-to-mobile-device over internet (in two different ways, however).

    I actually have an example for the next release that does this (later today or tomorrow), in two different ways - one with local prediction and one without. I have gotten this question several times over the past days (how to do point-and-click stuff) so figured it'd be good to throw one together.
     
  17. jaybennett

    jaybennett

    Joined:
    Jul 10, 2012
    Posts:
    165
    Rad!! You are doing good stuff man :D
     
  18. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    Just wanted to chime in and tell you all how my experience has been going...

    So I have been watching Bolt since it magically popped up (out of no where I might add, at least in my case) and I have been mulling over the examples and trying different little samples out before beginning to port my project over from uLink and I have to say. This is phenomenal. Just looking over what works in the vehicle sample, this networking engine has invalidated a TON of things I had to build myself. Things that took countless hours and many days to code and get working properly. A rigid body smoother messing around with dirty flags to get basic objects to sync, 3 classes (one for the server, one for the client, and one for both) to get mecanim animation to work (which I might add don't take into account a dampening so without root motion, the mecanimator gradually builds up speed while the actual character beginnings running at its running or walking speed), an authoritative movement script to record movements states, input data and whether to accept it or reject it as well as having to run my own basic interpolation and extrapolation and on top of all this having to deal with building my server first, then my client, then connecting to the server as a client to test whatever part of the game I was working on... EVERYTIME I wanted to test it. Bolt does and solves all of these issues.

    I still haven't put things to the test yet, but I will say this: I started on this project in Jan of this year using uLink. I was there on the forums for the past 6 months. Never once for any question, concern or comment I had did I get an actual developer response, only a mod welcoming me to the forums saying they would take some criticism I had into concern (mind you some months later much of what was brought up was never solved) 2 issues I had were major deal breakers for me that I was forced to figure out on my own and much of the help that did come was from Yukichu that has posted on here previously. He and one other gentleman were my only saviors when I ran into big issues. That doesn't look too good when you have a product that costs more than 12x as much as this one does (at least now in its beta) I know I will probably get crap for this but I don't really care. When you commit serious money, time and effort into a product or even to evaluate one, support is a HUGE factor, at least in my eyes.

    I just got finished with some questions I asked in private to fholm and I must say, the support is absolutely incredible. In the past 3 days alone (each time the response was usually minutes later) I have gotten more answers, comments and suggestions taken from one man that I did from an entire team in 6 months time. Take that as you will but I figured it was worth mentioning when it comes to a daunting task like choosing a solid networking middleware that not only suits your needs but has the support you will need when you run into problems, because trust me, you will.
     
    TS42, outtoplay, John-G and 2 others like this.
  19. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    Thanks for the swift replies! I went ahead and bought Bolt last night and am still going through the tutorials. So far it seems like a must buy, best in class plugin.

    It sounds like currently without hosting our own services, we are maxed at ~128 players total, one room.

    I saw in the tutorial that we connect to the BoltNetwork via UdpEndpoint, which consists of an IP Address and a port. It seems like that would need to be hard-coded. I was hoping there would be some way to use a different UdpEndpoint once it was determined that the room is full (infinitely repeatable for 100's of rooms). Of course, that wouldn't necessarily be a wise problem for you to solve as it might just make it easy to not need your forthcoming cloud service :). Anyone know how to do that? I'm not sure if there are hooks in the API to make this possible or not.
     
  20. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Thanks for your kind words :)

    Well, not really. You can have one player host a server and have others join him - this can be done with as many players as you want, yes 127 players can at most join ONE hosting player. but there is nothing stopping you from having several hosting players (and the upcoming master server will help with this, greatly). This is why I said it's hard to compare Bolt atm to Photon Cloud because the way they connect players together is completely different.

    Well, the direct Connect call takes an UdpEndPoint, yes. But there is nothing stopping you from passing in a string that the user can enter which is an IP+port and parse that with UdpEndPoint.Parse(), again - this will all become so much easier in the future, we're working as fast as possible.

    The Master Server, which will come bundled with Bolt, will solve these issues by doing NAT punching and allowing people to connect together that way, and facilitate servers/rooms/sessions (whatever you wanna call them). Basically the master server is a .NET EXE file which runs on both osx, windows and linux, and it hosts a web interface and a bunch of other things to administrate it.
     
  21. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    A small issue with the 0.2.0.5 release has come forth, for some people bolt will try to spawn a vehicle prefab into the scene when you launch your own map. This comes from a cached configuration file during the build process. Here's the simplest fix I could come up with:

    Find the file BoltEditorSettings in Assets/bolt/resources and select it, in the inspector window switch it to "Debug" mode, like this:



    When the inspector is in Debug mode, make sure that the fields "Debug Start Map" and "Debug Start Config" don't have any values (most likely they have values which indicate that the vehicle sample will try to launch, which is whats causing this issue).



    If this is how your editor settings file looks like, clear the two values so they are empty. Sorry for this issue, it's an error on my part when building the release package.
     
    John-G likes this.
  22. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    Ok that sounds good. More questions still yikes.

    1) I don't understand where the enum of BoltPrefabs comes from. Can you explain that?
    2) Can BoltNetwork.Instantiate be modified to use a pooling plugin such as Pool Manager? Or would that make it not work right?
    3) How do you destroy BoltPrefabs in the Scene? BoltNetwork.Destroy or other command? Same question about if pooling can be used when despawning, even if I have to modify the code myself is fine. I thinking about for enemies and pickups primarily. Our game will have a lot of enemies dying frequently :)
     
  23. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Bolt uses a process where it modifies the assembly called bolt.user.dll depending on your project, this is where the BoltPrefabs enum comres from and this is how Bolt can give all the static type safety for events, etc.

    Right now there are no hooks to use a pooling plugin, you can modify the main bolt.dll in the BoltCore class in the bolt visual studio project and rebuild it yourself, there you have Instantiate and Destroy methds. However, if you just wanna let it be for now I can make sure to expose hooks for custom pooling solutions, originally this was in Bolt but I just decided to scrap it for the first release as it convoluted a few things, it's not a huge deal to add in again so I will make sure to do that.

    Yes, BoltNetwork.Destroy should be used, technically you could use GameObject.Destroy also as Bolt will "handle" this correctly, but it will tell you that you're destroying an entity which is still attached to the network.

    Same reply from me here on the pooling stuff, i'll make sure to expose it again for the next release.
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    Ok awesome, I can wait for that. Slight confusion on the BoltPrefabs - what I meant to ask is: how do I know which prefabs will appear in that list when I compile? What's the criteria for appearing in that list? I couldn't figure that out from the tutorial.
     
  25. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Ah, every prefab from the project which is has a BoltEntity script on it will appear.
     
  26. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Bolt now has a jabbr.net room for people who don't like IRC and want something they can run in the browser, you can login with facebook or twitter: https://jabbr.net/#/rooms/bolt
     
  27. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    Little question about your cloud bolt:

    Do you think its possible to have a small lobby server on your cloud that will list all registered player hosted server in the unity client?(similar to lobby.exe in tnet)

    If we write code using the actual bolt beta franework, do you plan to use different functions with bolt cloud in gameplay? Or we just need to have a different connection script?
     
  28. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    This is coming, the lobby/master/list server will work on both the cloud and on the real internet.

    I'm actually thinking about releasing the master/lobby server before the NAT Punch integration is done, so that you guys can start using it to list servers, see how it works, etc. the server you want to connect to would have to open the correct power, but other then that it will be the same.

    Yes you can use the exact same code for connecting over the cloud or directly to other players, or over lan/wifi and in the future we even hope to offer bluetooth connections.

    The whole point of Bolt is to abstract all of this crap away from you, your game will work the same way and call the same functions no matter how you connect.

    Edit: Basically there's going to be another overload on the Connection function which takes an enum called "BoltPlatform" which can have three values atm: Cloud, Internet and Local.
     
    Ghosthowl likes this.
  29. jasonMcintosh

    jasonMcintosh

    Joined:
    Jul 4, 2012
    Posts:
    74
    That's my setup, too, and why I am using uLink for now. Hopefully this feature could be escalated a bit in priority for Bolt, as it would expand the types of games that could be made.
     
  30. jaybennett

    jaybennett

    Joined:
    Jul 10, 2012
    Posts:
    165
    ++ on this it would be a nice feature :)
     
  31. jaybennett

    jaybennett

    Joined:
    Jul 10, 2012
    Posts:
    165
    How do you get the sample maps up and running? I'm having a problem getting the config object prefabs to load for the tutorial levels. I always seem to be loading from the default config instead. Shouldn't setting the config file in the Map asset override this?
     
  32. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    This is related to the same bug as in this post: http://forum.unity3d.com/threads/re...solution-for-unity.248912/page-5#post-1663126 . If you want you can put the editor settings prefab in "debug" mode and manually pull in the map + config in the correct two fields.

    I'm assuming you are using the free version of Unity? This will be fixed in todays release.
     
  33. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    I will see what I can do about this, not promising anything, but I'll look into it and see how/if it can be solved easily.
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    Hi fholm, I'm going through your tutorial and applying it to our game. When I run the Scene though, after I BoltNetwork.Instantiate the prefab, I get weird problems. It looks like there are 3 Bolt Entity components in my Player object after I instantiate it. And all 3 are messed up. Here's before (in editor) and after (during play) screen shots. I have no idea why this is happening. It says I need to Instantiate them, but I did...

    I also have no idea why that message about multi-edit is showing up in the "before" one. I only have one object selected.
     

    Attached Files:

    Last edited: Jun 15, 2014
  35. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    Update: I got rid of the multi-edit warning by rebuilding the prefab. However, my Player prefab that's Instantiated during runtime still says "they need to be Instantiated at runtime" when I click on it in the Hierarchy on the server (Unity). I don't think it's supposed to do that, right?
     
  36. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    No thats just a remnant from old stuff (that warning), its harmless.
     
  37. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    Ok. Well now I've gotten to the part where I have set up my player to synchronize movement like in your first video tutorial. However I notice that both my clients and the server (in Unity) do not update the moving player's position at all. No errors either, so not sure why.

    How do I troubleshoot?

    Note: when I move the Player that's active on the server (in Unity), that one does reflect movement change on one of the clients, but not the other. However, I'm not sure if the server is actually supposed to be able to control any players though, or if that's a bug on my part?
     
    Last edited: Jun 16, 2014
  38. ThrillKill

    ThrillKill

    Joined:
    Apr 7, 2014
    Posts:
    80
    What did you find bolt did better then TNET?
     
  39. EvilDingo

    EvilDingo

    Joined:
    May 7, 2011
    Posts:
    190
    Ugh. The last time I checked Photon, the price was way too high. A lot of cloud middleware don't seem to understand the size of the playerbase can be large and still only earn a modest revenue. Not only that, then you're dependent on another company for the success of your game. They go under, stop supporting their product, whatever, and you're in massive trouble. On top of that you have a reoccurring fee that's docking a sizable percentage off your game's revenue. It's just not worth it.

    I'd be much more interested in a networking solution that makes it as easy as possible for me to set up my own environment. No worries about CCU or anything. Absolutely no monthly fee siphoning my game's revenue.

    I can't think of a situation where any monthly fee based service is a good idea for anyone.
     
  40. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    We all would like that. But unless you have servers in the cloud near all continents, you won't be able to get a good ping in all countries. And if you do set up your own cloud, well that costs a lot of money too.
     
  41. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    So, things you can go through and make sure are lining up correctly are the following:

    1) The serializer for the entity is inheriting from BoltEntitySerializer<T> is passed the correct state interface in it's generic parameters

    2) On the state asset, the "target" is set to Proxy (and Controller if you are moving the char only on the server but still giving away control to a client) and 'sync when' is set to 'Changed'.

    If these two properties holds true, you should be able to drag around the entity on the server (assuming it is in the editor) and it should replicate to the clients. If you have another type of setup, then if you can show me the controller script(s) / motor script(s) and a screenshot of the state asset

    There will be an option available where you can purchase the entire cloud architecture, including source code to it, so you can host your own cloud service for your own game.
     
    Last edited: Jun 16, 2014
  42. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,555
    #1, the Serializer is an empty class. It implements BoltEntitySerializer<IPlayerState>, but there's no code in it. Does there need to be? PlayerState is the name of my Bolt State for the player, so I think that's correct.
    #2 - I don't know why I would move the character on the server - actually I don't understand the purpose of showing the game view on the server. What I want to do is open 2 clients and be able to see the same player move on both clients. Curently that does not happen. If I turn on "controller" for the target, then I can only move the player on the server window. Moving them on the clients stops working with that on. I have given each client control over one player. Server should not have control over any since "server" is not a player...and yet you still can move a player on the server for some reason.

    Quite confused.
     
  43. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Okey, are you calling GiveControl or TakeControl on the entities? Can you show me a screenshot of your state asset? And post the code where you call BoltNetwork.Instantiate?
     
  44. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    Could you give us a simple example on how to do a authoritative jump with Bolt?

    I did this in the PlayerMotor class from the tutorial as a test:
    Code (csharp):
    1.  
    2.   if (grounded)
    3.   {
    4.         if (direction != Vector3.zero)
    5.          {
    6.          if (startJump && !jumping)
    7.          {
    8.                 jumping = true;
    9.                 velocity.y = jumpValue;
    10.                 Debug.Log("Starting a jump !");
    11.           }
    12.           velocity = direction.normalized * movementSpeed;
    13.           characterController.Move(velocity * BoltNetwork.frameDeltaTime);
    14.   }
    15.   else
    16.   {
    17.         velocity = Vector3.zero;
    18.   }
    19.         jumping = false;
    20. }
    21.  
    startJump is passed from the ExecuteCommand in PlayerController

    This works for proxies and the server, but because ExecuteCommand is handled in fixed update (I assume since SimulateController is) when the action executes locally it causes flickering because it isn't being processed in Update smoothly.
     
    Last edited: Jun 16, 2014
  45. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    When you say flickering, what do you mean? do you mean the usual fixedupdate flicker that you can get, or something more?
     
  46. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    The usual fixed update flicker nothing more. I guess I don't really know a better word for it. The jump works fine for the server and the proxy nice and smooth. Just on the local client it does the 'teleporting position' kind of thing where frames are being skipped.

    It is actually the same thing I was referring to with the falling from the teleporting sample.
     
  47. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Oh, so it's just that usual thing. Okey, so there are a few ways to fix this - Bolt contains a "Frame Interpolator" class which does get rid of this in 99% of all cases, but it's a bit... buggy atm. I'm working on a fix for it, hopefully get it in for tonights 0.2.1 release.
     
  48. Ghosthowl

    Ghosthowl

    Joined:
    Feb 2, 2014
    Posts:
    228
    Excellent :) Thank you kind sir.
     
  49. GregMeach

    GregMeach

    Joined:
    Dec 5, 2012
    Posts:
    249
    Not sure, yet but since it works without Unity sockets (whatever it's called) meaning it will work on iOS free version that alone is a huge "+" foe me
     
  50. Gohla1

    Gohla1

    Joined:
    Jun 15, 2014
    Posts:
    2
    I've just skimmed through the tutorial and this seems like a great library for a multiplayer FPS game, since it takes care of prediction and lag compensation, but I have two questions.

    I assume Bolt takes care of integrating corrections sent from the server to a client because it does prediction, is that correct?

    What about networking rigid bodies? My game centers around hover tank vehicles, which are simulated close to characters, but can also rotate around the Z-axis. I'm pretty sure that player-controlled dynamic rigid bodies will be a problem since Unity does not support simulating single rigid bodies (see http://feedback.unity3d.com/suggestions/function-for-manually-simulating), which (I think) are required for integrating corrections on dynamic rigid bodies, right?
    But would networking a kinematic rigid body with some custom collision detection and simulation of external forces (e.g. explosions) work?

    Thanks and keep up the great work :)