Learn You a Game Jam 2024 - Day 3
This is a Blog daily update for Learn You a Game Jam 2024
Goal of Day: Ability to 'pick up' an item and have it go into HUD slot
Video footage: https://www.twitch.tv/videos/2178763323
I created an item lying on the ground, which was just a Sprite2D. The script for the level itself holds an 'item_map' variable, keeping track of what items lie in which grid coordinates. The idea is that this would circumvent the need for collision objects, as a more efficient way to see if you 'collide' with an item is just to check that your coordinates match.
Upon standing in the item's tile, I copy the sprite image into a space on the HUD, then destroy the item altogether.
if grid_position in get_parent().item_map: print("found item") var item = get_parent().item_map[grid_position] hud.add_item(item) item.queue_free() get_parent().item_map.erase(grid_position)
It's a very rudimentary proof-of-concept, and clearly I haven't used any properties of the item other than its sprite. Since the 'inventory slot' will be a core mechanic, I intend to develop on this, and create some sort of efficient data structure to store items with their properties.
One Slot Tactics
Prototype entry for Learn You a Game Jam 2024
Status | Prototype |
Author | HexTree |
Genre | Strategy |
Tags | learn-you-a-game-jam-2024 |
More posts
- Learn You a Game Jam 2024 - PostmortemJul 03, 2024
- Learn You a Game Jam 2024 - Day 5Jul 03, 2024
- Learn You a Game Jam 2024 - Day 4Jun 25, 2024
- Learn You a Game Jam 2024 - Day 2Jun 24, 2024
- Learn You a Game Jam 2024 - Day 1Jun 22, 2024
Leave a comment
Log in with itch.io to leave a comment.