Conversation
Added: - collision boarders to each island
Added: - collision boarder into setup in game running
…ands-(issue-115)
Added: - a copy of the map that is today
Added: - working collision between the player and the islands
Added: - when comming in contact with the island the player recieves chest
Added: - new state file for chests
Tested: - the collision and adding in game running Added: - update and render method to the chest state
Added: - system to pick up the chest with a press of a key - message to show when the player collects the chesrt
Enhanced: - the player comes in interaction with the island - now when the player interacts with the island hell get the message
Updated: - the screen position - the size of the screen
Extracting chest icons for the messages
Fixed: - wrong icons getting extracted Scaled: - the chest image from 16px to 64px.
Added: - chests are now randomized
Added: - a voyage scroll icon to the loot dict, now there is also a chance to receive a voyage
Changed: - The test chest name to the actual chest name
Changed: - the loot names to look more appealing in game
Added: - new chests to the json invnetory
Hello
Small additions
Added: - when claiming a chest from one island you cannot claim it again
Added: - if collecting a chest/voyage the player cant collect it the second time again
Removed: - debug code for checking islands within island code - Removed commented code
Added: - prompt for pressing the key to interact
Added: - prompt for using inventory
Part 1
Part 2
Finally some good fucking food
…ands-(issue-115)
…ands-(issue-115)
Fixing issues
ultimateownsz
left a comment
There was a problem hiding this comment.
This pull request is a good start, but it is creating visual inconsistencies. Cool feature when I go to different islands, that it adds each time a new item to the inventory. Haven't tested if the item can be a duplicate because our inventory starts full. Perhaps for the test cases, clean the inventory so you can properly test edge cases.
What I do find something that isn't clear, why the player has to press the button e when being in collision with an island, having to press e again to receive an item. For testing purposes it's fine but, for the game's feel, it adds too many steps in my opinion.
I also noticed some things going wrong:
-
When sailing towards the shop, pressing
eto interact, this is shown:

-
After pressing the
qbutton again, the shop window is gone as before. -
When the player's position goes to the edge of the left sea, where the screen ends, the message is gone too:

-
When the player starts at the initial starting position, it isn't very clear that if you hit the island, that you can interact with it, since the message of
Press E to interactis showing constantly, it also creates a visual bug:

-
When hitting an island you see that you can pick up the chest, when I press E to interact, I receive the message that a voyage has been added to my inventory but what I saw was clearly no chest:

-
After receiving a scroll, I see a misspelling in the inventory shown, and the visual item representing in the inventory is gone too:

There was a problem hiding this comment.
I think for changing the map name to version, it should reflect what you changed in the map, don't you think?
| self.facing_direction: str = "down" | ||
|
|
||
| # Chest bool | ||
| self.chest_collected = False |
There was a problem hiding this comment.
Would it not be wise to store this boolean in the class you inherit the chest in? Like for example the player, since this is an abstract class, and if we would add other entities than a player it would not make much sense to store the chest bool value.
| @@ -0,0 +1,111 @@ | |||
| import random | |||
| from typing import List, Optional | |||
There was a problem hiding this comment.
We use Python 3.12, you can update the type hints to use the more modern syntax, by removing this line and updating the following lines: 28, 54
| self.inventory: Inventory = inventory | ||
|
|
||
| # collide can be None or a Sprite | ||
| self.collide: Optional[pygame.sprite.Sprite] = None |
There was a problem hiding this comment.
self.collide: pygame.sprite.Sprite | None = None
src/states/chest_state.py
Outdated
There was a problem hiding this comment.
def update(self, events: list[pygame.event.Event]) -> None:
| # Draw the green dot at the screen coordinates | ||
| pygame.draw.circle(screen, (0, 255, 0), (dot_x, dot_y), 5) # Green circle at tile coordinates | ||
|
|
||
| self.message = self.font.render( |
There was a problem hiding this comment.
Your message appears constantly, and if the player goes out of the position of the camera, it doesn't dynamically follow the player's camera.
A lot

Pull Request Template
Type of Pull Request
Only check one box per pull request.
Summary
This PR adds chests and voyages to the islands. Now every island will have either a chest or a voyage. The player can collect the chest only one time, after collecting a chest it will be added to the inventory and the player can no longer collect the chest from said island again. He can go to other islands.
Related Issues
This PR closes issue(s) #115
✅ Checklist:
🏷️ Labels:
type: ...,area: ...,game-..., ...