Local Server Setup

From Dashkin Wiki
Jump to: navigation, search

This page provides instructions for setting up to host games locally and also setup local dedicated servers.


Hosting Locally

To host a game locally

  1. setup your local network to allow public joining (Refer to 'Port Forwarding' below)
  2. navigate to the multiplayer 'create a game' screen
  3. Enter your game name
  4. Enter your level
  5. Select 'Advanced' for more advanced options (Refer to game options below for detailed explanation)
  6. Click start game to begin hosting your server

To change game options while hosting

  1. Enter the pause menu by hitting enter, start, or escape
  2. Enter the 'Game Options' menu
  3. Change your game options
  4. Make sure to 'Apply Settings' after you're finished
  5. Some options require the match to end to take effect, select the 'End Match' button to end the match and apply settings immediately

Debugging

  • My game is not showing up in the game browser list.
    • You must be logged in for your game to show up in the game browser list. If you still aren't showing up, make sure that the 'Listed Publicly' option is set to true in your game options.
  • Nobody can join my game, they all get 'Timed out' messages.
    • This could be many problems. Most likely port forwarding is not setup. Refer to the port forwarding section for help.
  • My game options aren't taking effect.
    • Some game options need the match to end to take effect. Click the 'End Match' button in the game options menu to end the match and apply the settings.
  • I set a password on my game, but players aren't able to join even when they put in the right password.
    • Make sure you don't use any non-ascii characters in your password. Stick to the basic letters, numbers, and special characters.

Game Options

This is a list of all game options and what they do.

  • Game Name : This is the name that your game has, it will show up in the game browser as such.
  • Time Limit : This is how long matches last, set to 0 for matches that last forever.
  • Set Password : This is the password for your game. Players will be challenged when attempting to join and must match your password. Your password is not sent to the backend servers and is kept locally.
  • Score To Win : This is how many points a side must score in order to win a match. Set to 0 for a time-only victory condition.
  • Level : This is which level your server runs
  • Team Size Max : This is how many people can be on a specific team. The max number of players is twice the number (so if team size max is 3, then 6 people can join).
  • Listed publicly : Set this to true if you'd like your game to show up in the game browser (must be logged in for this to take effect).

Port Forwarding

When hosting your own dedicated or custom game you must be publicly reachable via the internet. Most networks block traffic by default, so in order for other people to join your game you must setup port forwarding for your machine. This requires specialized knowledge of your local network and administrator passwords for your router.

Connection Testing

To make sure people can connect to you, click the 'Test Connectivity' button in the 'Create a Game' menu. Our backend servers will attempt to connect to your local machine and verify if you are publicly reachable.

Test connectivity.png


High level information

Dashkin requires the following ports to be open by default :

  • 7777 - UDP (Main Game)
  • 7787 - UDP (Ping)

Navigate in your browser to your router's configuration menu, find the port forwarding options, and enable port forwarding for these two ports to your machine. You must setup port forwarding using your internal network IP address, not your public address.

Here is an example screenshot of a comcast router's configuration menu :

Port forwarding comcast.png

Finding your internal IP address

Some routers do not show your internal IP address nicely in configuration menus, here is how to find it:

  1. Open the control panel
  2. Click on 'Network and Internet'
  3. Click on 'Network and Sharing Center'
  4. Click on 'Change adapter setting'
  5. Find and double-click your active network device
  6. Click the 'details' button
  7. Look for the 'IPv4 Address' line


Finding ip 1.png Finding ip 2.png Finding ip 3.png Finding ip 4.png

This page lists many guides on port forwarding

Hosting a Dedicated Server

A dedicated server is a standalone server that consumes minimal resources which you can run on your machine without having to be logged in and running all the time.

The steps for running a dedicated server are :

  1. Download the latest dedicated server from the website https://online.dashkingame.com/account/dedicated_server.html
  2. Unzip the server into a directory of your choice
  3. Acquire a server key from the dedicated server page (should be at the bottom, click 'Create new Account')
  4. Save your server key as 'server_key.json' next to the 'setup.bat' inside the Dashkin server directory
  5. Run the 'setup.bat' ... It should confirm the existence of the server key and server
  6. Run option 3 to create your server configuration file.
  7. Enter your configuration options when prompted
  8. Run option 2 to run your server
Setup dedicated server.png

Dedicated Server Options

The dedicated server is configured via the 'server_config.json' file located in the directory you unzipped your server. You can configure your server by running 'setup.bat' and then option 3, or by manually editing the json file.

Here is a list of the options and what they do :

  • GameName : This is the name that your server shows up as in the game browser
  • TimeLimit : This is the length of a match in seconds. Set to 0 for unlimited time.
  • ScoreToWin: This is the score to win a match. Set to 0 for unlimited scores.
  • TeamSizeMax: This is the limit for team size. It is half the maximum number of players in the game.
  • GamePort : This is the port on which the dedicated server serves the game.
  • BeaconPort : This is the port on which the dedicated server hosts the 'ping' status
  • ListedPublicly : This is either 'true' or 'false' and determines if your game will be listed in the public game browser.
  • AllowTeamSwap : This is either 'true' or 'false' This is if players by default are allowed to switch teams.
  • MapPath : This is the path to the map which will be hosted by your dedicated server. Make sure to spell the name right or it won't work.
  • AdminPass : This is the password challenge which allows users to change options during play, spawn bots, and kick players. Admin status is accessed through the game options menu when in game.
  • AllowAllPlayersToChangeSettings: This is either 'true' or false'. This allows all players to spawn bots, kick players, and change game options during play.


Dedicated Server Playlists

Setting up Local Playlist Configuration

You can setup a custom playlist for your local dedicated server by creating a playlist config file. Your playlist file must be called 'playlist_config.json' and must be in the same directory as your setup.bat used to run the game server. Run the dedicated server configuration to set which playlist you wish to use.

Here is an example configuration file :

{
    "Playlists" : 
    [   
        {
            "Name" : "Custom",
            "Description" : "This is a custom playlist.",
            "IncludeDefaultModes" : true,
            "IncludeDefaultOptions" : true,
            "OptionsForNextMatch" : 5,
            "DefaultModes" : 2,
            "RandomOptionSetLimit" : 5,
            "Custom" :
            {
                "CustomOptions" : 
                [
                    {
                        "Name" : "QuadrupleJumps",
                        "Properties" : 
                        [
                            { "Type" : "PlayerAirJumps",        "Value" : "3" }
                        ],
                        "InRotation" : true,
                        "SetCollisions" : [ "Jumps" ]
                    }
                ],
                "CustomModes" : 
                [
                    {
                        "Name" : "QuadrupleJumps",
                        "OptionSets" : 
                        [
                            "QuadrupleJumps"
                        ],
                        "AlwaysInRotation" : true
                    },
                    {
                        "Name" : "MassiveStealth",
                        "OptionSets" : 
                        [
                            "StealthMode"
                        ],
                        "AlwaysInRotation" : true
                    }
                ]
            }
        }
    ]
}

In order to add a new game mode to the playlist

  1. Add your new custom option to the 'CustomOptions' portion of the json object (make sure to give it a unique name)
  2. Add your a custom mode to the 'CustomModes' portion lower in the file
  3. Add your custom option into the 'OptionSets' portion of your custom mode
  4. If you want it to always be an available option, make sure to set 'AlwaysInRotation' to true for your custom mode

Common Option Sets

This is the list of option sets which are currently supported on the official servers.


