Whew! Almost a month after the last update and the Customer Code AND the Customer Selling Code is good to go!
This latest system took a lot of effort and multiple things popped up that made testing a little more difficult, which in the end led me to some time saving creations that were to be an eventuality anyway!
First of all I had to finish off Customer Creation from the last time and then implement these Customers actually popping into the store.
For test purposes I've set up 3 Customers to come into the store an hour, each randomized to be different races/difficulties. This also necessitated UI to make it much more obvious what kind of customer we were dealing with. Be it a high roller or a frugal cheapskate, we needed to know that and what kind of mood they're in - so some quickly made sprites took care of that.
After that development moved to combining the customer with the stocking system, i.e. setting up the rather lengthy process of checking if a customer wants anything that is on the shop floor.
Though simple to type out this alone took a few solid days of coding to get right, the code as well became rather complex and difficult to look at. So I set to separating each section into its own script, this went extremely well and simplified the process a lot (after some ironing out) making progression in this section much simpler. This is a format I'll look to adopt in any future heavy code situations! ^^
Following on from that was the rather complex Bundle 'Chain' system, which a lot of coding time this past month was dedicated to fine tuning. The basic premise here gives a customer who bought something to buy something else in the store randomly, even a duplicate of the item they just bought! :)
Coding for the Bundle Chain system became quite slow as more problems popped up, and the current testing procedure for this wasn't exactly speedy either - I've so far been using show_message, a command that allows the user of Game Maker to have a window pop up and let me know whatever I need to. This is fine, but the Bundle system I'd been testing lead to around ten to fifteen of these messages every time, even for failures.
This led me to creating the Activity Log, something that would be implemented in later development anyway, this allowed me to have a pop-up window that would record the last 20 actions, allowing me to sell items a lot quicker than before, and check for issues too.
Lastly I had some issues with the stock system, which turned out to be related to me being an idiot and going from A to Z to get to B. I imagine a ton of this kind of thing will pop up as I go, meaning Hush Blossom will get more and more efficient as time goes on.
Lengthy diary this time, but it has been a while - look forward to the next update hopefully much sooner ^_^ Keep on Blossoming!
Comentários