top of page
Writer's pictureHush Blossom Team

Developer Diary Chapter 43 - Container Arranger



Containers and Decors oh my!

Oh dude it's been a long time coming! Seriously it's been over a month since the last dev diary, and a lot of life stuff and cool games have been about the place I've been working on this massive code change since the last dev diary was published (and consequently we changed over to this website from the last). It shows in just the numbers as well. The last Dev Diary featured the Container Slot Management system, that was around 900 lines of code just on the steps, this Container Management system is closer to 6000, just to give an idea of the difference in complexity ^^;;;

 

The Container Arranger is what it sounds like, a hub to control every aspect of the Container (and Decor!) Arranging. This has five sections: 1 - Container Purchase

2 - Decor Purchase

3 - Customising Containers

4 - Placing Decor

5 - Placing Container

All lovingly #REGIONED# in GML

 

Container Purchase


JUST LIKE IT IS ON T' TIN. This section of the arranger is now self-contained, before you bought them in a different place - it makes sense for all Container Options to be in one hub. There isn't much to say about this section except that the player will have a limit for the amount of Containers they can purchase.


As of now every Container is available for purchase, some of these will be locked behind story/gameplay progression in the final game, but for testing/debug purposes everyone is here. The price increases for every Container Slot Purchased.



 

Decor Purchase


Similar to the above, although much more placeholder-y in format, the Decor allows the player to purchase up to 4 of any Decor. These Decor Items will have an effect on the store and the customers within it, and also allows for individual personal expression within the store. These will vary in cost based on their effect and will unlock throughout the game in rare drops from Hunting, ideally! For now the game has 10 puppet Decors without any real effect, that's some fun design for another day!



 

Container Customisation


This is something that was in the older system but was a little less flexible, this allows the player to choose the type of container they want to edit, the container slot in particular they want to edit, and then click and choose what to change them to.


Obviously it's fairly stock but I'm fairly proud of the UI here, formative as it is. The player is able to change the Style here, and eventually they'll be able to change the appearance too. We have plans for several different types of Container look for each Style,



 

Placing Container


The entire container placement system was REAAAAAAAAL interesting. As in took the longest gosh darn time of probably any system I've had to design so far.





I had to consider a lot of factors here. How many containers do I have in stock? Okay, how do I best go about placing them? Once I've decided which one I want to place how do I visually show this off? How do I create the positions for these Containers to go, and keep track of which ones are being used? How do I change the layer depth dependent on the location relative to the other containers so that they don't appear over each weirdly? What if a player decides to change the style of a Container that is placed? If a Container has Items in it and I remove it are the items removed? If a Container is moved how do I make sure the old state is deleted and the new one is kept? If I change rooms how do I ensure these variables are tracked and reapplied?


Sooo yeah. TLDR, this stuff was pretty intense.


I managed to account for all of that stuff and now the system works! Woo!




 

Placing Decor


This system was somewhat easier than the Container System, in a way. A lot of the code for this was easily transferred over from the Container Placement section. Although me being me I decided to change the Decor System to account for the fact that you can place up to 4 of one of these kind of Decors. This increased the amount of variables to track by 4 for every dummy decor item. This meant the UI needed to change to accompany for that - so the one button needed to change into four, and I needed to keep track of each of these too.


Copying the code over was also a little difficult. When the amount of code becomes difficult to sift through every job takes a little while longer, that plus my potential overuse of the GML region system and loose curly brace placement means that sometimes issues can be super difficult to track down and one stray curly brace can let loose the jaws of oblivion. It's taught me that the best method here is to use regions and braces in tandem and try and contain systems in one region, rather than across several regions.


I also had to basically rewrite the code because it was becoming so damn complex of a patch job that I probably saved time starting over, I used Atom for that and it was much easier ^^;;;




With that the Container Arrangement is a thing! There's a lot more work to do for the final game, but this is a system that should hold all of the design and be openly expandable and easy to alter in the future. I'm pleased as punch it's donezo, and honestly I've been working so hard and long on this particular system it's going to feel weird to work on anything else ^^;; Next up is up for discussion with the team, but we're getting ever closer to an Alpha build that actually feels like the end result. Hopefully the next Diary won't be too far off either ^_^


Keep on Blossoming!

16 views0 comments

Recent Posts

See All

Comments


bottom of page