5/22/15 – Adam Shaw

I started the day by spending about 25 minutes setting up my work station so in what I considered the best way possible. In the end I had two monitors for code, and one monitor for Chrome, which worked very well throughout the day, and I’ll definitely keep it up in future days. After that I just turned my attention completely to my 2048 clone app. I made a TON of progress today, and am really really happy with how it has come along. Yesterday, I left when it spawned in a given number of squares, but didn’t actually do anything with them. Today I started off by remaking some of my assets to make the a little bit clearer, and creating new assets to use as a background grid so I could get my bearings more easily. I implemented some more extensions to the Array base Object, as well as added some new functions to TileColor. I also had the problem of how to copy/index from my Array2D class, so I spent some time writing helper functions for those. I then went to my level class and remade my system of adding tiles so it would work with my plans for animations. I then added two methods, one which executed an upwards swipe and one which executed a rightwards swipe, and both were invertible given a passed in parameter. I spent some time in the playground before approaching those functions so I didn’t have to troubleshoot faulty code using my own Objects, and could instead test with integers. I then implemented the tryTileMovement method in my GameScene class, which allowed the transitioning to happen. I spent a ton of time trying to make the animations, because they were quite buggy, but I settled with simply destroying old nodes and recreating new nodes in the correct place. I am fairly certain I know a way to do this with a gradient time step so it would be animated, but I will leave that for another day. I also implemented the tileCrunch class, and fixed various bugs, so now my app is basically complete. The only things left are adding smooth animations, and I also need to correct it so that it doesn’t spawn a new block when a non-viable swipe was made, but I don’t imagine that will be too hard. I’m going to spend a few minutes commenting so I can get back to it quickly on Monday, but for now I am quite pleased with what I accomplished today. I definitely understand Swift much better than I did even yesterday.

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