I created a Boggle clone in Platino this weekend, check it out!
Most people are familiar with Boggle, or at least the general genre of “make words out of these tiles”. (Is that a real genre? It is now!)
Due to other commitments I hadn’t had a few solid hours to sit down and start really getting to grips with certain elements of Platino until this Sunday, when I sat down for a few hours and put together the Boggle clone you will see in the video below. (Along with a tip for early Platino beta access – if you’re comfortable with bribes, of course )
After sharing a 6 second Vine video, a few of you asked me questions about my little Boggle clone and Platino in general – let’s get those answered!
Q: How long did this take you?
A: A couple of hours, probably around 3-4 once you subtract the time spent distracted playing with Particle Designer (awesome tool!) and trying to locate one of my many missing pre iPhone 5/iPad Mini connector cables.
Q: How are you loading in the word list?
A: It’s a plain old txt file with around 180k words, one word per line. It’s some official Scrabble list I had floating around from a previous project. I read the file and add the words line by line into an array. The speed that process takes is mind blowingly fast.
Q: How are you checking the entered words?
A: Another for loop traverses the array, looking for a match.
Q: Is it slow to get feedback on a word further down the list then? A “Z” word rather than an “A” word?
A: Amazingly, no. There is no difference that I can discern, and I’d challenge any other human (I’m sure there is some difference a computer could of course pick up) to say otherwise.
Q: How hard was it to implement particle effects?
A: It took literally 2 lines per effect. (Seriously.)
Q: How does it run on device? Will this work cross platform?
A: It runs consistently with the performance you see in the simulator and works fine on Android with no special allowances in my code whatsoever.
See the picture below? That’s my Boggle clone running on a Nexus 10, iPad, iPod Touch and iPad Mini. I also have it running on an iPhone 3GS, iPhone 4 and iPhone 5.
One other question I’ve been asked is whether or not I will be making a video tutorial for this, as I did with my previous Boggle clone – I’m not sure yet.
I can tell you that you will be able to get your hands on this soon, when Platino is out of private beta – but whether that is as sample code, a template, a series of written tutorials or a video tutorial remains to be seen; but one way or another yes, you will be able to get your hands on it.
The other thing that will come from this is a tutorial or two for Titanium; reading in a file line by line, checking a word against a list and loading files.
On that note, I’m actually in the process of porting Ego – those of you who used it previously will recall it allows one line saving and loading of files. It currently works with Platino and therefore Titanium, so I look forward to sharing that with you once I’ve cleaned it up a little as well.
Until next time,