Giter Site home page Giter Site logo

cpprp's People

Contributors

bakkes avatar kcolton avatar pixelinc 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

Watchers

 avatar  avatar

cpprp's Issues

Compilation Issues

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.

CPPRPJSON: Numbers may exceed signed long (edge case)

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.

How to get PlayerName from Car Actor?

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();

How to use?/ How to learn how to use it?

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 ?

Unsafe link in readme

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 :)

Question about 'rotation' units

I am curious if you know exactly what units the 'rotation' data structure holds. For example, the z-axis 'rotation' appears to be:

  • 0 when facing east
  • 1 when facing west
  • -0.7 when facing north
  • +0.7 when facing south

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

MSVC Compilation Issue (with fix)

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)

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.