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

Parsing of initial host requirements #16

Open
mfreder7 opened this issue Nov 28, 2024 · 0 comments
Open

Parsing of initial host requirements #16

mfreder7 opened this issue Nov 28, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@mfreder7
Copy link
Owner

Feature Request: Custom Multiplayer Data Structures for Server Parsing

Feature Summary

This feature gives developers the ability to define custom data parameters for server-side processing by extending the "/lobbies/create" endpoint. This allows developers to explicitly define data needed for multiplayer sessions while ensuring the security of the backend.

Feature Details

API Endpoint Extension

  • Extend the "/lobbies/create" endpoint to add a parameter that allows for custom data structures. This will support specific game requirements in multiplayer environments.

Data Schema Requirements

  • Custom data must be validated and sanitized to maintain backend security.
  • The data schema can include parameters for game rules, settings, or any session-specific attributes.

Configurable Data Parameters

  1. reliable: Specifies whether the data transmission requires reliability.
    • Default: false
  2. priority: Defines the priority of the packet (applicable to reliable packets only).
    • Default: 3
  3. data_type: Specifies the type of data being transmitted, such as "string" or "number".
    • Default: string
  4. attr_name: The name of the attribute being transmitted.
    • Default: rule
  5. default_value: The default value to use if no data is provided.
    • Default: null
  6. parse_modifier: A placeholder for Python functions that can modify or validate incoming data.

Example Use Case

Developers can define custom parameters like { "attr_name": "health", "data_type": "number", "default_value": 8, "reliable": true, "priority": 5 } to create specific game configurations that enhance the multiplayer experience. For instance, setting the priority to 4 or higher enables thread locking and retries up to three times if needed.

Acceptance Criteria

  • The "/lobbies/create" endpoint must correctly parse custom data without introducing security risks.
  • Default values must be applied if specific client values are not provided.
  • Validation mechanisms should be in place to prevent security vulnerabilities.

Additional Considerations

  • Custom data structures must undergo thorough validation to guarantee security.
  • The priority parameter should only be applied to reliable packets to prevent inconsistencies in the system.
@mfreder7 mfreder7 self-assigned this Nov 28, 2024
@mfreder7 mfreder7 added the enhancement New feature or request label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant