chimerror

I'm Kitty (and so can you!)

  • she/her

Just a leopard from Seattle who sometimes makes games when she remembers to.


chimerror
@chimerror

Having watched all the tutorials I think I need to, I am trying to refactor my earlier code to better use features of Godot such as resources. It will likely be a tall order to have it ready for my programming partner by tomorrow, especially with more demands on my time coming up later today.


chimerror
@chimerror

OK after two focus sessions, I have my existing ingredient selection screen working with the new Resource-based Ingredients!

Next up I want to do some serious refactoring of the UI itself to better match the tutorial I watched, which was trying to recreate Slay the Spire, which seems to be a very good match for what we want to do on this screen.


chimerror
@chimerror

After doing some major folder hierarchy restructuring, next up in my big refactor is getting drag and drop working, and it seems to be doing so!


chimerror
@chimerror

Took a long break to eat dinner and pick up friends from the airport, but I have finished my major refactor of my original ingredient selection code! I can start implementing new things and they should be very tractable now compared to the mess I had!


So I had drag-and-drop working in the last update, and it was actually very useful to introduce the IngredientDropSlot class to handle that because I could also then add some exported properties and wire the drop slots together so that each one knows which slot, if any, is to the left, right, up, or down. Then I added four new input map actions to send the ingredient in those directions.

The mouse doesn't need to do that because it can just drag and drop. But for the keyboard the standard arrow keys or WASD can be used to move around the UI, and then pressing shift and hitting the arrow keys or WASD sends the ingredients in that direction. On the controller, the four face buttons represent sending ingredients in a direction, with the direction matching the button. So using the XBox button layout, Y (the top face button) would send it up, and B (the right face button) would send it right, and so on. Moving through the UI can still be done with the left stick or the d-pad.

It's a bit complicated to explain in text, but I am very hopeful that this will be natural for players. Even more, as I began experimenting I realized that if you use WASD, you could do the keyboard controls and the mouse drag-and-drop at the same time, and that could in theory be powerful!

I feel really good about what I have here even though I think there are definite improvements that can be made. For example, maybe it would be good to have clicking the ingredient do something. Perhaps one click to select, and then a second click could drop it on an area for those who find the drag-and-drop motion challenging.

Even though I'm excited to try to implement the chef actions next, I think I will call it for today and get some rest.


You must log in to comment.

in reply to @chimerror's post: