Skip to content

2004Scape/ServerOld

 
 

Repository files navigation

2004scape Server

Website | Discord | Rune-Server

disclaimer: All server code has been written from scratch for this project, Jagex has never had any source code leaks.

status: in-development, not ready for players. Contributors are welcome to help out.


This project aims to replicate an authentic RuneScape experience from May 2004. It should be considered an emulator first and foremost, as replicating behaviors by emulating the underlying systems is the biggest focus. The config system and scripting system is as close to authentic as we understand it, and is continually refined as we learn more info.


To Jagex: This project comes out of love for the game. As MMOs age, their previous versions are lost to history. An experience becomes ephemeral and time-limited. We're aware that you have no backups for this era and so we're putting in the effort to recreate what we can.
It won't ever profit off your trademarks. Without this project, this version of the game only lives in our memories. Screenshots and videos are scarce, and the original data is lost to time. This is no easy task.

To players: So happy to have you interested! RuneScape 2 launched on March 29, 2004. We have no copies of that revision, but we do have some client caches from May 2004. This project emulates May 18, 2004, which was live until June 1 of that year. It has Treasure Trails and Big Chompy Bird Hunting. The next revision after this added Elemental Workshop I.

Getting Started

  1. Download this repo to your computer
  2. Install our list of dependencies
  3. Create a .env file by copying the file .env.example to be called .env
  4. Open the folder you downloaded in a command prompt
  5. Run npm ci, this installs necessary packages
  6. Run npm run build, this creates the client and server cache the first time
  7. Run npm start

Now open http:https://localhost in your browser and play!

Using the setup script

You can instead run setup.sh to get your repository ready for running the server. Manually download RuneScriptCompiler.jar, from environment dependencies, and then run setup.sh to run the above commands.

Using the DevContainer

An alternative way to set up your environment is to utilize a Development Container. In order to start the Dev Container, you'll need to install Docker. If you're running Windows, I suggest getting Docker Desktop. Linux users can use whatever means they prefer to install Docker. Once docker is installed, install the VSCode extension Dev Containers.

Make sure to still grab the RuneScriptCompiler.jar from the environment dependencies as that can't be automatically installed yet.

Once that is done follow these steps:

  1. Make sure Docker is running
  2. Open VSCode and run Dev Containers: Clone Repository in Container Volume
  3. Select GitHub as the remote Source
  4. Find your fork of this repo
  5. Select the branch you want to work from
  6. At any point once the container has started and you can see the files in VSCode, drag the RuneScriptCompiler.jar into the root of your repo
  7. Once the startup script is finished, run npm start

Once the container starts, it automatically starts running setup.sh. You can cancel this and do the Getting Started steps manually as well. If you let the startup script finish before moving RuneScriptCompiler.jar into the root of your repo and the script fails, you just need to run npm run server:build again before starting your server.

Another option for building your Dev Container is to instead clone your repository onto your local machine first and then run Dev Containers: Open Folder in Container and work that way by mounting the local files into your container. This way, you can have RuneScriptCompiler.jar in your workspace from the get-go. Note: The npm scripts are much slower when the container is running this way.

Environment Dependencies

Java is required for RuneScriptCompiler.jar, our content language compiler.

You can download RuneScriptCompiler from the #dev-resources Discord channel. Place the jar file in the root directory of the project.

RuneScriptCompiler is not yet open-source, sorry for any inconvenience.

Development Workflow

Content developers (likely you!) can run npm start to start the server. This will watch for changes to the config and script files as well as automatically rebuild them.

Engine developers can run npm run dev to start the server. This does what npm start does above, but also restarts the world when any TypeScript code has changed.

Running tests

We use vitest for unit tests.

  • You can run the tests with npm test.

Test files should be colocated with the source files, i.e. src/foo.ts should have a test file src/foo.test.ts.

Running linter

We use eslint for linting this project.

  • You can run the linter with npm run lint.
  • To run the eslint auto-fixer, you can use npm run lint -- --fix.

It's recommended to install a suitable plugin/extension for your IDE, to show you lint results inline.

Please aim to avoid warnings! They are rules that we eventually want to switch to errors.

Configuration for the linter can be found in .eslintrc.cjs.

Credits

Thanks to all the current contributors, every PR you submit gets us closer and closer to feature completeness.

Thanks to these indirect or external contributors

  • Kris: for all your help theorycrafting and testing, and to his sources as well for teaching him
  • Walied: for your work on understanding the client assets (worked on cache formats)
  • Dane: for your work on understanding the client (worked on client refactors)

If anyone is not listed here, whether that's intentional to remain anonymous or an oversight, thank you for your help.
This type of project has been a long time coming and I hope to see the trend continue.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • EJS 54.3%
  • TypeScript 41.3%
  • JavaScript 4.4%