Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. iron
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    iron

    @iron

    5
    Posts
    1843
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    iron Follow

    Posts made by iron

    • Installing a usable private screeps server on Raspberry Pi.

      Recently there was a patch that reduced tick degradation in servers without mongodb.

      I've ran this for a few solid days on a Raspberry Pi 2 and am getting 1 tick per second, you could possibly get more on a Raspberry Pi 3 but obviously it depends on how intensive the scripts running are, and how many users are going to be on.

      Anyway, here's how I set it up for those who want to try:

      sudo apt-get update && sudo apt-get upgrade
      sudo apt-get install -y npm build-essential tcl git nodejs g++
      #if npm -v returns version < 8 do "curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -"
      sudo npm i -g npm
      sudo nano /etc/dphys-swapfile
      # set CONF_SWAPSIZE = 1000, feel free to set it back after npm install screeps
      sudo sudo /etc/init.d/dphys-swapfile restart
      sudo adduser --disabled-password --gecos "" screeps
      sudo su screeps
      mkdir ~/screeps-server
      cd ~/screeps-server
      npm install isolated-vm
      npm install screeps
      # install any mods, auth, admin-utils, screepsmod-features # manual tick-rate is now part of admin-utils
      npx screeps init
      npx screeps start
      ^C # Control + C to quit screeps
      exit # this just exits the screeps user
      sudo nano /etc/systemd/system/screeps-server.service
      # Copy this into the file
          [Unit]
          Description=Screeps Server (world)
          Wants=network-online.target
          After=network-online.target
      
          [Service]
          Type=simple
          WorkingDirectory=/home/screeps/screeps-server
          ExecStart=/home/screeps/world/node_modules/screeps/bin/screeps.js start
          User=screeps
          Group=screeps
      
          [Install]
          WantedBy=multi-user.target
      sudo systemctl daemon-reload
      sudo systemctl start screeps-server
      

      Additional things to do while the screeps server is running:

      sudo su screeps
      cd ~/screeps-server
      npx screeps cli
      # wait for cli to load
      setTickRate(1000)
      

      Also, delete all the bots unless you need them.

      This should give you a server that can handle 2~3 players without becoming incredibly slow.

      A few notes:

      • Use a reasonable power supply, a weak PSU will cause the pi to reset if it gets under load... and possibly corrupt everything in the process.
      • Remember to back up your world a few times before killing the server and set routine backups.
      • I haven't tried this with CPU intensive scripts, it may suffer if you have a few users running intense scripts every tick.
      posted in Private servers
      iron
    • RE: I am holy because i code.

      Thanks very much, I'll take a look at that and see if it helps me recognize what others are doing.

      posted in General Discussion
      iron
    • RE: Pi server setup

      You can build on a pi if you change the pagefile size, that way it has enough space to build.

      change the option CONF_SWAPSIZE in /etc/dphys-swapfile to something higher.

      I set it to 1gb then once the build completed, I changed it back so I didn't shred my partition.

      https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian/

      You can also run a private server for yourself on a reasonable home computer... I do some testing here and there on a local screeps server running on the Win10 machine I am using.

      That, or buy a reasonable server for cheap on ebay?

      posted in Private servers
      iron
    • RE: I am holy because i code.

      Any chance you could point out some ways to spot bots?

      I'm fairly new to the game, writing my own stuff and learning as I go.

      Just wondered if there was any tell-tale signs that show a difference between botters and multiboxers?

      I've seen a few people where it looks like either a small group of people playing together, or a multiboxer... but other than the signs saying "Hi, I run a bot"... everybody just seems to be doing their own thing.

      posted in General Discussion
      iron
    • RE: Pi server setup

      I've managed to get this working on a pi3b+, it really didn't work very well I'm afraid.

      I can connect, I can upload a script and it will run fine for a short while before hanging.

      Perhpaps it could be optimized, installing MongoDB or something... but honestly I just think the pi couldn't handle it.

      I believe I may still have a pi image with screeps installed, that'll include the bash history and things to help out.

      posted in Private servers
      iron