Thread: [435] RuneJS - An open-source RuneScape game server written in TypeScript & ES6

Page 2 of 7 FirstFirst 1234 ... LastLast
Results 11 to 20 of 67
  1. #11 Equipment! 
    Registered Member
    TheBlackParade's Avatar
    Join Date
    Dec 2019
    Posts
    36
    Thanks given
    42
    Thanks received
    37
    Rep Power
    105
    Just completed support for item equipping and equipment in general. This includes:

    • Ability to equip items defined in item metadata (item-data.json file)
    • Ability to unequip items
    • Two handed weapon support
    • Item bonuses that reflect on the equipment screen


    The pull request and code for this system can be found here: [Only registered and activated users can see links. ]

    Equipment:



    Equipment with bonuses:

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. Thankful users:


  3. #12  
    Registered Member
    TheBlackParade's Avatar
    Join Date
    Dec 2019
    Posts
    36
    Thanks given
    42
    Thanks received
    37
    Rep Power
    105
    Ran a couple tests today around player updating. Found a few issues and fixed them up. Also created a command line param for spawning around 80 fake bot players that all walk around at random to test performance. Everything looked and ran well, though this was only 80 players as I don't yet have a system for chunking out large amounts of players for player updating... That said, all of these fake players go through the same processing as a real player would, minus packets being sent and received from a game client.

    These changes were pushed up to master. To spawn the fake players, either run "npm start -- --fakePlayers" or "npm run fake-players". The game server will start up and automatically spawn 80 random bot players in the Lumbridge castle.



    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. Thankful user:


  5. #13  
    Chemist

    Advocatus's Avatar
    Join Date
    Dec 2009
    Age
    28
    Posts
    2,549
    Thanks given
    192
    Thanks received
    761
    Discord
    View profile
    Rep Power
    1332
    Cool start so far. Glad to see some divergence/experimentation into other languages.

    I had done a prototype with basic login 5-10 years back with js/node when v8 was being hyped. Ultimately realized that I hated writing js almost as much as I hated php and never bothered thinking about how I would flesh out the design.

    This is actually pretty damn cool. A lot of parts/aspects of the design remind me very strongly of hyperion.
    Quote Originally Posted by blakeman8192 View Post
    Quitting is the only true failure.
    Reply With Quote  
     

  6. Thankful user:


  7. #14  
    Community Veteran

    Jake_'s Avatar
    Join Date
    Apr 2007
    Age
    28
    Posts
    2,048
    Thanks given
    18
    Thanks received
    80
    Discord
    View profile
    Rep Power
    253
    I was considering pursuing this in the past so I'm interested to see your progress, good luck.

    I've always wondered if the node runtime would be fast enough for this kind of CPU intense load. In your last performance test how long on average did it take to complete a game cycle?
    Reply With Quote  
     

  8. Thankful user:


  9. #15  
    Registered Member
    TheBlackParade's Avatar
    Join Date
    Dec 2019
    Posts
    36
    Thanks given
    42
    Thanks received
    37
    Rep Power
    105
    Quote Originally Posted by Advocatus View Post
    Cool start so far. Glad to see some divergence/experimentation into other languages.

    I had done a prototype with basic login 5-10 years back with js/node when v8 was being hyped. Ultimately realized that I hated writing js almost as much as I hated php and never bothered thinking about how I would flesh out the design.

    This is actually pretty damn cool. A lot of parts/aspects of the design remind me very strongly of hyperion.
    Thank you! I got a lot of inspiration from Hyperion actually. I used it a lot when it first came out, so perhaps that has given me a certain style of writing things lol.


    Quote Originally Posted by Jake_ View Post
    I was considering pursuing this in the past so I'm interested to see your progress, good luck.

    I've always wondered if the node runtime would be fast enough for this kind of CPU intense load. In your last performance test how long on average did it take to complete a game cycle?
    I didn't do any actual benchmarks for this first test, just wanted to see how the server handled 80 or so players in one place moving around - also to fix any issues with player updating, of which there were a couple. Unfortunately I can only do about 80 right now since I don't have a system for chunking players for player updating just yet... So it'd crash any client I log in on. That said, I suppose I could spawn a bunch and just see how the server performs without logging in myself on another player... I may try that.

    I'll get some benchmarks up soon though!

    EDIT:

    Here's some quick and dirty trial runs of just bots walking around Lumbridge:

    Spoiler for 100 Players:

    [2019-12-31T12:20:46]: World tick completed in 998.8009999990463 microseconds.
    [2019-12-31T12:20:46]: World tick completed in 206 microseconds.
    [2019-12-31T12:20:47]: World tick completed in 599.1000000238419 microseconds.
    [2019-12-31T12:20:48]: World tick completed in 1001.7999999523163 microseconds.
    [2019-12-31T12:20:48]: World tick completed in 329.79900002479553 microseconds.
    [2019-12-31T12:20:49]: World tick completed in 305 microseconds.
    [2019-12-31T12:20:49]: World tick completed in 264.5 microseconds.
    [2019-12-31T12:20:50]: World tick completed in 271 microseconds.
    [2019-12-31T12:20:51]: World tick completed in 309.7000000476837 microseconds.
    [2019-12-31T12:20:51]: World tick completed in 258.10000002384186 microseconds.
    [2019-12-31T12:20:52]: World tick completed in 272 microseconds.
    [2019-12-31T12:20:52]: World tick completed in 255.70000004768372 microseconds.
    [2019-12-31T12:20:53]: World tick completed in 252.70099997520447 microseconds.
    [2019-12-31T12:20:54]: World tick completed in 253.30099999904633 microseconds.
    [2019-12-31T12:20:54]: World tick completed in 246.79899990558624 microseconds.



    Spoiler for 1000 Players:

    [2019-12-31T12:20:11]: World tick completed in 3566.899999976158 microseconds.
    [2019-12-31T12:20:11]: World tick completed in 1827.900999903679 microseconds.
    [2019-12-31T12:20:12]: World tick completed in 1560.5 microseconds.
    [2019-12-31T12:20:12]: World tick completed in 6556.201000094414 microseconds.
    [2019-12-31T12:20:13]: World tick completed in 1359.3000000715256 microseconds.
    [2019-12-31T12:20:14]: World tick completed in 3147.399999976158 microseconds.
    [2019-12-31T12:20:14]: World tick completed in 1146.8999999761581 microseconds.
    [2019-12-31T12:20:15]: World tick completed in 1104.2999999523163 microseconds.
    [2019-12-31T12:20:15]: World tick completed in 2100.598999977112 microseconds.
    [2019-12-31T12:20:16]: World tick completed in 788.3999999761581 microseconds.
    [2019-12-31T12:20:17]: World tick completed in 820.7990000247955 microseconds.
    [2019-12-31T12:20:17]: World tick completed in 1008.7009999752045 microseconds.
    [2019-12-31T12:20:18]: World tick completed in 1892 microseconds.
    [2019-12-31T12:20:18]: World tick completed in 3242.2000000476837 microseconds.
    [2019-12-31T12:20:19]: World tick completed in 889.8999999761581 microseconds.
    [2019-12-31T12:20:20]: World tick completed in 719.6999999284744 microseconds.
    [2019-12-31T12:20:20]: World tick completed in 729.1990000009537 microseconds.
    [2019-12-31T12:20:21]: World tick completed in 707.2000000476837 microseconds.
    [2019-12-31T12:20:21]: World tick completed in 771.3999999761581 microseconds.
    [2019-12-31T12:20:22]: World tick completed in 724.6000000238419 microseconds.
    [2019-12-31T12:20:23]: World tick completed in 807.8000000715256 microseconds.
    [2019-12-31T12:20:23]: World tick completed in 1203.3999999761581 microseconds.
    [2019-12-31T12:20:24]: World tick completed in 693.1000000238419 microseconds.
    [2019-12-31T12:20:24]: World tick completed in 757.8999999761581 microseconds.
    [2019-12-31T12:20:25]: World tick completed in 997.6000000238419 microseconds.
    [2019-12-31T12:20:26]: World tick completed in 2218.00100004673 microseconds.
    [2019-12-31T12:20:26]: World tick completed in 634.1999999284744 microseconds.
    [2019-12-31T12:20:27]: World tick completed in 2549.398999929428 microseconds.
    [2019-12-31T12:20:27]: World tick completed in 2316.9990000724792 microseconds.
    [2019-12-31T12:20:28]: World tick completed in 2309.899999976158 microseconds.
    [2019-12-31T12:20:29]: World tick completed in 1910.5 microseconds.
    [2019-12-31T12:20:29]: World tick completed in 2831.100000023842 microseconds.
    [2019-12-31T12:20:30]: World tick completed in 2130.899999976158 microseconds.
    [2019-12-31T12:20:30]: World tick completed in 3034.6990000009537 microseconds.
    [2019-12-31T12:20:31]: World tick completed in 2601.5009999275208 microseconds.
    [2019-12-31T12:20:32]: World tick completed in 2092.398999929428 microseconds.
    [2019-12-31T12:20:32]: World tick completed in 2781.901000022888 microseconds.
    [2019-12-31T12:20:33]: World tick completed in 3256.6009999513626 microseconds.


    Keep in mind that this does not include player updating for any of these players, but it DOES include them walking randomly and path validation for EVERY player.

    EDIT 2: Did a tiny bit of work towards chunking the addition of new players... They all walk around and send their updates like they should. Got up to 250 in a region here:

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #16  
    Registered Member
    TheBlackParade's Avatar
    Join Date
    Dec 2019
    Posts
    36
    Thanks given
    42
    Thanks received
    37
    Rep Power
    105
    Those little benchmarks got me in the mood to go ahead and better flesh out how player updating handles large amounts of players. With today's changes it will now:

    • Load 80 new players at a time (per game cycle)
    • Run updating on a maximum of 255 players
    • Prioritize the players closest to the player in question when adding new players


    All of this is up on the master branch if anyone wants to take a look.

    A picture of a player loading into an area with 1000 players, showing it having loaded the closest 255 players:




    Now a shot of the player walking towards the graveyard in Lumbridge where there are more players, rendering them in when it is able:




    A final shot after having let the bot players walk around randomly and spread out for a little while:

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  11. Thankful users:


  12. #17  
    Extreme Donator

    Patrity's Avatar
    Join Date
    Jul 2008
    Age
    28
    Posts
    937
    Thanks given
    173
    Thanks received
    306
    Discord
    View profile
    Rep Power
    882
    This is pretty impressive man! Keep the progress coming!
    Free map releases: [Only registered and activated users can see links. ]



    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  13. Thankful user:


  14. #18  
    Infinite in Mystery.

    Join Date
    Jul 2012
    Posts
    130
    Thanks given
    18
    Thanks received
    17
    Rep Power
    12
    I'd love to help out a little, could you maybe create a slack server for development?
    Reply With Quote  
     

  15. Thankful user:


  16. #19  
    Registered Member
    TheBlackParade's Avatar
    Join Date
    Dec 2019
    Posts
    36
    Thanks given
    42
    Thanks received
    37
    Rep Power
    105
    Quote Originally Posted by Patrity View Post
    This is pretty impressive man! Keep the progress coming!
    Thank you! Just published a second "release" today, 0.2.0

    Quote Originally Posted by Licker View Post
    I'd love to help out a little, could you maybe create a slack server for development?
    Hadn't really considered that yet honestly, seems a bit early for that level of thing. I do have a Discord though if you'd like to communicate. That said the project is open source on github so you're free to fork and submit PRs. I may or may not accept them depending on what I'm planning for whatever the feature is, but right now I don't have a lot of plans honestly haha.


    Anyways, I just published v0.2.0 on Github: [Only registered and activated users can see links. ]

    The release has some release notes on it, and you can find everything in it on my Kanban Board in the "Released" column here: [Only registered and activated users can see links. ]

    But for those not wanting to go over there to see, here's a list of things done since the initial 0.1.0 tag:

    • Implemented an item configuration system; issue #1, commits 2ca93b9 & cc1fb09
    • Added support for item swapping within a player's inventory; issue #20, commit 2b21c92
    • Added REST endpoints for retrieving specific item info and updating specific item info; commit 902dc16
    • Implemented support for player equipment with updating; issue #2, commit 3b77315
    • Modified player updating to send a player's current face direction when registering them; commit 1a3f8b2
    • Support for player input commands; issue #11, commit 96a54b1
    • Modified player updating to prioritize nearest players first; commit 328d17e
    • Made player game client settings save and load on login and logout respectively; issue #3, commit 3a74085
    • Implemented the ability for players to toggle run mode, issue #4, commit 3a74085
    • Implemented basic support for Non-Player Characters - NPC updating, spawns via a YAML config file, random movement with clipping, and definition reading from the game cache; issue #24, commit aa96ab6
    • Restructured many packages and imports to be better readable and easier to navigate; commit 7b1bfb1
    • Removed concept VueJS UI from project in favor of the control-panel package; commit 5650b5e


    And finally a few pictures:
    Spoiler for Media!:






    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  17. Thankful user:


  18. #20  
    Community Veteran

    Jake_'s Avatar
    Join Date
    Apr 2007
    Age
    28
    Posts
    2,048
    Thanks given
    18
    Thanks received
    80
    Discord
    View profile
    Rep Power
    253
    Quote Originally Posted by TheBlackParade View Post
    I'll get some benchmarks up soon though!


    Outstanding!

    I love JavaScript, I'll keep an eye on this for sure

    If you share your discord server I'll join too, I'm a little busy but I'd like to contribute
    Reply With Quote  
     

Page 2 of 7 FirstFirst 1234 ... LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 1
    Last Post: 12-06-2011, 09:30 PM
  2. Replies: 5
    Last Post: 09-28-2011, 06:39 AM
  3. Replies: 38
    Last Post: 09-01-2009, 10:02 PM
  4. PyWorld - Runescape server written in Python
    By w::v::d in forum Projects
    Replies: 15
    Last Post: 08-10-2009, 11:25 PM
  5. Replies: 8
    Last Post: 04-27-2008, 05:41 AM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •