Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCUMENTATION: Add bullet doc #123

Merged
merged 2 commits into from
Oct 22, 2023
Merged

DOCUMENTATION: Add bullet doc #123

merged 2 commits into from
Oct 22, 2023

Conversation

TTENSHII
Copy link
Collaborator

@TTENSHII TTENSHII commented Oct 22, 2023

MINOR

  • Please check if the PR fulfills these requirements
  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Norm of the code has been respected
  • In what state is your pull request?
  • Ready to merge / Waiting a reviwer to see my work.
  • Work In Progress (WIP) / My work is not finish but i want daily reviews. (Draft)
  • CI Review / I want to see what the CI thinks of my work.
  • Need feedback / Just to have feedback on what i produced. (May not be merged)
  • What kind of change does this PR introduce? (You can choose multiple)
  • Bug fix
  • Feature request
  • New / Updated documentation
  • Testing CI ( Make the pull request in draft mode)
  • What is the current behavior? (link an issue based on the kind of change this pr introduce)

  • What is the new behavior (if this is a feature change)?

  • Other information:

Summary by CodeRabbit

  • New Feature: Introduced a new "Bullets" section in the game, enhancing the gameplay experience. This includes the addition of new bullet types and physics options such as zigzag and bouncing.
  • Documentation: Updated the developer guide with a comprehensive explanation of the bullet structure and characteristics, including instructions for adding new bullet types.
  • Performance Improvement: Implemented data compression in the network code to improve game performance and speed. This change allows for faster and more efficient data transmission.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 22, 2023

Walkthrough

This change introduces a new section in the developer guide about bullet properties in the game, and modifies the ANitwork.hpp file to compress data before sending it asynchronously.

Changes

File Summary
docs/SUMMARY.md Adds a new section "Bullets" to the developer guide.
docs/.../bullets.md Explains the structure and characteristics of bullets in the game, including instructions for adding new bullet types.
src/Nitwork/ANitwork.hpp Compresses data using Zstd::compress before sending it asynchronously.

🐇

In the realm of code, where logic is king,

Changes are made, improvements they bring.

Bullets now dance, in zigzag and bounce,

While data compresses, every byte counts.

So here's to the devs, their efforts we toast,

To their tireless work, we owe the most. 🥂


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

@TTENSHII TTENSHII self-assigned this Oct 22, 2023
@TTENSHII TTENSHII added the documentation Improvements or additions to documentation label Oct 22, 2023
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between ab22723 and 19af5fc.
Files selected for processing (2)
  • docs/SUMMARY.md (1 hunks)
  • docs/developer-guide/ecs/bullets.md (1 hunks)
Files skipped from review due to trivial changes (2)
  • docs/SUMMARY.md
  • docs/developer-guide/ecs/bullets.md

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 19af5fc and 1dfe747.
Files selected for processing (1)
  • src/Nitwork/ANitwork.hpp (1 hunks)
Additional comments (Suppressed): 2
src/Nitwork/ANitwork.hpp (2)
  • 66-67: The change from a single line to two lines for creating the compressedPacket shared pointer improves readability. However, it's important to note that the Zstd::compress(data) function may throw an exception if the compression fails. It would be better to handle this potential exception to prevent the program from crashing.
try {
    std::shared_ptr<std::vector<char>> compressedPacket =
        std::make_shared<std::vector<char>>(Zstd::compress(data));
} catch (const std::exception& e) {
    // Handle the exception appropriately
}
  • 69-70: The asynchronous send operation is not guaranteed to send all data in one call. It's recommended to handle the case where only part of the data is sent. Also, the lifetime of the compressedPacket must be managed to ensure it remains valid until the async operation completes. Consider using a class member to store the compressedPacket or use a custom handler to manage its lifetime.

@Saverio976 Saverio976 merged commit 35a37b1 into dev Oct 22, 2023
@Saverio976 Saverio976 deleted the doc/RB-151-Doc-for-bullets branch March 4, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants