Curious about multiplayer in TUG? Ask your questions!

GhostGhost REGISTERED, Developers Posts: 74 Developer
edited April 2015 in News & Updates
We are working very hard polishing, bug-fixing and implementing the last bits of multiplayer in TUG. We wanted to create this post so you could ask any question you wanted to know the answer to about multiplayer!

Post your questions and a developer will respond to them.
«1

Comments

  • Red AgliatorRed Agliator REGISTERED Posts: 307 Seed
    Will we be able to switch a game file's mode from creative to something else? (I'm imagining using creative to make a special world, then putting it up for multiplayer.) Or maybe it's more a question of a particular player switching between creative and regular mode, while everyone else keeps playing as is?

    Will we be able to freely switch a world/game file between single player and multiplayer and back? (For example, set things up how you like them in singleplayer, and only then make the world available.)

    What kind of server access control is in place right now, if any? For example:
    • requiring a password to connect
    • chat blocking
    • player kicking
    • ip blocking
    • user name blocking
    • temporary protected mode (turn access off for a short time so it's essentially in single player mode)

    Is there anything we need to know in order to run TUG multiplayer from a dynamic IP address?

    Similarly, is there anything we should know about with common and not quite so common router / firewall settings in order to run / play TUG in multiplayer?
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    @ Red Agliator

    When you are in a game as the server, you will be able to hit "ESC" to go back to the menu and hit a "Leave" button that shows up. This will delete and cleanup the current world and hit all the clients. This will clean out all the LUA states that existed. You can then re-launch a new game. So you will be able to start survival or creative games. You will not be able to change game modes while the world is running and suddenly change from "Survival" to "Creative" -- once a game is launched in that mode, it's set in that mode.

    Once the world is loaded in single player, you won't be able to on the fly switch to multiplayer.. however if you leave the the single player game and go to the Multiplayer menu, you can load that world in multiplayer mode with the multiplayer options. A saved world does not distinguish between single player and multi-player.

    For server control:

    - No password management right now. Players are identified by their name only right now.
    - No chat blocking.
    - You can kick players by name with /kick <playername>
    - You can ban players by name with /ban <playername> (this only stays until the server is restarted, not persistent right now. Bans happen internally by IP. You will use the command /banlist to see what IP addresses have been banned.. you will have an /unban <ip address> to remove the ban
    - No username blocking currently
    - You set the max number of players at the start of the game that can connect. Right now we haven't implemented a command to adjust max players.. but since you mentioned it, I will make sure to add it /setmaxplayers that will change on the fly to do what you want.

    You will have to give out the IP address and the port to people to connect to. Right now running as a server also puts you in the game as a player. For the first phase of multiplayer you will not be able to run a dedicated server. You will have to make sure to do normal port forwarding on your router to have players connect to you.

    For this first phase you will need to make sure you know how to do port forwarding on your router so a player can connect. There may be solutions we implement in future version to help with that level of management. (i.e. Nat Punch-through)
  • Red AgliatorRed Agliator REGISTERED Posts: 307 Seed
    Thanks for the detailed reply!
    Ghost wrote:
    When you are in a game as the server, you will be able to hit "ESC" to go back to the menu and hit a "Leave" button that shows up. This will delete and cleanup the current world and hit all the clients. This will clean out all the LUA states that existed. You can then re-launch a new game. So you will be able to start survival or creative games. You will not be able to change game modes while the world is running and suddenly change from "Survival" to "Creative" -- once a game is launched in that mode, it's set in that mode.
    That makes sense.

    I'm also wondering about being able to change the mode between sessions. My understanding is that right now, once a creative game world is made and saved, it can't ever be launched in survival mode. (And vice versa.) I'm wondering whether that will change with the new release.
  • Auti0Auti0 REGISTERED Posts: 277
    I'm also wondering about being able to change the mode between sessions. My understanding is that right now, once a creative game world is made and saved, it can't ever be launched in survival mode. (And vice versa.) I'm wondering whether that will change with the new release.

    It will continue to work the same for this release. We do plan on implementing that feature, but unfortunately could not fit it into this release.
  • TeknonickTeknonick REGISTERED Posts: 166 Seed
    Wow, awesome! I've been waiting for this news!

    So, a few questions... I hope they're not too much to ask.
    1. Can we dog pile!? Can a bunch of my friends and I simply go to sleep on the ground in a dog-pile, or even on a bed? Or if there's too many of us, dog pile onto two beds side-by-side? If the answers are no, make it yes!
    2. Currently, do killed players drop their items, and how so?
    3. That concept of the items... yes! This fits with question 2... If a player dies (Or if they're still alive... hehe) will we be able to simply grab their pack and bolt off, or will we have to open up a gui, drag the pack into our pack (Or even worse, each separate item), and then leave behind what we can't carry?
    4. What do we do with dead players? Do they disappear, turn into wisps, or simply stand back up and become ALIVE! ?
    The mix between the Adventurer and the Trapper yields the Tracker. Living in humble homes to help those in need. Always looking for the right coin, yet never theft is in their eyes.
    21.jpg
    20.jpg
  • Re EvolutionRe Evolution REGISTERED Posts: 1,105 Seed
    (I'm probably beating a dead horse here, but...) What is the max server size looking like for this release, and what are your hopes for end game? As in, how many people have been able to connect before its crashed horrendously, and how many for a stable game?

    Will characters be based client side or based off of server? I think it was server side, but can't remember exactly XD

    Any new modes planned for the release?

    Will there be a Dev VS Community of TUG planned somewhere along the lines?

    Has Ino's beard been grown back?
    5.jpg
  • TeknonickTeknonick REGISTERED Posts: 166 Seed
    (I'm probably beating a dead horse here, but...) What is the max server size looking like for this release, and what are your hopes for end game? As in, how many people have been able to connect before its crashed horrendously, and how many for a stable game?

    Will characters be based client side or based off of server? I think it was server side, but can't remember exactly XD

    Any new modes planned for the release?

    Will there be a Dev VS Community of TUG planned somewhere along the lines?

    Has Ino's beard been grown back?
    I'm sorry, I have to cut in here... INO CUT HIS BEARD!?
    The mix between the Adventurer and the Trapper yields the Tracker. Living in humble homes to help those in need. Always looking for the right coin, yet never theft is in their eyes.
    21.jpg
    20.jpg
  • SigilSigil REGISTERED, Developers Posts: 678 Developer
    How will you deal with lag issues that make playing with others difficult? Will you be working with a State Rewind function or something like that?
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    Teknonick wrote:
    Wow, awesome! I've been waiting for this news!

    So, a few questions... I hope they're not too much to ask.
    1. Can we dog pile!? Can a bunch of my friends and I simply go to sleep on the ground in a dog-pile, or even on a bed? Or if there's too many of us, dog pile onto two beds side-by-side? If the answers are no, make it yes!
    2. Currently, do killed players drop their items, and how so?
    3. That concept of the items... yes! This fits with question 2... If a player dies (Or if they're still alive... hehe) will we be able to simply grab their pack and bolt off, or will we have to open up a gui, drag the pack into our pack (Or even worse, each separate item), and then leave behind what we can't carry?
    4. What do we do with dead players? Do they disappear, turn into wisps, or simply stand back up and become ALIVE! ?

    1. Sleeping in multiplayer will lock your actions, fade the screen for a bit and then come back with restored health/energy. There won't be a model transition of someone sleeping, they will just stand there for other players. So multiple people using the bed won't "Dog Pile" as you describe it :)

    2. Yes they do! Once a player dies, everything in their hands and inventory will drop out on the ground around them available for pickup by other players

    3. They will be items on the ground. So you'll see the actual sticks or rocks they were carrying, they won't drop a "pack" that you pen up.

    4. When a player dies, they will turn into a wisp for a few seconds, and then respawn back at their saved spawn location
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    (I'm probably beating a dead horse here, but...) What is the max server size looking like for this release, and what are your hopes for end game? As in, how many people have been able to connect before its crashed horrendously, and how many for a stable game?

    Will characters be based client side or based off of server? I think it was server side, but can't remember exactly XD

    Any new modes planned for the release?

    Will there be a Dev VS Community of TUG planned somewhere along the lines?

    Has Ino's beard been grown back?

    1. We are shooting to have the sever to be able to play with 4-5 other players in a smooth fashion. There is a LOT of processing for the server to manage that many players all generating and modifying terrain, as well as the many game objects all around that can be interacted with. With future phases of multiplayer, we will steadily grow that number of people that can join.

    2. When a player first joins a new server, they will be given assigned a random character model by the server

    3. We will support Creative and Survival modes initially, so no new ones!

    4. Hard to say! That might be fun

    5. Yes.. it's getting cold here in DFW, so he needs a face mask.
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    Sigil wrote:
    How will you deal with lag issues that make playing with others difficult? Will you be working with a State Rewind function or something like that?

    Very good technical question! Right now we won't have super high-end lag compensation with state and simulation lag across all clients. There is a certain level of prediction for dynamic objects that goes into keep them caught up with the server as much as possible. So a client will see another client a bit in the past, but since we aren't traveling as super fast speeds, you won't be that far in the past. We do have some very unique solutions in place too for network physics movement. Corey, our CTO, is currently writing a blog about this very thing in our implementation that will go into a lot more technical detail! So expect to see that tomorrow.
  • SimbaSimba REGISTERED, Developers Posts: 74 Developer
    Hi Cameron, nice to see you actually posting on the forum!

    I am excited to see the write-up tomorrow, but I was curious, how much does the server trust the clients? A big pitfall of games writing their own network code, as you guys have probably already considered, is that they tend to be easily exploitable.

    Does the server keep track of player inventories and health?
    Does the server monitor player positions, possibly relocating them or kicking them if they do something impossible? (teleport, move unpredictably)
    Do you have any counter-measures (aside from the manual kick/ban) to correct suspicious behavior?

    These problems are probably the least of your concerns in these early stages, but they can be difficult to correct later on.
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    jalb wrote:
    Hi Cameron, nice to see you actually posting on the forum!

    I am excited to see the write-up tomorrow, but I was curious, how much does the server trust the clients? A big pitfall of games writing their own network code, as you guys have probably already considered, is that they tend to be easily exploitable.

    Does the server keep track of player inventories and health?
    Does the server monitor player positions, possibly relocating them or kicking them if they do something impossible? (teleport, move unpredictably)
    Do you have any counter-measures (aside from the manual kick/ban) to correct suspicious behavior?

    These problems are probably the least of your concerns in these early stages, but they can be difficult to correct later on.

    We maintain an authoritative server, so they are the ones that dictate everything that the clients see and they have control to analyze when a player might attempt to exploit the server, so we can add rules and checks to remove that player if we need to (though no such rules are in place right now, we have the ability to do it in the future)

    Health, inventories, whether or not you can dig a particular voxel, etc... all that is governed by the server's gameplay.

    We don't have any checks in right now, but the server has the ability to make those checks in the future and close the connections if needed since it is what relays the information to all the other clients.. so adding a rule-check for player behavior is easily doable in the new system we wrote.
  • SimbaSimba REGISTERED, Developers Posts: 74 Developer
    Thanks for your response. I am excited to see it in action.
    Ghost wrote:
    but the server has the ability to make those checks in the future and close the connections if needed since it is what relays the information to all the other clients..
    Are corrective measures also possible with this system? I could think of an instance where a client tries to do something incorrect as a result of network lag, rather than mal-intent. For instance someone digging a voxel may lag behind and dig a voxel someone else has already removed. Similarly, someone could walk through a voxel not present on their screen, thus "moving impossibly."
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    jalb wrote:
    Thanks for your response. I am excited to see it in action.
    Ghost wrote:
    but the server has the ability to make those checks in the future and close the connections if needed since it is what relays the information to all the other clients..
    Are corrective measures also possible with this system? I could think of an instance where a client tries to do something incorrect as a result of network lag, rather than mal-intent. For instance someone digging a voxel may lag behind and dig a voxel someone else has already removed. Similarly, someone could walk through a voxel not present on their screen, thus "moving impossibly."

    Voxels will correct to whatever the server has defined for that cell when modifications happen, so even if a client happens to lag enough where the modification was slightly different from what the final result would be, the server will send an update correcting the problem and the clients will end up representing the master version of the terrain cell.
  • docdoc REGISTERED, Developers Posts: 6 Developer
    Sigil wrote:
    How will you deal with lag issues that make playing with others difficult? Will you be working with a State Rewind function or something like that?

    I am working on a blog post that will hopefully be coming out today that describes a couple of the lag compensation algorithms we are using to keep gameplay smooth. It could be a lengthy post, so they may break it up into a couple of separate post.
    Doc

    Twitter: CoreyClarkPhD
  • PixelDragon13PixelDragon13 REGISTERED, Tester Posts: 114 Seed
    what will happen if you install a mod, then host a server and someone tries to join the server without mods? Or is it possible to host a server with a mod anyway?

    PD13
    TUG Modder
    Twitter: @IKStreamIvo
    YouTube: IKStream!
    Site: Pixel's Web
  • docdoc REGISTERED, Developers Posts: 6 Developer
    what will happen if you install a mod, then host a server and someone tries to join the server without mods? Or is it possible to host a server with a mod anyway?

    PD13

    At this point, everyone in a multiplayer game needs to have the same mod/files/assets. This will not be a permanent limitation, but it will be on the initial multiplayer release.
    Doc

    Twitter: CoreyClarkPhD
  • deadcantdancedeadcantdance REGISTERED Posts: 2
    I like the idea of multiplayer, but I am afraid that hackers will fast ruin this game. So please, please, please prepare EARLY or multiplayer is dead before it starts. Or make it possible, that one player host the game and other just need to join.
    I am about curious that it seems that you are so excited about multiplayer, but totally forget to put in much more content. At moment there is nothing but building. No NPCs no STory, no even little quest or something else to do. Or, whatever, implement achievements, so that there is a sense to play this game for a longer time.
    P. S. I love you Nerd Kingdom, and this precious game,... my precious...
  • PhyrePhlyePhyrePhlye REGISTERED Posts: 1
    @ deadcantdance: I expect the Devs are rather busy atm just getting this up and running. Stories, quests, etc., will surely be coming once the multiplayer thing is stable.

    Btw, will PvP and PvE only sites be noted, or do we just log on and stand around for awhile to see what happens?
  • deadcantdancedeadcantdance REGISTERED Posts: 2
    @phyrephlye OK MP first, but if we both play together, we will have nothing to do. I collect food you collect wood? We build a gentlemen mansion. And than? In my game I build a house with a cellar, a garden. Trying to find ore. But I have no idea what I should do when this is finished.

    Thai game really needs content. I purchased the game and it is good for this low price but I don't know how long I will play it. Maybe I am inpatient, but I want more. :) So much potential.
  • PamcakesPamcakes REGISTERED, Moderator Posts: 738 Seed
    deadcantdance, they have so, so, so much more planned.
    That's a really cool shirt you have on.
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    Pamcakes wrote:
    deadcantdance, they have so, so, so much more planned.

    Yes! So much planned!
  • xx_hodgiexx_hodgie REGISTERED Posts: 28 Seed
    God I can feel the Multiplayer and its so close its killing me
    11.jpg
    12.jpg
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    xx_hodgie wrote:
    God I can feel the Multiplayer and its so close its killing me

    That's just me... sneaking up behind you... with a bronze spear!
  • xx_hodgiexx_hodgie REGISTERED Posts: 28 Seed
    Honestly if it got it out sooner Ill become a pin cushion
    Haha Can't wait to play on a huge dedicated server one day where Nations can be built and toppled and it will be interesting how the community my start trading (What will be currency though)
    11.jpg
    12.jpg
  • TeknonickTeknonick REGISTERED Posts: 166 Seed
    xx_hodgie wrote:
    Honestly if it got it out sooner Ill become a pin cushion
    Haha Can't wait to play on a huge dedicated server one day where Nations can be built and toppled and it will be interesting how the community my start trading (What will be currency though)
    Well, in a time period our characters are in, there would be no currency. In such an early stage of technological advance, you wouldn't waste survival resources as a simple means of 'currency'. People would have a bunch of other options to find resources though... Find resources yourself, steal it from others, pillage it from others, trade something they want for something you want... simple stuff like that. "I have a porkchop. You're starving, and can't kill me. Are you willing to give me your pick in exchange, or do I have to come back after you have passed away?" scenarios are going to be fun!
    The mix between the Adventurer and the Trapper yields the Tracker. Living in humble homes to help those in need. Always looking for the right coin, yet never theft is in their eyes.
    21.jpg
    20.jpg
  • ginbombayginbombay REGISTERED Posts: 2 Podling
    xx_hodgie wrote:
    Honestly if it got it out sooner Ill become a pin cushion
    Haha Can't wait to play on a huge dedicated server one day where Nations can be built and toppled and it will be interesting how the community my start trading (What will be currency though)

    maybe the best currency at moments is metal, but like said Teknonick, depend of demand and need.

    Great Work! i cant wait for MP! :D
    6.jpg
  • Red AgliatorRed Agliator REGISTERED Posts: 307 Seed
    I am about curious that it seems that you are so excited about multiplayer, but totally forget to put in much more content.
    Taken literally, realize that Nerd Kingdom hasn't "forgotten" to put in content, they just haven't gotten to it yet. They did something pretty crazy, which is to give us access to the game before they'd even built the entire foundation. (Let alone before they started raising floors and stairwells!) In some software companies, the internal testers might not even see something at this early stage.

    But I suspect you were stating your desire for more content. (And soon!)

    Pamcakes nailed it about content: there's so much more planned! If you haven't already, read through TUG's kickstarter blog to see the kinds of stuff they really, really want to do. They also have posts on tumblr, facebook, and so on, but the kickstarter site talks about the long-term goals.

    As for the soon...I hope so, too! I suspect there are a lot of chewed fingernails out there as we all wait. That's probably why I spend so much time on the forums and the wiki: when I run out of things to do in-game, I come here to read and talk about it instead.

    PhyrePhlye wrote:
    will PvP and PvE only sites be noted, or do we just log on and stand around for awhile to see what happens?
    Ooo, good question for forum folks! I have an old bookmark to a TUG server list, but I have no idea whether anyone will use it when TUG multiplayer is released. Maybe once the update is out, someone will start a dedicated forum thread for people who want to invite folks to their servers.
  • GhostGhost REGISTERED, Developers Posts: 74 Developer
    Taken literally, realize that Nerd Kingdom hasn't "forgotten" to put in content, they just haven't gotten to it yet.

    Adding in a proper multiplayer setup required the team to more-or-less complete rewire the vast majority of the engine and LUA code in order to add in a fully capable and expandable client-server architecture. Most of the work for the last 2 months has been centered around getting the same game up and running, but with the full-fledged multiplayer architecture in place, hence why there hasn't been any new content... the entire team has been devoted to getting multi-player going, and it's a LOT of work.

    Not only did we have to do the re-writing of a lot of systems, but as the server you are hit with a much harder processing requirement than you were before... TUG is an open-world procedurally generated sandbox game... which at it's root means that all the terrain you see is created through a series of algorithms to give you the limitless random world effect. This generation process is quite complex and not easy to get working for even one person smoothly. Now imagine trying to manage all the generation for 4-5 players on the server and still give the person playing as the server a stable and playable gaming experience while they are being impacted heavily by the movement and generation of every other player. So we've had to not only overhaul the terrain generation system to support multiple players, but we have had to do several optimization passes to improve it's processing capabilities.

    We've improved LUA processing and garbage collecting, game object processing, rendering optimizations, memory optimizations and many many other things over the last few weeks specifically to squeeze a lot of performance out of the engine so the server could handle itself and a group of other players as efficiently as possible.

    Most of the LUA code has been completely re-written. We've added many new APIs and changed the way of doing certain things. We've cleaned up a lot of logic from the engine-side of code and moved it into the LUA side of code.

    All of this I've mentioned is just the surface of what we've been doing over the last few months and it's coming together nicely on our home-stretch! We are so excited to get this out to you guys, and we have many more things planned specifically for multi-player capabilities.

    New content is planned, don't worry! We literally have walls of sticky-notes in our conference room with all these features that are planned. As a team, we've just had to step back and all work on getting this new system in place for you guys.
«1
Sign In or Register to comment.