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

Room class structure #10

Closed
Turtyo opened this issue Dec 7, 2023 · 3 comments · Fixed by #30
Closed

Room class structure #10

Turtyo opened this issue Dec 7, 2023 · 3 comments · Fixed by #30
Assignees
Labels
confirmed Has been approved to make code based on this new feature Ask for a new feature

Comments

@Turtyo
Copy link
Collaborator

Turtyo commented Dec 7, 2023

Feature Description

What should be the structure of the Room class ?

Motivation

Rooms being the most basic element of the map should have a carefully thought structure, since the entire map is just assembling rooms.

Acceptance Criteria

Tests should pass.

Proposed Solution

Rooms have the following elements:

  • an integer to know the light level (0 being unlit, 1 is dimly lit, 2 is lit, 3 is brightly lit), could also be an ENUM
  • a boolean to know if a torch is in the room (but maybe we want to let the player put multiple torches in a room ?)
  • an event ( Event structure #20 )

Additional Context

This issue is in link with the map implementation #6

@Turtyo Turtyo added the new feature Ask for a new feature label Dec 7, 2023
@Turtyo Turtyo mentioned this issue Dec 7, 2023
@Turtyo Turtyo mentioned this issue Dec 15, 2023
@cheesefrycook
Copy link
Collaborator

cheesefrycook commented Dec 15, 2023

Makes sense to me. I think the Room can extend from Resource similar to CardBase. Then the Map can generate an array of Room when the run starts. Then when we want to display the map to the player, we initialize a bunch of RoomWorld with the data from the Room array. RoomWorld can be a Node2D/Control node that just holds Room data and displays it. Having the separate Room and RoomWorld structure like this will let us load/unload the map display, while keeping the actual data stored in the array in Map.

@Turtyo
Copy link
Collaborator Author

Turtyo commented Dec 15, 2023

Let's call it RoomDisplay then.

@Turtyo Turtyo added the confirmed Has been approved to make code based on this label Dec 17, 2023
@xone-mi xone-mi self-assigned this Dec 20, 2023
@Turtyo Turtyo linked a pull request Dec 21, 2023 that will close this issue
@Turtyo
Copy link
Collaborator Author

Turtyo commented Dec 23, 2023

I think the display will be made in another PR and not in the initial room implementation

@Turtyo Turtyo closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Has been approved to make code based on this new feature Ask for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants