DemoBots sample code

DemoBots is THE sample code to see how to develop a fully-featured 2D game built with SpriteKit and GameplayKit.

I spent a lot of time analysing this code. Sometimes it helps, sometimes not of all. To understand some concepts DemoBots it’s too complete and too much.

So thanks to to post tutorials more specific for each parts of a SpriteKit and GameplayKit game creation.

Levels menu

I’m back! I needed a break. (I have to to learn a lot of things between Spritekit and Gamekit, and sometimes it’s too tiring and not much fun)

So I decided to code some UI navigation : the levels menu.



Learning, learning, learning…

Ok I’m still alive. Nothing visual to show for now. I understood the Entities-Components system, but now I have to practice before continuing. Not really fun, but necessary.

I think with the good architecture, it will be easier to implement the levels, traps, and powers… everything indeed!

A preview of my workspace:

LYT files

Learning phase: GameplayKit

I’m learning GameplayKit, and it’s Entities-Components system. I’m not very familiar with these concepts. I would prefer to start to code some gameplay stuffs, more fun to code.

But the rules to participate at the WWDC17 scholarship is to use as much Apple technologies as possible. So no choice… I’m learning like a little Padawan.

Message to myself

Just think to use Playground more often to debug specific parts of code. This is much faster than wait to build and run!

The difficulty in having an Universal SpriteKit game

Auto Layout in Xcode is very cool/useful, but Auto Layout doesn’t exist in a SpriteKit Scene. That’s sucks.

After doing some researches, this part of work is not obvious.

To have an Universal game is absolutely essential for my project. No way to avoid the difficulty. So many ways to approach the problem:

  • Should I implement specific levels for iPad? -> Too long/complicated, be realistic!
  • Should I keep the same grid for each level but increase the size of the cases to fill the iPad? Why not, but I had the feeling to have a kind of big zoom, and a grid easier than on the iPhone.

So I decided to keep the same ratio, and use border images on iPad to “hide” the blank area. I added a part of the borders on iPhone to keep some graphical consistency.

Not sexy at all.


To avoid ugly borders with no interest for the player, I decided to add a parallax effect. The foreground borders move faster than the background. I think to add later some graphical/animation effects.

parallax animation


Quick test on the countdown animation.


The first “playable” prototype

I finished a first “playable” prototype.

Gameplay: follow a path in a grid with a puck which falls with gravity.

I already started to address very specific problems (architecture, CPU…). I can already see many future problems, for each code line, I try to anticipate the next issues.

I showed this prototype to 4 friends. They understood the gameplay very quickly.

Let’s start

I’m Claire. I’m a French girl. I’m 32. I’ve been working in the iOS apps world since the launch of the 1st iPhone in 2007… And let me be clear, I’m a pro-Apple, since my birthday.

My challenge for this year, is to publish a new game on the App Store for the WWDC18. Why? I would like to participate to the WWDC18 scholarship as STEM organization member (I’m not a student anymore).

I decided to share my work every day with this blog, from the concept to the submission : progress, development, design, advice,  personal reflection, difficulties…

Ok let’s start guys!