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

Player Interaction System with In-Game Objects #13

Open
3 tasks
brylie opened this issue Nov 21, 2022 · 0 comments
Open
3 tasks

Player Interaction System with In-Game Objects #13

brylie opened this issue Nov 21, 2022 · 0 comments
Assignees
Milestone

Comments

@brylie
Copy link
Member

brylie commented Nov 21, 2022

This feature aims to establish a robust interaction system allowing players to engage with various in-game objects like doors, chests, and items necessary for progressing through the game. The system will rely on two main components: Interactable and Interactor, enhancing the game's interactivity and player engagement.

Design Goals

  • Enhanced Player Engagement: Enable players to interact seamlessly with objects in the game environment.
  • Flexibility: Design a system that can be extended to various types of interactive objects and different interactor entities (e.g., NPCs, vehicles).
  • Intuitive Feedback: Provide clear visual and auditory feedback when objects are interactable or being interacted with.

Key Components

  1. Interactable:

    • Node Setup: Implemented as an Area3D node with a CollisionShape3D child, defining the interaction zone.
    • Signals:
      • focused: Emitted when an interactor focuses on the object.
      • unfocused: Emitted when an interactor loses focus on the object.
      • interacted: Emitted when an interaction is performed.
    • Behavior Handling: Manages state changes and visual feedback based on interaction status.
  2. Interactor:

    • Node Setup: Also an Area3D node with a CollisionShape3D, defining the active area for initiating interactions.
    • Functionality:
      • Manages detection and interaction logic.
      • Maintains a reference to the controller object (e.g., player character).
  3. PlayerInteractor (a subclass of Interactor):

    • Specialization: Specifically tailored to the player, tracking nearby interactable objects and handling player inputs.
    • Interaction Handling:
      • Monitors player commands to interact with objects.
      • Manages focused and unfocused states based on player proximity and input.

Implementation Considerations

  • Modular Design: Ensure that components are reusable and can be integrated with different game entities.
  • Performance Optimization: Optimize interaction detection to minimize performance overhead, especially in dense interactive environments.
  • User Feedback: Implement clear feedback mechanisms, such as highlighting or sounds, to indicate interactable objects.

Development Tips

  • Start with foundational prototypes for the Interactable and Interactor components to refine interaction mechanics.
  • Utilize Godot’s built-in signal system for robust and flexible event handling between components.
  • Continuously test with actual game scenarios to ensure interactions feel intuitive and responsive.

Reference Material

For further guidance and best practices in implementing interaction systems in Godot, refer to the following resources:

Action Items

  • Design and implement the basic Interactable and Interactor components.
  • Develop the PlayerInteractor subclass with extended functionality for player-specific interactions.
  • Set up initial user testing sessions to evaluate the interaction mechanics.

Summary

This system is foundational for enabling meaningful player engagements within the game world, thereby enriching the gaming experience and supporting the game's educational objectives.

@brylie brylie changed the title Add interactive object Add interactive objects and composable interactivity components May 11, 2024
@brylie brylie changed the title Add interactive objects and composable interactivity components Player Interaction System with In-Game Objects May 11, 2024
@brylie brylie added this to the 0 - Preface milestone May 14, 2024
@ResendeTech ResendeTech self-assigned this Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants