Week 7 - Checkpoint 1 - Player Movement


Hi everyone, it is so interesting for me to post the very first devlog about Blue In Town's building process. In this devlog, I will recap the key points of how I made my Blue's and my Alice's movements at the initial stage and point out some drawbacks of the current implementation. Also, I will sketchily talk about how I should improve it at the end of this post.

As which I stated in the previous post (not about game building process though), 'Blue In Town' will be a mouse-click game in which we must use the mouse cursor to tell characters where to go and what to do. In more detail, we can click the left mouse button to control Blue, the right mouse button to direct Alice, and the middle mouse button to drag customers to any table.

Initially, I created two four-way animations for both Blue and Alice (the arts are not made by me!) so that their movement will become more lively and realistic (but I just put Blue in the scene for testing purposes). It means that they will move around their small restaurant in the game based on four directions (up-down and left-right).

In Unity, I implemented some simple movements for my Blue by adding a new C# script. The script defines that the position of Blue's target is corresponding to the mouse cursor position in the game scene. It means that when I clicked the left mouse button anywhere in the game scene, my Blue will immediately identify the mouse position as her target and navigate to it. Fortunately, the result was as good as I expected. It was so exciting when my very first script for this game worked quite nicely! (As below)


However, the first challenge came when I put some white, rectangular obstacles in the game. My poor Blue was not able to go through or avoid these rectangles to approach her target. She just kept going straightforward or stuck in moving in a position if colliding with anyone of the rectangles, whereas, what I expected her to do was to avoid the obstacles and go to the target wisely. (As below)


Since the game version uploaded on itch.io is quite simple, feedbacks from other players in my class on it were nothing except two about my Blue's moving in standstill, which was similar to what I mentioned above and one complimenting on her style (I love it, too!).

I also had a chance to discuss the mouse-click control idea with one of my classmates. His comment on it was that it would become quite complicated for players if they were playing at a high level. Players would get confused and get frustrated while they had to use three different mouse buttons at the nearly same time ( may also make their mouse broken faster :D). Hence, I considered an alternative way to make Alice move but not use the right mouse button. Another way for Alice's movement is that she can be directed by using A, W, D, S, and some other keycodes for cooking or discarding ingredients. However, I will compare this controls to the initial one to see if it is a more effective idea or not. Also, a solution for the current non-pathfinding will be applied and stated in the next devlog. Cheers!

Files

build.zip Play in browser
Sep 10, 2020