Week 9 - Checkpoint 3 - Cooking and Customer
Hello everyone, welcome to my third devlog about the building process of Blue In Town. In the second devblog, I sketchily talked about how I improved Blue's non-pathfinding movement by using the A-star algorithm, some new features that I added to the game, and what I intended to do to help my Blue move around more effectively. In this post, I will update the results from stated solutions for Blue's movement in the previous, summarise the initial implementation on Alice's cooking process, and introduce some new interactions with customers in the game.
As which I wrote in the second devlog, despite a smarter pathfinding strategy, there were still several problems with Blue while she was walking around. After the scene played, Blue went to her target immediately even if players had not clicked the left mouse button. Moreover, when being at the target position, Blue still kept moving at that place all the time. To solve those issues, I set the movement speed of Blue equal to zero at the initial stage of the game and to two after her target moved. Also, I wrote some code calculating the distance between Blue and the target. If that distance is lower a specific value, the movement speed is equal to zero as well. The result is displayed below.
(GIF Maker did not allow me to create a longer-than-fifteen-second gif T^T)
Last week, besides improving Blue's movement, I added a C# script to give Alice a moving ability. Since after trying to test the convenience of using all three mouse buttons in the game, I agree with my classmate's feedback that the controls sometimes confuse players. Therefore, I decided to modify it a bit. Instead of using the right mouse button to direct Alice, players will use A, W, S, D keycodes to make her walk around the kitchen. Most importantly, this way helps to take full advantage of the keyboard as players can conveniently press 'R' to open the Recipes and 'C' to cook (I forgot to mention these things in the last devlog).
To describe the idea for Alice's cooking process, I would say that the players will be able to control her collide with any ingredients, and then that item is added to her inventory. Alice will cook a dish with correctly taken items and place it on the cabinets in front of the kitchen. Blue's and Alice's inventories were created and shown in the previous devlog. I also made a new animation to depict and wrap up Alice's cooking process.
Regarding the two new customers, last week, they were spawned as a queue at the entry with a small introduction for the first appearance. Players could drag them to anywhere in the game scene but could not drop them at a table. Now, players can place them at any empty ones. If a table is full, customers will automatically back to their initial position.
To collect some comments on the new version of Blue In Town, I should upload it on itch.io before this Thursday. Unfortunately, due to my crazy laptop, I got some problems while exporting the game from Unity. Hence, I could not post it on time for other players to test and could not receive any feedback on it as well. I will try to upload the game on Thursday next week and have my classmates given comments on the new stuff described above.
However, I still recognize that there are some issues with Alice's cooking process so far. The biggest downside is that if more than two correct items are taken (for instance, two bowls of rice and one piece of salmon), Alice will cook all of them and return two dishes (whereas four correct items needed to be grabbed to cook two dishes) instead of making only one dish and leaving redundant ingredients. The reason for it is that the conditions to check the appearance of correctly taken items to cook are not enough and close.
(Could not make a gif longer than 15 seconds again =(( But you could see Alice continued cooking even the first dish was completed already while there were just three items in her inventory.)
At the moment, I have not got any specific idea for improving this drawback. Any solution to solve it will be updated in the next devlog.
Back to the pathfinding ability after implementing the A-start algorithm, my Blue now can intelligently avoid all obstacles in the game scene and then smoothly reach the target. However, I am still looking for a method to optimize her movement so that she will be able to get rid of all ugly and unnecessary zigzag turns.
Blue in Town
More posts
- Documentation and User GuideOct 16, 2020
- Week 12 - Checkpoint 6 - TestingOct 13, 2020
- Game TestingOct 05, 2020
- Week 11 - Checkpoint 5 - User InterfaceOct 05, 2020
- Week 10 - Checkpoint 4 - Cooking and Customers (2)Sep 24, 2020
- Week 8 - Checkpoint 2 - Basic Level BlockingSep 13, 2020
- Week 7 - Checkpoint 1 - Player MovementSep 11, 2020
- Game ConceptAug 28, 2020