Code Monkey home page Code Monkey logo

runejs / server Goto Github PK

View Code? Open in Web Editor NEW
225.0 7.0 82.0 62.49 MB

RuneJS is a RuneScape game server written in TypeScript and JavaScript. The goal of the project is to create a comprehensive game engine, while also providing simple and easy to use content development systems and APIs.

License: GNU General Public License v3.0

TypeScript 99.87% JavaScript 0.11% Dockerfile 0.02%
typescript javascript runescape runescape-server-emulator nodejs game-server runescape-377 runescape-api game-cache runescape-435

server's People

Contributors

clementop avatar dennismartinez avatar dependabot[bot] avatar displee avatar gruckion avatar hallowatcher avatar hc747 avatar heraticassassin avatar jameshallam93 avatar jameskmonger avatar justjay-dev avatar katilith avatar markbmullins avatar muxeproject avatar nicknick-io avatar openrs2gpe avatar promises avatar redsparr0w avatar ryanpannell avatar schauwem avatar shadowzauu avatar src52 avatar theblackparade avatar twistt avatar tynarus avatar willughandled 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  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  avatar  avatar

server's Issues

Item equipping w/ player equipment updating

Add the ability to equip items and enhance player updating to show a player's equipped items. The player's equipment stats should also update to reflect their equipped items.

Players should be able to:

  • Equip items based off of the additional item metadata story #1 (which this is dependent upon)
  • See their equipped items on their character
  • See other player's equipped items
  • See their updated equipment bonuses

Save/load player settings

Add the ability to save and load a player's chosen client settings via the JSON player save/load system.

The player should:

  • Be able to select their settings
  • Have their settings save upon logout
  • Have their saved settings load when logging in

Emote animations tab

Implement all animations within the emote animations tab

Also include a system for displaying and saving emotes that require unlocking.

Hint indicators

Players should be able to be given hint indicators during quests, tutorials, or any other action that can identify which object, NPC, or player they are meant to be interacting with.

Hint icons should be able to be shown for:

  1. Location objects (world objects, ie a door or tree)
  2. NPCs
  3. Other Players

Unify exception handling.

Instead of adding a catch clause similar to:
catch(error => console.log(error));
to the end of each promise, I propose we should export a few generic (and re-useable) exception handlers so that changes to exception handling behaviour can be applied consistently.

Update server

Implement a full cache-file update server so that the game cache does not need to be included manually inside the 435 client

[ENGINE] Friends List & Ignore List

A/C

Players should be able to view a list of their personally saved friends, as well as a list of players they have chosen to ignore. Players can message other players via the Friends list, as well as see their online status and active game world.

Friends list

  • Friends list should show friend's online status, dependent upon their active privacy settings
  • Friends list should show a friend as offline if they are not online
  • Friends list should show which world the player is logged in to
  • Players should be able to send messages to their online friends via the Friends list
  • Players should be able to receive messages from other players depending on their privacy settings
  • Players can add other players to their Friends list
  • Players can remove names from their Friends list
  • The player's Friends list saves and loads with their character

Ignore list

  • Players should not see messages from users on their Ignore list
  • Players can add other players to their Ignore list
  • Players can remove names from their Ignore list
  • The player's Ignore list saves and loads with their character

Privacy settings

  • Players can modify their privacy settings
  • Privacy setting modifications send out updates about the Player's online status if set to "Friends" or "Off"
  • Privacy settings save and load with the player's character

Create login server package/project

Split out login and authentication into a separate project and runnable service. rune-js/server can import this as a devDependency and run it alongside the main game server.

Stack traces

errors currently just print a general idea of what happened, not where and what caused it. We should have proper stack traces to find where and what caused it

Private, group, and global world instances

  • Players should be able to have their own private game instance, including their own personal game objects, NPCs, and world items.
    • Players should not be able to see actions of other players in their private instance.
    • Other players should not be able to see the actions of this player in their private instance.
  • Players should be able to join a group instance where they share the aforementioned resources - game objects, NPCs, and world items.
    • Players outside of this group instance should not be able to see the actions of those within.
    • Vise versa for those inside in instance.
  • The game world should have a global instance that applies to all players and NPCs that are not assigned to a specific instance (they are not in private gameplay of any kind).
    • This is a game instance shared by everyone within the world that is not in a private instance.
    • All world items, objects, NPCsc, etc are visible to everyone inside the global instance.
  • The global instance and private instances can not be engaged at the same time. The player must be either in the global instance or a specific instance - whether that be a group or private instance.
  • Friends list status is independent of instances - a player is shown as online regardless of which instance type they are logged into.

moveWidgetChild causes the item on widget to disappear when a negative number is used for the Y axis offset

Calling moveWidgetChild with a negative offset on the Y axis looks to be making the item on the widget disappear.

Here's a sample plugin which uses itemSelectionAction to ask the user for input, which calls moveWidgetChild internally.

import { itemOnItemAction } from '@server/world/actor/player/action/item-on-item-action';
import { itemSelectionAction } from '@server/world/actor/player/action/item-selection-action';
import { RunePlugin, ActionType } from '@server/plugins/plugin';

const action: itemOnItemAction = ({ player }) => {
    itemSelectionAction(player, 'COOKING', [
        { itemId: 377, itemName: 'Raw Lobster', offset: -12 }
    ]);
};

