Day 7, May 27 – Vidushi

I completed the tutorial for a Candy Crush-like game today. The latter half of this tutorial is instructive in a very different way than the first half, since the problems I encountered the most were problems of the tutorial assuming I knew how to do something when I didn’t. I also had occasions of thinking I knew how to do something and finding out that I didn’t! In particular, this included interactions between the storyboard and the code, since the outlets that connect the two take many different forms. For example, if a button is pressed on the screen, connecting that event to a particular function in the code can be done in many ways, and I had to learn a new way in the process of finishing this tutorial.

 

Besides this, the other useful things I learnt today were a whole lot of animation and integration of outside features like music and images. How to get music to play in the background, how to use external images one over another, and how to make an image appear only in certain places and not in others — using layers and masks — were among some of the ideas this second half uses. There were few new “Swift things” I learnt today; the only one I can think of was discovering that we can make properties “lazy” so that they are only computed when they are needed. The game isn’t perfect — there is still a strange bug and I’m not very happy with the graphics — but I think it’s done for now. As always, all my code is on GitHub. Since Adam suggested that building his own game was helpful for him, I might start there tomorrow.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s