You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: Implement player structure and basic state logic #30
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