-
Notifications
You must be signed in to change notification settings - Fork 12
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
Randomized map generator #30
Randomized map generator #30
Conversation
… files - The CardBase applies all effects when played - The application of effect is done given the card data (parser TODO) - This application will be done to all targets in the list - This calls the apply_effect which is done to individual targets
…o one target at once
It worked nicely. This card probably won't stay as it is, that would be OP But it's nice to test that the system is working
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation using Floor
was decided against in #6
The implementation should use a 2D array of rooms instead. Changes are needed to remove the use of floors in this implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution ! I left comments on points that I felt needed changes. We can discuss if you think some of the changes I suggest shouldn't be made
i'm also realizing the room doesn't have an EventBase element, but you will need to wait for #29 to be closed to be able to reference that properly (which will also give you access to the list of possible events) |
I'm not sure if I forgot something that was mentionned during the PR or not
* Create Event Parent and Event Child Classes * Issue 20: Update Event Children with scene string instantiation, Create Events Classification script to hold enums for different events and added it to AutoLoader * Issue 20: Add comment for test function * Issue-20: Rename Event classes, remove EventsClassification enum * Issue-20: Update EventBase to have array of different types of events. Update init() as well. * Issue-20: Update EventBase Array holding all Events, Add Unit Test for EventBase
create_map() now generates to reflect the map shape reference (https://github.com/Saplings-Projects/1M_sub/issues/6#issue-2027403379)(https://github.com/Saplings-Projects/1M_sub/pull/30#issuecomment-1868931059) changed floors_width to reflect basic math
added static typing where there was not any
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for implementing the idea I gave earlier @multi-arm !
I think it needs some changes.
This would probably be a good thing to test in the map tests also (generate a small map and compare it to a reference we have, to be sure the padding an the rooms all are correctly set)
I'm also seeing you added some typing for functions in the latest commit, could you take a look at these comments i left at the beginning about some missing types ? |
Sanity checking this, I think we need to sync up |
Static typing changes Added create_map return type changed map generation (optimization) (MapBase.rooms holds arrays of rooms, one for each floor)
create_map now has configurable width for testing changed test for a small floor (reference)
fixed unintended test changes
If it's just for the Contributing.md, I don't think it's really needed to sync main in map (it's not a code dependency for example) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing the changes ! I think we will soon be done with this PR, that's a good implementation for a basis.
Some parts still need changes imo
…s-Projects#37) * Cut all of the unnecessary code in CardBase * Changes to the card resource to make sure they work * Removed unnecessarily _damage_entirt function * Removed cards that don't do anything
changed create_map(_layout) > create_map(floors_width) added room padding to both before and after rooms are generated changed tests to use a fixed list
* Added a WIP buttom that shows a new scene * The button now shows a new scene with a return button to go back to the game. The game cannot be played while the scene is present. * The button now shows a new scene with a return button to go back to the game. The game cannot be played while the scene is present. * added Typing * Added CardScrollUI to see the inside of a CardPile * Added CardScrollUI to see the inside of a CardPile * Changed event to input_event and added its type * Updated the the min size of the CardUI * Fixed the aftermath of merging * Added constant for the card. * Deleted a function that is irrelevant. * Moved the ShowCardPile into CardPileUISetter * Deck doesn't need to have a card count. * resized ScrollContainer to show 5 columns and 2 rows * Added a button to show cards inside the deck * Fixed the code that modifies the card and adds it to the container. * Whitespace be gone * Changed the settings of GridContainer so cards first show in the center * Print statement begone * added the "pile" after deck so it is consistent to the others pile * Added a test for cardscrollui * Fixed the test so it gets the proper gridcontainer * Changed _input function to use a key constant instead of a string. * Changed the settings of GridContainer so cards first show in the center part 2 * Addressed review feedback from Ty * Addressed review feedback from Turtyo * Changed the test so it compares Cardbases * added a comment to the input function. * potential fix to errors in test * amendment for the last commit * Fixed a function, fixed the test?, and cards not appearing in the UI. * Fixed the testing scene after the merge * whitespace be gone --------- Co-authored-by: Turtyo <49365680+Turtyo@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve since everything looks good from my end, I do have the same comment as Turtyo though.
changed create_map(layout) to create_map(map_floors_width) changed insert in create_map() to append changed test error message formatting added override _to_string() in RoomBase, this will have more added in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will pull in local to test
changed assert_not_null(test_map.rooms) to assert_not_null(_room) in map test
I pulled in local to test, it loads and all the tests are passing. We don't have any visual for now but the code seems good, and this is a solid basis imo. Thank you @multi-arm ! |
b4d84ad
into
Saplings-Projects:map-implementation
Description
Added base classes for map, floor and room
Added manager script to manage said base classes
Related issues
Issue 10 (#10), Issue 6 (#6)
List of changes
Created MapBase, FloorBase and RoomBase classes
Created MapManager script
Created test_map
Tests
Added one test for generation. More tests will be added in the future
Additional notes
Trying this again, everything should be fixed now hopefully but I'll make this a draft too just in case.