Name Description
NoContact In this mode you cannot strike other players.
OnlyPopup In this mode the only move that can be used is the popup.
NoDashing Dashing will be disabled for this game.
CrouchOnly Players must crouch at all times.
PlayerRadar Players will see team indicators for both their team and the opposing team.
StealthCrouch Players will enter stealth when crouched.
StealthMode Players will always be in stealth when not performing an action.
StealthBall There will be no ball indicator.
Multiball There will be many balls in play.
BigBall The ball will be much larger.
FastBall The ball will be faster.
SlowBall The ball will be slower.
FullContact Attack are faster, players hit harder.
LowContact Attacks are slow, players don't get stunned as much.
StickyBall Balls stick to players when they get hit. Balls may be stolen from other players.
SuperStickyBall Balls stick to players when they get hit. Balls cannot be stolen unless directly struck by other players.
NoWallHits Players cannot run into walls.
CrazyTeams Striking other players will turn them to your team.
StompTeams Stomping on other players will turn them to your team.
DoubleJumps Players can jump again in the air.
TripleJumps Players can jump twice again in the air.
MadUps Players can jump forever in the air.
HardBots Bots will be more difficult.
EasyBots Bots will be a lot easier.
PacifistBots Bots will not attack other bots or players.
QuickReset The ball will instantly reset.
ResetPlayers Players will be reset when a goal is scored.

Game Options Available

This is a list of game options that you can customize in your custom game config. Modifying these values and setting them to extremes may cause unstable performance or unintended gameplay.. go nuts.

Name Default Value Description
BallLinearDamping 1.0 This is how fast the ball slows down when moving. This is multiplied by the force, so to make the ball slow down faster, make this number larger.
BallAngularDamping 1.0 This is how fast the ball stops rolling. This is multiplied by the force, so to make the ball slow down faster, make this number larger.
BallGravityMultiplier 1.0 This is how fast the ball falls back to the ground. This is multiplied by the force, so to make the ball come down faster, make this number larger.
BallHitSpeedMultiplier 1.0 This is how fast the ball goes when it gets hit. To make the ball go faster when struck, make this number larger.
BallScale 1.0 This is how big the ball is. To make the ball larger, make this number bigger.
BallNumber 1 This is how many balls will be spawned into the level.
PlayersCanHitOtherTeam true This is if people can hit each other. To disable, set to false.
PlayersCanHitTheirTeam false This is if players can hit their own team members. To enable, set to true.
PlayerStunDuration 1.0 This is how long stun lasts. This is multiplied by the base value, so to make players stunned for longer, increase this number.
PlayerStunForce 1.0 This is how far players fly when struck. This is multiplied by the base value, so to make players fly farther, increase this number.
PlayerStunImmunity 1.0 This is how long stun immunity lasts. This is multiplied by the base value, so to make immunity last longer make this number bigger.
HasSuddenDeath true This controls if a tie game results in sudden death or not. To disable, set this to false.
CanKick true This controls if players can kick.
CanPunch true This controls if players can punch.
CanPopup true This controls if players can use the popup move.
CanJump true This controls if players can jump at all. It is recommended not to touch this.
CanSlide true This controls if players can use their slide moves.
CanDash true This controls if characters can dash.
MustCrawl false This controls if characters are forced to crawl.
RunSpeed 1.0 This controls how fast players are. To make players faster, make this number larger.
PlayerGravity 1.0 This controls how fast players fall back to the ground. To make players fall faster, increase this number.
AttackSpeed 1.0 This controls how fast players attack. This controls how long an attack is played for and increasing it will make players more responsive to controls.
HasTeamIndicators true This controls if team indicators for your team are displayed.
HasOtherTeamIndicators false This controls if team indicators for other teams are displayed.
HasBallIndicators true This controls if ball indicators are present.
ResetPlayersOnScore false This controls if players are reset when a goal is scored.
InstantBallReset false This controls if the ball is reset instantly instead of counting down.
ContinuouslySpawnBalls false This controls if balls are spawned continuously instead of keeping a set number of them in play.
ContinuouslySpawnBallTimer 5.0 This is how many second elapse between continuously spawning a new ball.
AIAlwaysHard false Set this to true to set the AI as always being in 'Hard' mode.
AINeverHard false Set this to true to set the AI as never being able to be in 'Hard' mode.
AINeverAttack false Set this to true to prevent AI from attacking players or other AI.
AIAngerMultiplier 1.0 This value controls how quickly bots anger. To make them anger faster, increase this value.
AutoBalanceBots false This setting will automatically balance the teams of a match with bots to keep the sides the same number.
StealthTeams false Set this to true to have players enter stealth mode when not performing an action. Stealth mode means that you cannot see players on opposing teams.
StealthNameplates false Set this to true to hide opposing player's nameplates.
StealthCrouch false Set this to true to enable stealth mode only when crouched. This will hide crouched players from the opposing team.
StealthBrokenWhenBallsAttached true Set this to false to reveal players when balls are following them.
CrouchHidesName true Set this to false to reveal nameplates when crouching.
HitSwitchesTeam false Set this to true to have players switch to the hitting player's team when struck.
StompSwitchesTeam false Set this to true to have players switch to the hitting player's team when struck by the stomp.
AirStompSwitchesTeam false Set this to true to have players switch to the hitting player's team when struck by the air stomp.
KickSwitchesTeam false Set this to true to have players switch to the hitting player's team when struck by kick.
PunchSwitchesTeam false Set this to true to have players switch to the hitting player's team when struck by punch.
SlideSwitchesTeam false Set this to true to have players switch to the hitting player's team when struck by slide.
GameOverWhenLastOnTeam false This triggers the game over when there is only one person left on a team.
ShuffleTeams false Set this to true to shuffle teams at the start of every match.
BallSticksToLastPlayerWhoHit false Set this to true to have balls follow players when they get hit.
BallUnSticksToLastPlayerWhoHit true Set this to true to have balls be lost when a player is struck.
BallsStolenOnPlayerHit true Set this to true to have a player steal another player's balls when they strike them.
BallUnstuckWhenPlayerIsHit true Set this to true to have ball unstick from a player when that player is struck.
BallStuckPlayerSpeedModifier 0.6 This controls how fast a player is when balls are following them. It is applied recursively, so a player with more balls will always run slower.
BallUnstuckWhenPlayerAttacks true Set this to true to have balls unstick from a player when they attack and don't hit anything.
PlayerRunsIntoWall true Set this to false to have players never run into walls and get stunned.
PlayerAirJumps 0 Set this to the number of jumps that a player can perform while in the air before needing to touch the ground.
PlayerJumpModifier 1.0 Set this to how high a player can jump. A higher number means a higher jump.
ExtraBallBounce false Set this to true to have the ball bounce much more.
LessBallBounce false Set this to true to have the ball bounce much less.
LeftBots false Set this to have a minimum count for the left side. This will spawn bots to reach the 'LeftBots' number, so if you have a number of bots set to 2 and a player joins that side, it will only spawn 1 bot.
RightBots false Set this to have a minimum count for the right side. This will spawn bots to reach the 'LeftBots' number, so if you have a number of bots set to 2 and a player joins that side, it will only spawn 1 bot.

