Developer’s Update 9 April 2018- Charlie

During R5-2018 I have completed 2 issues, #205 and #304. In #205 I had to change the button name of edit to save, and in the message section, when a player is holding an avatar, then the name of the message should be the avatar name of the current holding avatar. This issue took me a while before I got the right solution. I had an idea that this should be something to do with the process when the message is saved in the database. My initial approach had worked partly, when player is holding an avatar then the message name is reflected as their current avatar’s name, however when the page is refreshed then the message name is back to the players username. Dug a bit deeper into the code and relised that I could have another variable to the database to save the nickname of the player at the time when they send the message, if they are holding something then the name of the avatar should be saved. By using this method, I was able to get the message name to display avatar name if they are holding and if they are not holding then the message name would display as their username.

 

After finished that issue I moved on to #304, which is adjusting the avatar size and to be reflected to everyone immediately. Was a little puzzled on how I could achieve this, I was initially thinking using animation but couldn’t find any useful information online to help me code, then I thought that if I wanted to make if effected immediately then I should just draw it each time I change the value. By redrawing image when the value of the slider is changed it worked quite well but it was not smooth transition as the scale was small. So, I change the scale so that it would adjust more smoothly.

 

These two issues was quite challenging but putting more time on it had defiantly help me to get it finish.

Leave a Reply

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