Skip to main content
This page explains how contributors can extend the R-Type project by adding new graphical libraries, games, or server commands. Follow the steps below for seamless integration.

Adding a New Graphical Library

To add a new graphical library, you need to implement the IDisplayModule interface and integrate it into the project.

Steps:

  1. Implement the IDisplayModule:
    • Create .hpp and .cpp files for the new library in the graphic/ folder located inside the engine/ directory.
    • Implement all the virtual functions defined in IDisplayModule.
    Example:
  2. Integrate the Library with CMake:
    • Add the new .hpp and .cpp files to the CMakeLists.txt located in the engine/graphic folder:
  3. Test the New Library:
    • Compile the project and ensure the library works as expected.
    • Test graphical rendering, input handling, and performance.

Adding New Server Commands

To add new TCP commands for the server:

Steps:

  1. Define the Command:
    • Add the new command and its logic in the server’s command handler.
    Example:
  2. Update Documentation:
    • Add the new command to the TCP protocol documentation.
  3. Test the Command:
    • Verify the command works with the client-server communication flow.
To add new UDP commands for real-time communication:

Steps:

  1. Define the Packet Header and Logic:
    • Update the UDP packet structure to handle the new command.
    Example:
  2. Add the Command in the Command Handler:
    • Update the server’s UDP processing loop to include the new command.
  3. Test the Command:
    • Ensure the new command is sent and processed correctly in real time.

Conclusion

Contributors can enhance the R-Type project by:
  1. Adding new graphical libraries by implementing the IDisplayModule interface.
  2. Adding new TCP and UDP commands for the server.
Follow the project ruleset for pull requests and approvals to ensure high-quality contributions.