Developer’s update 20 March 2018 – Thong

Hi everyone, this is the end of our sprint 5. Since my last update, I’ve worked on issue 275 which is to fix the avatar distortion bug. It took quite a bit of time to find that the bug was actually caused by passing width as height and height as width in the drawImage function. I’ve also made the size method get called after dragging the resize slider for the avatar. The resize method still can improve, but it was out of the scope of this issue. It will be implemented in the future as smooth or instant resizing features. I’ve also fixed the bug in issue 273 which didn’t display the avatar the first time being placed on the stage and when a player drops the avatar, it still shows on the audience view. Placing avatar issue was caused by getting the image height and width before the image actually loaded. Now the height and width calculation is being moved inside the image onload method and that fixes the issue. For dropping avatar, the audience didn’t get the update because when the drop button is pressed and drop method is being called, it queries for the image button in the avatar list. Since the audience didn’t have these and the tool palette, it caused an exception and skipped the rest of the code which is to clear the avatar array and redraw the canvas. So, I’ve moved the clearing and redraw the canvas to the top and put the rest of the code after checking if there is a tool palette. That way, the avatar will disappear from the stage when it’s being dropped and there won’t be any exception too. In sprint 4, I’ve fixed the issue 269 on where the player had to drop the currently holding avatar before they can hold a new one. This issue allows the player to hold an avatar that isn’t being held by any other player. If the avatar is already on the stage, it won’t be removed and will simply switch your control to the new avatar. If you’re holding an avatar, it will be disabled and can’t be held by other players. When it’s being dropped, it will be removed from the stage and anyone can hold it. In the same sprint, I was working on issue 285 where the backdrop should stay in proportion when the window is resizing. First thing I did was fixing the resize window listener so that resize method will be called when the screen size is changing. Then I fixed the distortion bug in drawing the backdrop. However, the scope has changed for this issue that everything else including the chat box and tool palette should resize relatively to the backdrop too. I will be working on the improvement for this in the next sprint.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.