bakkes / cpprp Goto Github PK
View Code? Open in Web Editor NEWFast C++ Rocket League replay parser
License: Mozilla Public License 2.0
Fast C++ Rocket League replay parser
License: Mozilla Public License 2.0
Hey I'm trying to get a feel of the output for CPPRP-JSON, but I'm having a few issues compiling.
make -j5 RELEASE=1
Executes just fine, but the issue is that the following line is what is executed for CPPRP-JSON
g++ -c -DDEBUG=0 -DRELEASE=1 -fPIC -std=c++17 -static-libstdc++ -ICPPRP -I./CPPRP/data -I./CPPRP/exceptions -I./CPPRP/generated -I./libs/rapidjson/include/ -ICPPRPJSON -w -Wfatal-errors -DCPPRP_PRETTYSUPPORT -lstdc++fs -O3 -s -g -DNDEBUG -o build/CPPRPJSON/main.cpp.o CPPRPJSON/main.cpp
The -c
is the problem, afaik. Dropping it as an argument should create an executable because as of right now it does not create a executable:
build/CPPRPJSON/main.cpp.o: ELF 64-bit LSB relocatable, x86-64, version 1 (GNU/Linux), with debug_info, not stripped
I manually executed g++ without the -c
and received a few compilation errors:
CPPRP/CPPRPJSON/main.cpp:400: undefined reference to `CPPRP::ReplayFile::Load()'
CPPRP/CPPRPJSON/main.cpp:425: undefined reference to `CPPRP::ReplayFile::DeserializeHeader()'
CPPRP/CPPRPJSON/main.cpp:416: undefined reference to `CPPRP::ReplayFile::VerifyCRC(CPPRP::CrcCheck)'
CPPRP/CPPRPJSON/main.cpp:440: undefined reference to `CPPRP::ReplayFile::Parse(unsigned int, int, unsigned int)'
Anyways just curious if it's obvious what I'm doing wrong.
Cheers.
Seems like missing archetype for something from dropshot.
https://badpanda-replays.s3.amazonaws.com/O6KE1iBkR1/45F21EF248A2E01096FA069608528B5C.replay
I try fix. (Need an issue to reference in commit message and PR to be legit)
The case in which I found this to occur is in a replay where a unique identifier from a player came from the NNX platform. It seems the identifier is within the range of an unsigned long (2^64), but out of range for a signed long. This presents a potential interoperability issue in languages that do not support unsigned integers (I personally came across this in Java).
A potential fix would be to treat such IDs as a string.
Disclaimer: this is technically not out of spec for JSON, but I thought I'd document it anyway. If you choose to implement this fix my JSON parser will be happy, but since this is technically not a problem for C++ no worries if you would prefer to avoid potential complications like this. As well, this would technically not occur if the parser did not attempt to strictly convert data types.
I am curious if you know exactly what units the 'rotation' data structure holds. For example, the z-axis 'rotation' appears to be:
I get the 0 / 1 for the east/west, buy why 0.7 for north/south? It's very close to sqrt(2)/2 but I can't decipher what's going on
I have the following code outputting data about all the cars in the game. I would like to somehow get their PlayerName from the game, but I for the life of me can't figure out how. When I index the replayFile->names array by the car's nameID, I get something like Car_TA_403 instead of the PlayerName. I have the ActorID, is there any way to get the name from that?
Would be eternally grateful if someone help me out
auto replayFile = std::make_shared<CPPRP::ReplayFile>("c:/original_good.replay");
replayFile->Load();
replayFile->DeserializeHeader();
replayFile->tickables.push_back([&](const CPPRP::Frame& f, const std::unordered_map<uint32_t, CPPRP::ActorStateData>& actorStats)
{
std::cout << f.frameNumber << " " << f.time << "\n";
for (auto& actor : actorStats)
{
std::shared_ptr<CPPRP::TAGame::Car_TA> car = std::dynamic_pointer_cast<CPPRP::TAGame::Car_TA>(actor.second.actorObject);
if (car)
{
auto rbState = car->ReplicatedRBState;
std::cout << " Car: " << actor.second.actorId << " " << actor.second.nameId << " " << car->PlayerReplicationInfo.actor_id << " ";
std::cout << names[actor.second.nameId] << " " << (int)car->TeamPaint.team_number << " ";
std::cout << rbState.position.ToString() << "\n";
}
}
});
replayFile->Parse();
I'm having build issues in VS 2022 and Itried downloading 2017 specifically for this and it still wont build without some deeper work, i was just hoping to avoid that work if possible and figured you know your way in and out of the code much better than i will be able to do it. I'm a hobbyist at best in this stuff but ill get into it if i don't have other options. thanks.
I learned how to iterate through the actorStats via this line of code: https://github.com/Bakkes/CPPRP/blob/master/CPPRPBM/CPPBM.cpp#L167
replayFile->tickables.push_back([&](const CPPRP::Frame f, const std::unordered_map<int, CPPRP::ActorStateData>& actorStats)
However when I tried to compile this in VS 2022, I got an error. I looked into it, and the typedef for tickable uses decltype(ActorStateData::actorId)
, which is a uint32_t
. When I changed the int
key of the map above to uint32_t
it worked fine.
fixed line:
replayFile->tickables.push_back([&](const CPPRP::Frame f, const std::unordered_map<uint32_t, CPPRP::ActorStateData>& actorStats)
Came across this repo today and wanted to mention the website RocketLeagueReplays.com has been taken over by some kind of bot/malware site. If it isn't important, I'd suggest removing the link. I'm also happy to open a PR myself with a suggested fix if you'd like :)
yo, Im a coding noob and want to try to make more advanced stats for rocket leauge by reading the replays, but as you propably know :), its just random symbols. So how can I use this "software", and what does it even spill out ?
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.