Giter Site home page Giter Site logo

mamjun / faster_dst Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cn-dst-developer/faster_dst

0.0 0.0 0.0 271 KB

替换引擎为LuaJIT,仅支持linux

License: Apache License 2.0

Shell 0.63% C++ 2.01% C 57.18% Lua 1.50% CSS 0.09% Makefile 1.51% HTML 35.92% Batchfile 0.13% Dockerfile 0.13% Roff 0.91%

faster_dst's Introduction

Faster_DST

Description

This is a third-party patch that replaces the lua engine of the DST linux server with luajit to improve performance. The idea of adoption is similar to paintdream's DontStarveLuaJIT

Install

Use our pre-build docker image

Here is a simple docker-compose.

version: "3"
services:
  DST_DediServer_LUAJIT:
    container_name: dst_server_luajit
    # the image used here is not the same with https://github.com/CN-DST-DEVELOPER/DediServer_Docker/pkgs/container/dediserver_docker
    image: ghcr.io/cn-dst-developer/faster_dst:latest
    ports:
      # [the port you allowed in for firewall]:[server_port from server.ini in your game save]
      - 10998:10998/udp
      - 10999:10999/udp
    volumes:
      # The path left should be modified to your game save directory, which is the parent directory of Cluster_1 normally
      - ~/dst/saves:/usr/steamapps/dst/saves
      # The path left should be modified to where you are going to save your mods, so you don't need redownload every mods while rebuild your game container. this line NOT REQUIRED
      - ~/dst/mods:/usr/steamapps/dst/dedicated_server/mods
      # The path left should be modified to where you are going to save your V2 mods, so you don't need redownload every mods while rebuild your game container. this line NOT REQUIRED
      - ~/dst/ugc_mods:/usr/steamapps/workshop/content/322330
    environment:
      # modify this to your game save name, it will be MyDediServer by default
      - CLUSTER_NAME=MyDediServer
    logging:
      options:
        max-size: 10m
        max-file: "3"

For further information please refer to the Readme at DediServer_Docker

Likely ghcr.io/cn-dst-developer/dediserver_docker has a DockerHub mirror at suv001/cn-dst-developer.dediserver_docker, there is also a mirror for this at suv001/cn-dst-developer.faster_dst

Install manually

NOTE: The common dependence on different Linux versions are usually different, the pre-build release may not work on your computer. So we strongly recommend you using the docker image which is pre-installed dontstarve_dedicated_server and this patch.

Download latest Release. Upload to your server and unpack. Go to the extracted folder and execute

sh ./setup.sh [dst_install_path] install

Replace [dst_install_path] to your install path of dst, the default path download using Steam is "/root/.steam/steam/SteamApps/common/Don't Starve Together Dedicated Server".

Use dontstarve_dedicated_server_nullrenderer_x64_luajit instead dontstarve_dedicated_server_nullrenderer_x64 in your start game script.

Uninstall

The install with docker can simplely be uninstalled by stop and remove the container "dst_server_luajit".

Otherwise, if this is installed manually, you can uninstall with this command in your extracted folder.

sh ./setup.sh [dst_install_path] uninstall

For Developers

All technical details has been published in TechnicalDetails.md (Chinese Only).

Compilation Yourself

Attention:

  • This project needs to be compiled with gcc-4.8.4, which you is the default compiler of Ubuntu 14.04 LTS. So you can import the apt source of Ubuntu 14.04 LTS and runapt install gcc-4.8.4.
  • Due to the use of git submodule to import some of dependencies, you need rungit submodule update --init --recursive to pull all submodule after clone this repository.
  • Compile and debug require the environment variableexport DST_PATH=[dst_install_path]/bin64
  • This was developed with VSCode. If you are using another dev-environment, please refer to the configuration file at./.vscode/launch.json

After clone the whole repository and all of the submodules, you can start complie by executing this command in project root folder:

make libpreload CFLAGS="-fPIC -shared -O2"
make luajit CFLAGS=-O2
make lua51

And then copy ./build/* to your [dst_install_path],run these command

export LD_PRELOAD=./libpreload.so
./dontstarve_dedicated_server_nullrenderer_x64

to start game with this patch.

Note

Feature about function entry search, function signature generation, signature matching are provide by FunctionLocater.

LICENSE

   Copyright 2023 Fengying <[email protected]>

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

	   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

faster_dst's People

Contributors

zxcvbnm3057 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.