Flappy Bird-Like Games & Swift Countdown

Seems to me like everyone and their cousin has a Flappy Bird knockoff on the app store. Call me slow on the uptick, but I only recently discovered that App Flipping existed. I don’t like the industry or the approach. But I can’t deny that if someone makes a buck flipping apps–then they’ve–made a buck (I guess)? The thing is, I don’t know if it’s because Flappy Bird is easy to make, there’s a ton of tutorials that teach people how to make it, or if there’s just a lot of abandoned source code for it out there. But it’s like a 1/10 chance (not scientific) that when you look a dev’s portfolio, they have some kind of Flappy Bird thing.

Of course, there’s also a ton of tutorials out there that pretty much show you from start to finish how to make a game just like it. I found this one to be one of the better ones (Obj-C): Learn to Build Flappy Bird by MakeSchool.

Countdown Timers for Swift/Spritekit

That’s not what I worked on today though. I was actually working through building a countdown timer as one of the small components of one of the games we’ve been working on. The point of it was to start the countdown and delay the code when the user reaches a certain screen. Initially, I tried to make the countdown by just using NSTimer and was having all kinds of errors pop up and once those errors were addressed, I still couldn’t get the timer working. I then used GCD (Grand Central Dispatch), which evidently ignores some components in a game’s pause state.

Probably the best way to learn is by making mistakes, and building really bad code. Then going onto StackOverflow and discovering a much better way to accomplish what you were trying to do and then realizing you were wrong for the last week. After the self-defeat washes away, you plug in the code and proceed to understand every single character in it as well as the theory behind it so that the next time you want to make a 58 line countdown timer (I know, I know), you’ll realize that you weren’t thinking about it hard enough.

Here’s the code that helped me get to where I needed with the countdown: Pausing a Scene with SKAction for Swift/Spritekit

In other news related to the app, I just finished the last of its over one hundred graphical assets and I’m looking forward to putting those together and seeing them actually working in the app itself. We are going to be tackling the data handling next so I’m sure you’ll be hearing about that soon.

Resources

Some of the stuff I looked at this past week…
SKAction Documentation (Apple)
SKAction.waitForDuration Troubleshooting on StackOverflow
Fetching Data from the Web With Swift (Trivia App)
The Mobileys
Marketing an App Infographic


Posted

in

by