Chichi Munga

Archives
Bluesky
Log in
Subscribe
Aug. 23, 2026, 7:21 p.m.

Drag, Rotate, and Drop

Implementing the small details in dragging and dropping items in the inventory.

Chichi Munga

Implementing the details in the inventory system turned out to be a pain in the ass for no reason other than my poor comprehension of the functionality. After hours of playing around, I'm happy with how it's working.

CleanShot 2026-08-23 at 18.58.19.gif

On top of the incrementing column, and it being able to tally the damage types (shown in the bottom right corner of the GIF), it can now continue to do all that while the player drags, rotates, and drops their items around. Obviously, I will need to block a player from doing this willy-nilly whenever they want, but hey, it's working, it's working!

So many small details in the functionality of this, I'm surprised how much code it took to get here. The small details include showing a semi-transparent preview of the item as you drag it, an overlay (for lack of a better word) that colors the tiles green if the item can fit and red when it cannot, and even accounting for which tile you are dragging on the item so that becomes its center of origin when rotating. Wild!

Before moving on from the inventory, I want to be able to swap items in it. For instance, at the start of the GIF above, if I pick up the blue dagger and hover it over the purple scepter, I want to show a preview of the scepter where the dagger was. This shows the player that if they were to drop the blue dagger over the purple scepter, they would essentially swap places. Of course, I will now not only need to check if the dragged item fits, but will also need to check if the second item fits into the spot of the first. Even when they are totally different shapes, not just sizes. My head is getting dizzy just thinking about it.

I've clocked 27 hours total on this game.

You just read issue #6 of Chichi Munga. You can also browse the full archives of this newsletter.

← Newer The First Enemy Older → I Made Some Weapons

Add a comment:

Posting this comment will subscribe you to this newsletter with the email address you enter.
Powered by Buttondown, the easiest way to start and grow your newsletter.