Jump to content
RAGE Multiplayer Community

1.1: mp.game v2, EAC and more!


ragempdev
 Share

Recommended Posts

mp.game v2
mp.game v2 is the new game natives API that replaces mp.game (v1) and its related entity methods. It uses the newest V8 (JS engine) C++ to JS interopability methods to provide better performance, stability and memory usage.

Basically:
1) 2x faster native calls on average - even better performance for non-trivial calls (e.g., references, vectors and more). Some natives were reimplemented to achieve best performance for certain cases. In our benchmarks, mp.game v2 matches ScriptHookV (C++) performance (even beats it in some cases!) all thanks to internal optimizations and the new JS to C++ interop.
2) All legacy generator issues are fixed as well as improvements to argument validation to provide more information in a more convenient way.
3) Natives have been brought up to date. Old natives also received updates to keep them as backwards compatible as possible.
4) Game API has received improvements for better maintainability, can now be easily upgraded with minor RAGE Multiplayer releases.
5) TypeScript definitions are now generated alongside original game API code. Public release coming soon.

 

Game and API optimizations
Besides major performance improvements brought by mp.game v2, we've also fine tuned some other things.

* Fixed a major GTAV streaming issue where players on populated RAGE Multiplayer servers could have lag spikes when a lot of players (and/or peds) stream in at once
* Networking procotol has been improved for better bandwidth alongside protocol optimizations for high-latency connections
* Base entity methods and properties has been improved for better memory usage and performance
* Client-side mp.Pool API has been updated to be on par with the server-side API
* Client-side resource validation improvements - game resources will be validated faster, with less memory usage and without full decryption
* Client-side runtime resource reloading has been improved to be faster
* Improved client resources I/O performance, this one is more noticeable for HDD players

 

Normally, on an optimized gamemode these shouldn't noticeably improve average FPS but the lowest 1% (frame skips and stutters) during gamemode performance-intensive code execution - we've been reported with average FPS improvements on various servers as well, though.

 

EAC
EasyAntiCheat (part of EpicOnlineServices) has been embedded into the game launcher but not yet fully Implemented due to the upcoming Los Santos Tuners update (July 20th), at the moment it lacks full EOS integration and server-side API which is needed for EAC to function properly. We will make sure to deliver as soon as possible after the next GTAV update compatibility is ensured. Until then, we're just testing the EAC integrated launcher.


By the way, no worries - while EAC increases the launching time a bit, it doesn't affect in-game performance at all.

 

API
* Added: client-side mp.game.enableInvokeDebug (enables mp.game v2 strict type checks, on by default)
* Added: client-side mp.game.enableResultObjCache (about >10% performance improvement for natives that return Vector3, even more for natives with complex return values. Off by default - to be used with caution!)
* Added: client-side mp.players[/peds/vehicles/colshapes/objects/markers/labels].maxStreamed (get/set)
* Added: client-side mp.cameras.gameplay - mp.camers.new("gameplay") now also returns reference to this persistent undestructible instance
* Added: client-side mp.game.streaming.getAllModelHashes([type])
* Added: client-side mp.game.streaming.getAllModelNames([type])
* Added: client-side mp.game.streaming.getModelNameFromHash(hash)
* Added: client-side mp.game.invokeStrict* (it doesn't pass rounded number values as int but explicit BigInt values)
* Fixed: client-side entity JS prototypes accessibility (hint: you can use this instead of checking entity.type now)
* Fixed: client-side mp.game.graphics.screen2dToWorld3d is completely accurate and way faster now (especially when compared to community made JS implementations used for better accuracy in the past)
* Updated: removed fool-proofing of C# natives-based API passing null strings as empty strings (it was incompatible with certain natives)
* Updated: client-side clearTimeout/clearInterval now returns false if given interval didn't exist
* Fixed: client-side C# RAGE.Game.Invoke supports bool and bytes (both as arguments and return values, previously it had to be casted to int/long)
* Updated: entity.destroy now has a safety guard against double calls
* Fixed: client-side C# waypoint events

 

Misc
* RAGE game process runs as an user process (non elevated) now
* User game resources loading performance has been improved
* Fixed EGS game path auto detection
* Launcher downloading speed status is now more accurate
* Launcher properly switches from "establishing connection" to "downloading" status now
* Voice chat recorder stability and performance improvements (with more updates planned!)
* Fixed broken vehicle bumpers falling on ground when streamed in
* Fixed specfic server vehicle/entity API packets being ignored by clients with an unstable connection
* Implemented masterlist domain resolver cache when the server couldn't temporarily resolve it after reconnecting at runtime due to DNS server connectivity issues (e.g., DDoS attack or... daily OVH network issues)
* CEF automatically resizes based on game resolution
* Experimental IME (https://en.wikipedia.org/wiki/Input_method) implementation was added
* Fixed false timeouts with server to player RPCs
* Overall server and client improvements, fixes and clean-ups

 

Upgrading
Update has been pushed to the testing branch "gamev2_LdQuTaL26ySDCvxvVnD8czXS7YzuwmX3" just now (switch channel by editing config.xml in RAGE MP folder). The client is backwards compatible with old server and vice versa. We will start merging this update into our main branch (prerelease) after the compatibility patch for the next GTAV update is ready (no worries - we've been testing this update for months with as many people as we can reach out to grab stability feedback - your feedback is also welcome in our Discord).
Old game API methods are available in mp.game1 object (can be swapped back to mp.game), you can use it for newer builds detection as well.


Currently 0.3.7 is not supported - it will be added by the next GTAV update compatibility patch.

 

More
Released updates and patch notes are posted in our Discord. Make sure to check it out at #quick-updates!

 

  • Like 24
  • Mask 9
  • Sad 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...