You might be familiar with the Vex Robotics competition. This year I thought it would be great to create an iPad app to aid in the somewhat complicated scoring process.
This app was a lot of fun to make! Currently, the flow is something like this:
- When a piece is set down, we get the color of the piece and whichever goal it’s intersecting (if any).
- We reset every score to zero temporarily.
- We increment one to the color’s score, and if it’s the first one in that goal, we add an extra point (with the exception of the first 4 goals).
- There are NSArrays for the goals, the red pieces, the blue pieces, the negation blocks, and the doubler blocks, which allow us to run through every situation possible with a couple of simple nested for loops.
- We update the label, displaying the score.
I’ve made some really good progress on the logic of the program, as well as learning a few new tricks. Did you know you can store NSObjects in regular C arrays by creating an array of “id” objects? I didn’t. Though you do have to cast them as whatever type of object you actually put inside of them for it to work correctly. Anyway, revisions added, and I should be submitting really soon.
It’s been a while since I’ve made an update, but the app is done and submitted as a free app to the app store! I’m currently at the Vex Robotics Worlds competition, so it will definitely come in handy.
And here’s a little bonus – the app has Retina Display graphics! I spent a couple extra hours updating all of the graphical elements. It’s looking fantastic.
I think the best part about this app is its interface. Instead of manually entering how many red and blue are in each goal, and marking which was scored first, you can simply drag and drop game elements. There’s no need for any more complexity.
It’s in the store! Somehow the version I sent in had an icon issue (I checked literally about 5 times before I submitted it), so, hrm. Icons.