export default new RunePlugin([
    {
        type: ActionType.ITEM_ON_ITEM_ACTION,
        items: [{ item1: 377, item2: 377 }],
        action
    }
]);

Change offset: -12 to a positive number and the item reappears.

You can use raw lobster on another raw lobster to bring up the interface in the sample plugin. ::item 377 2

Error decoding client data

[1] Error decoding client data
[1] TypeError: this[methodName] is not a function
[1] at ByteBuffer.put (server\node_modules@runejs\byte-buffer\src\byte-buffer.ts:95:29)
[1] at LoginHandshakeParser.parse (server\src\net\data-parser\login-handshake-parser.ts:21:26)
[1] at ClientConnection.parseIncomingData (server\src\net\client-connection.ts:51:33)
[1] at Socket.socket.on.data (server\src\game-server.ts:110:38)
[1] at Socket.emit (events.js:189:13)
[1] at addChunk (_stream_readable.js:284:12)
[1] at readableAddChunk (_stream_readable.js:265:11)
[1] at Socket.Readable.push (_stream_readable.js:220:10)
[1] at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

I'm using "refactored-client-435" to connect.

Move the RsBuffer class to it's own NPM package

Need to move the RsBuffer class to it's own NPM package and update both this project and the cache-parser project.

Perhaps a Rune.JS util package? Could include the logger so that we don't end up with a ton of different packages.

Player command handling

Action handler for player input commands.

  • pos current position command
  • move move current position command
  • give give item command

Create item additional metadata system

Create an additional metadata system for game items.

Metadata should include:

  • Item id
  • Item identifier (name, perhaps?)
  • Shop prices
  • Tradeable boolean
  • Quest item boolean
  • Item equipment slot
  • Equipment bonuses (attack/defence/skill)
  • Item weight
  • High alch value
  • Low alch value

[ENGINE] Item requirements

Items currently don't have any requirements to be used or equiped.

The following should be implemented:

  • Check for quest completion or partial completion when trying to use or equip an item
  • Check skill level when trying to use or equip an item
  • Check if certain minigames are completed, such as Mage Arena, when trying to use or equip an item

Ability to run

Add the ability for players to toggle between running and walking, and have them actually run. This will be a small modification within the WalkingQueue and player settings. Since this is a player setting, this story is dependent upon #3.

The player should:

  • Be able to toggle on run mode and run.
  • Be able to toggle off run mode and resume walking.

Game Interface system V2

Widget system needs revamped to support all possible functionality.

  • Multiple widgets at once (of differing types)
  • Walkable widgets
  • Different widget behaviors
  • Queueable widgets - for showing widgets after the current one has been closed
  • Server-side widget configurations? For containers and such

Private, group, and global Instances

  • Players should be able to have their own private game instance, including their own personal game objects, NPCs, and world items.
    • Players should not be able to see actions of other players in their private instance.
    • Other players should not be able to see the actions of this player in their private instance.
  • Players should be able to join a group instance where they share the aforementioned resources - game objects, NPCs, and world items.
    • Players outside of this group instance should not be able to see the actions of those within.
    • Vise versa for those inside in instance.
  • The game world should have a global instance that applies to all players and NPCs that are not assigned to a specific instance (they are not in private gameplay of any kind).
    • This is a game instance shared by everyone within the world that is not in a private instance.
    • All world items, objects, NPCsc, etc are visible to everyone inside the global instance.
  • The global instance and private instances can not be engaged at the same time. The player must be either in the global instance or a specific instance - whether that be a group or private instance.
  • Friends list status is independent of instances - a player is shown as online regardless of which instance type they are logged into.

[ENGINE] Unit testing

Implement basic unit test handling via either Jasmine or Jest. Tests do not need to be comprehensive at this time.

TODO list

This seems like an interesting project and I would like to contribute. Is there a list of things that need to be worked on?

Experience rates

there should be one or more globals for experience rate, maybe set in the config yaml.

either one for all skills or every skill seperated?

Queued widgets

Handle queue-able widgets so that widgets can be opened one after the others

Example:
Quest complete screen should show, then level-up widgets and sounds should play after it is closed.

Support NPCs

Support non-player characters within the game world:

  • Basic support for an NPC within the world
  • NPC spawn yaml config file w/ reading and loading into the world
  • NPC definition data read from the cache (exists in the cache-parser package)
  • Basic NPC updating
  • Basic NPC movement (random w/ updating)
  • World chunk and player tracking of NPCs

Npcs that do stuff randomly

Some npcs such as cows, sheep and the stray dog in varrock sometimes do or say things.

this could be handled in general with an option to let npcs say something sometimes.

or with plugins that can hook into a update loop for the npcs, this could allow a lot more to be done in the future.

Reloading configs

when we use the "plugins" command, could we maybe reload world/config and world/skill-util

World item spawn config

Game items should be able to be spawned in any desired location around the game world as a physical world entity.

Acceptance Criteria

  • Game items should be able to be spawned within the game world at any specific coordinate
  • Spawned items should be configurable to respawn after a certain amount of time, or not respawn at all
  • Configurable items should be able to be spawned in the global instance or a player's local instance
    • Items spawned in a player's instance are specific to that player
  • Item amount should be able to be specified for stackable items
  • Allow additional item metadata (same system used in NPC and Item configs)

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.