Git Product home page Git Product logo

server's Introduction

2004Scape Server - May 18, 2004

Website | Discord | Rune-Server | Getting Started

status: alpha, in-development
Contributors are welcome to help out!

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

Mission Statement

Important

Our goal is to authentically, accurately, and precisely emulate old RuneScape to our best knowledge. There are countless hours behind adding and quadruple-checking every bit of logic that goes into this.

Caches and clients are sourced from old PCs that played the game at a given time. That gives us the original maps, models, and NPC / Item / Scenery configurations. Then we can unpack that data into a readable and workable format based on what we've been able to observe Jagex doing, as outsiders.

The server side (engine, quests, combat, skills) was not preserved and that's what we're recreating here. The engine takes a lot of effort and is not perfected, but you should consider it our best interpretation of behaviors we can measure.

We try to take very little liberties when it comes to guessing, our sources are era-videos, era-screenshots, and RS3/OSRS/RSC.

Our content language of choice is a recreation of RuneScript: this gives us the same limitations, and the opportunity to recreate bugs out of the same circumstances. We don't simply see a bug and add it as an edge case, we have the script and engine work together to reproduce the exact reasons behind the bug.

Getting Started

  1. Download this repo to your computer
  2. Install our list of dependencies
  3. Open the folder you downloaded in a command prompt
  4. Run npm start

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

Important

If you run into issues please see our common issues or hop in Discord.

Tip

Windows users: We have a script called quickstart.bat that will launch the server for you, combining steps 3 and 4 above.

Tip

Advanced users: You can customize your setup by copying the .env.example file to .env. This is not necessary for a simple localhost setup.

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.

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. 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.

Environment Dependencies

Tip

If you're using VS Code (recommended), we have an extension to install on the marketplace.

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.

Common Issues

  • bad option: --import
    You are using an older version of Node (maybe 18). We are targeting 20.6+

  • '"java"' is not recognized as an internal or external command
    You do not have Java 17 installed.

  • has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
    You are likely using Java 8 or Java 11. You can either reinstall Java 17 or become an advanced user, and set JAVA_PATH=path-to-java.exe in your .env file.

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.

server's People

Contributors

boogie-nights avatar burntmanta avatar cernodile avatar desetude avatar detaetious avatar ericbartusch avatar espionage724 avatar flenarntemp avatar frasergilbert avatar howspooky avatar indio3 avatar ipkpjersi avatar jameskmonger avatar joshua-f avatar lesleyrs avatar o-k-a-y avatar pazaz avatar puremana avatar stomponbabyheads avatar subby avatar tannerdino avatar thesuddensilent avatar toomykins avatar ultraviolet-jordan avatar unknownseal avatar vulprs avatar zeruth avatar zsrv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

server's Issues

New Varps Need To Be Moved To Unused Varps

The following varps were newely created instead of using an existing varp for server side only.

  • 295=skill_clock
  • 296=skill_anim
  • 297=skill_sound
  • 298=shop
  • 299=shop_buy
  • 300=shop_sell
  • 301=shop_haggle
  • 302=thread_used

Treasure trails needs to be rewritten to only use the following varp:

  • 292=ring_of_forging_charges_used

The following varps need to be removed from current treasure trails:

  • 275=trail_easy_steps_count
  • 276=trail_medium_steps_count
  • 277=trail_hard_steps_count
  • 278=trail_easy_steps_completed
  • 279=trail_medium_steps_completed
  • 280=trail_hard_steps_completed

Please refer to: https://github.com/2004scape/Server/wiki/Varp-ID-Tracking

Drawers in Make-over mage's house don't open

The Drawers have an Open action but nothing happens (no animation, no chatbox text).

The chatbox text in the screenshot is from Examine

screenshot-1721173850

May be all Drawers? Happens to the one in Seers' Village too:

screenshot-1721510130

Consider containerisation through Docker

The setup steps will be more simple and more easily guaranteed to work, plus it means that whatever version of Node/Java etc the user has installed locally (if at all) is irrelevant, and will be controlled through the image.

Considerations:

  • Multi-step Docker image can be used to have effectively a "runtime" build (slimmer) with a "dev" step attached to the end in order to handle hot reloading etc.

Pathfinder Speed

@ultraviolet-jordan notes that supporting a full 2k world won’t be ideal due to pf speed (note that in real world cases not every player is generating a path every tick). We’re not expecting more than double-digit players and local development, which runs without issue.

Napkin benchmark: 100k paths, 10 tiles away - ~3000ms in TS, ~434ms in reference Kotlin implementation.

I think we can figure out JS/TS-specific optimizations and/or move pathfinder to native code. Jagex did client-side pathfinding at the time and evaluated steps from those generated paths on the server instead.

add instructions for full stack setup

I can deploy and run in localhost and host across my network. But what settings do I need to deploy with a login server so that I can host a server on my lan with users having login and passwords ?
once I know what im doing I will add an update to the docker compose file

thanks

Character sometimes doesn't face rocks while mining

Sometimes when walking up to rocks to mine, my character faces the same direction I was walking and keeps that direction upon mining and continual mining (never rotates towards the rock)

On OSRS I recall sometimes having the mining animation start facing the walking direction if I was running to it, and then the character would rotate towards the rock upon mining it.

screenshot-1721268509

Spinning wheel can do it too:

screenshot-1721509945

And Ranges, but if I log-out facing that direction and use the Range immediately after log-in my character rotates towards it:

screenshot-1721538942

Music stops playing after a while

When using the in-browser client, music stops playing after a while:

  • Sometimes it stops looping after a while (choosing a new song and going back to Auto works)
  • Sometimes music (possibly all audio) stops working altogether (possibly main menu too); it comes back after a quick page refresh

inv Actions Need To Be Blocked When Currently Delayed

[opheld5,_]
if_close;
if (busy = true) return;
inv_dropslot(inv, coord, last_slot, 200);

uses if_close; which causes the entire script if currently active to drop.

    closeModal() {
        this.weakQueue = [];
        this.activeScript = null;

        if (this.modalState === 0) {
            return;
        }

example is going through the lumbridge toll gate and try to drop/wear/unwear/eat an item while currently delayed and going through the gate. this should be blocked from happening.

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.