Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Lockstep RTS DarkRift Server

Discussion in 'Multiplayer' started by jpthek9, Mar 24, 2015.

  1. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    The author speaks no lies. I'm using DarkRift right now and it's super efficient on my CPU (< 3% and my plugin is responsible for most of the processing) with minimal issues. If anyone's looking to make an RTS game and needs a good server to distribute synchronous and aggregated information, you can use DarkRift and check out my plugin to get you started. It's pretty bare-bones right now but that's good because you can guide the plugin in the direction your game takes.

    The server works by sending the frame count along with the frame's data to every player in the room. If a player doesn't have a packet for frame X, he can't advance to frame X+1; the player'll have to wait for the packet because the framework is synchronous. Every packet tagged 1 is in-game room data. Coming from the server, it'll always have the frame count in the object part of the packet. To the server, the subject must have the room's ID so the Core can properly distribute the information to the room.

    Tag 0 is reserved (going to do something special with it later). Tag 2 is for meta communications (i.e. matchmaking). The subject for tag 2 represents the type of meta communication being made. Currently, only 0 is implemented (look for room; if not room found, create a room) and the object is a byte that represents the maximum amount of players as well as the type of the room.

    Here's the download link for my plugin: https://www.dropbox.com/s/rddsrr3kw8mvdob/Lockstep.zip?dl=0

    There aren't any restrictions on use but I'd like some credit if you can spare it. Hope it helps :).

    By the way, for those who're having a hard time making deterministic simulations, do not despair! I'm working on a 2D double-precision physics engine right now which is designed to work in lockstep. Currently, velocity, detection and whatnot are all A-Okay. Rotations're on the way!
     
    Last edited: Mar 24, 2015
    Joe-Censored likes this.
  2. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    1,102
    Awesome :D

    It's really good to see people sharing their plugins, it can save sooo much time for others if they're trying to do similar - particulally if they're a beginner! It's also amazingly helpful in telling me what needs improving on the APIs and in finding any bugs :)

    I (btw I'm the author of DarkRift if you haven't gathered that already) have a matchmaking plugin in the works but it's a pretty standard one, not quite as fancy ;)

    Jamie
     
    Joe-Censored likes this.
  3. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    Thanks for the support! I hope that others share their DarkRift plugins as well so that DarkRift becomes the work of a community.
     
    Last edited: Mar 25, 2015
  4. RobertFitzgibbon

    RobertFitzgibbon

    Joined:
    Mar 2, 2015
    Posts:
    32
    Hi, I'm creating an RTS myself and I've been looking for a way to do multiplayer. I've been looking into the lockstep method and I just came across this. I've never used Darkrift before, but I just installed it, I'm just not sure how to install your plugin and use it though? Can you help me @jpthek9 :(
     
  5. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    Yeah, sure thing! You just drag the .dll into the Plugins folder. If you don't have a Plugins folder, create one next to the DarkRift.exe file.

    Actually, I'll be sending out another version of DPhysics soon so you can probably just use the multiplayer included in that which is already set up with client code. It has a PDF in it that will guide you through setting up multiplayer.
     
    Last edited: May 15, 2015
  6. Jamster

    Jamster

    Joined:
    Apr 28, 2012
    Posts:
    1,102
    FYI: Faster way to create the plugins folder is just to run the DarkRiftServer executable, it'll create it automatically :)

    Edit: Never let me say "FYI" again, it just seems so... wrong... :confused:
     
  7. RobertFitzgibbon

    RobertFitzgibbon

    Joined:
    Mar 2, 2015
    Posts:
    32
    Alright I'll be looking forward to the next release! Thanks alot @jpthek9
     
  8. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    Awesome! I'm planning on sending out the new release with replays and a few extra features this Saturday, but there's no guarantee it won't happen sooner ;).
     
  9. razix

    razix

    Joined:
    Jul 19, 2015
    Posts:
    1
    hi, I am interested in checking out the lockstep plugin, but the link is dead.
     
  10. Berati

    Berati

    Joined:
    Dec 13, 2015
    Posts:
    5
    Link broken?
     
  11. jpthek9

    jpthek9

    Joined:
    Nov 28, 2013
    Posts:
    944
    Hey guys, it's been 2 years since I uploaded the server. I can't find it anywhere in my dropbox account. My Windows computer needs new memory sticks but as soon as it comes and I have it up, I'll code a new DarkRift server for LS.
     
    Jamster likes this.
  12. RF008

    RF008

    Joined:
    Oct 28, 2016
    Posts:
    20
    Keep us posted about the updates.
    happy to hear again from you
     
  13. JagiApps

    JagiApps

    Joined:
    Jul 15, 2016
    Posts:
    1
    Maybe someone has original zip?
     
  14. Deleted User

    Deleted User

    Guest

    Yo reupload?
     
  15. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The OP hasn't logged in for over a year, so it seems unlikely.