Troubleshooting

This section contains basic helpful tips on how to troubleshoot connection issues.

  • Other people cannot connect to my game.
    • Make sure that port forwarding is setup properly and that the 'Test Connectivity' button in the game creation menu gives you a positive result.
    • If this is happening right after an update, make sure you delete your old server files and redo the setup.
  • People can join my game, but my ping is always ? in the gamebrowser.
    • Make sure that the beacon port is also forwarded. By default this is 7787.
  • People cannot join my password protected game even when they have the right password.
    • Make sure there aren't any non-ascii characters in your password.
  • I can't find my local IP address, help.
    • Follow the instructions in the 'Finding your IP' section above.
  • Port forwarding is too hard to setup, I give up.
    • We give up too. This is why we host dedicated servers for everyone to play on.
  • My game performance suffers while I am hosting.
    • Try hosting a dedicated server and joining that instead of hosting via your client.
  • My dedicated server isn't being listed in the game browser
    • Make sure that the 'PubliclyListed' option is true in your server config.
    • Check that your server key is valid. Re-download it and restart your server.
    • Make sure your dedicated server is the latest version. When in the game browser if your server shows up only when you click 'Show Incompatible Games' then this is the case. Redownload and reconfigure your server.
  • My dedicated server shows up, but its in 'LV_Server' and I cannot join!
    • This may happen if your server_setup.json is corrupted and doesn't have a level selected. In this case re-configure your server and try a different map (if you picked map 3, try map 1).