shmocz / ra2yrcpp Goto Github PK
View Code? Open in Web Editor NEWProtobuf API and C++/Python library to interact with Red Alert 2: Yuri's Revenge through WebSockets and HTTP
License: GNU General Public License v3.0
Protobuf API and C++/Python library to interact with Red Alert 2: Yuri's Revenge through WebSockets and HTTP
License: GNU General Public License v3.0
Originally posted by @shmocz in #8 (comment)
Because the library accepts HTTP and plain JSON.
Traditionally CnCNet has supplied a suitably patched spawner binary, hence the tests scripts operate under the assumption that the
spawner can be executed directly. Syringe-based projects (Ares, Phobos, yrpp-spawner) store the hooks/patches in a separate DLL that are applied at run-time by the Syringe executable.
Simple solution is to just replace gamemd-spawn.exe -SPAWN
command with Syringe.exe gamemd.exe -SPAWN -CD
. This will cause issues for debug sessions, because gdbserver launches the spawner directly. One way to address this is to attach to the process after Syringe has created it. Past experiences have shown problems when attaching, such as unusual bugs and inability to load symbols. If this proves out to be the case, a separate tool to apply the patches could be created as alternative to syringe. This could be implemented as a DLL to be loaded and initialized at the entry point.
Portions of code still use the old "yrclient" as their root namespace, and overall the namespace structure is irregular.
Solution: devise standard namespace conventions, and update the code to conform to them.
In the README.md:
Copy libra2yrcpp.dll and patched gamemd-spawn.exe to the CnCNet installation folder (overwriting the original gamemd-spawn.exe) ...
Where can i find the patched gamemd-spawn.exe
?
Most game control related commands in commands_yr.proto
are low level, and map almost directly to a call of specific underlying game function. While this simplifies the library implementation, there are several problems:
Solution is to add high-level API, that provide human readable commands for essential game controls. The low level API should be left intact for development purposes, but could be disabled by default as a safety precaution.
Non-exhaustive list of high level API features:
This seems to occur when issuing async commands, while executing regular commands at high frequency. Upon flushing the results, an async commands gets assigned the id of another sync command.
The bug manifests itself in pyra2yr as follows:
This was assumed to be due to race condition addressed in a19197f, but the problem still persists, indicating a deeper issue.
By the way, i modified the `python3` to `python` in the patch command. Command `python3` doesn't work for me.
ra2yrcpp/scripts/run-gamemd.py
Lines 365 to 372 in 0b295c7
Originally posted by @1099255210 in #8 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.