Skip to content

feat: Implement player structure and basic state logic #30

Closed

Description

@SailMasterG

Issue Description:
To implement the player structure for Cub3D, you need to define the essential data for the player's state and movement in your header file (.h) and wire up its initialization:

Structure components (t_player or within t_data):

    Position: Floating-point coordinates (pos_x, pos_y as double) to allow smooth navigation across the grid.

    Direction vector: Current facing direction (dir_x, dir_y).

    Camera plane vector: Perpendicular vector to the direction (plane_x, plane_y), essential for setting the Field of View (FOV) in the DDA raycasting algorithm.

    Speeds: Movement speed (move_speed) and rotation speed (rot_speed).

**Tasks to accomplish:**

    Parse and assign the starting spawn coordinates and cardinal orientation (N, S, E, W).

    Initialize the corresponding dir and plane vectors based on the starting orientation.

    Ensure the structure is ready to interface with MLX keyboard event hooks and collision detection

Activity

  1. added this to the Mandatory milestone on Nov 9, 2026
  2. self-assigned this
    on Nov 9, 2026
  3. moved this from Backlog to In progress in CUB3Don Nov 9, 2026
  4. moved this from In progress to Done in CUB3Don Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions