January 06, 2018
My kids and I like to play with Nerf guns. My younger daughter in particular likes to sneak up behind people and shoot them in the back. She’s devious like that. While running around and shooting each other can be fun, it does start to get a little boring after a while.
So, we started to implement rules and make more of a contest out of it. We started with a little capture-the-flag, but that was still a little dicey, certain members of the family would either really want a particular stuffed animal to be the flag, while others definitely didn’t want that one to be the flag ever ever ever ever.
I was familiar with a simple game mechanic of capture points. Each team flips over a card-type thing to their color and they get points for that. The more capture points the better — it keeps everyone moving. If you get shot, you have to go back to your re-spawn point and start over. The catch was that keeping score was too tricky without some kind of impartial observer.
Being the coder that I am I whipped up something quickly for iOS and called it Red/Blue, for the two teams it had. It’s a basic premise:
This worked pretty well. We ended up pulling out old iPhones and iPads and laying them on flat surfaces and threatening all kinds of trouble if one of the kids moved or picked up a device. Ultimately we had four control points which led to all kinds of mayhem.
One thing we noticed was that it was annoying to start a round with the four control points we usually played with. Everyone would have to be by a device to manually start off each timer. A quick googling revealed that Multipeer Connectivity is pretty easy to pull off. Another hour of coding and now all of the devices will start off when the first device hits start.
I do not plan to submit this to the app store. I just don’t want to have to deal with it. The code is under an MIT license, so that you can do whatever you’d like with it.
RedBlue.xcodeprojfile in Xcode.
I may add other gameplay modes. Some sort of King of the Hill mode may be interesting, or chained control points (point 2 isn’t enabled until point 1 is captured), or any number of other things, but I don’t know if I’ll ever get to that.
Written by Scott Williams who lives and works in sunny Phoenix, AZ. Twitter is also a place.