My first entry for NANY 2011 is: WhirlyWord
This is a simple puzzle game based loosely around mating Scrabble with a slot machine. Spin the reels and try to make the words shown in the list.
- Why were the NANY applications coded? (I mean why decide to code this particular app)
I fancied doing a simple game again this year after I had quite a lot of fun coding up Twigatelle for last year's NANY. I wondered if I would be able to re-create the effect of spinning reels in a nice way, from scratch. No doubt I "discovered" a very standard way of doing that trick, but I get some satisfaction of trying to solve these things myself.
- What IDE did you use, if any?
I used IntelliJ IDEA from JetBrains. It's a Jave IDE I've used for years now: I'm very comfortable with it, and I find it about the nicest IDE I've personally tried.
- What language(s) is the application written in?
Java, and is launched using Java Web Start from my site
http://head-in-the-clouds.com- Does it rely on any 3rd party libraries / code / graphics?
All of the code is my own.
The graphics are all generated on-the-fly, using procedural textures that I developed last year for Twigatelle, or in the case of the reels, simple text with filters on top.
Didn't even borrow any icons for this one
- Were any clever design principles used?
Not really. Java 2D was not too bad to get going in the first place, and I lifted a lot of the Twigatelle code for the basic animation of the reels. Being Java, the code is reasonably object-oriented, a bit verbose but easy to maintain.
It's probably about 20,000 lines of code, although the main game loop itself is probably only about 10% of that. It's all the faffing about with loading resources, creating textures, beziers, particles etc. that add up.
- Or any really hairy algorithms that you'd like to boast about?
The only "clever" thing that I think is worth mentioning is the motion-blur on the reels when they are spinning. I was pretty pleased with the effect, as I may have mentioned
- What was the trickiest part?
Getting the dictionary in place. In the end I wrote a little sub-program to find seven letter words that had at least 120 valid anagrams each, pulled from a public domain word list.
- Would you like to make a mention of any other DC members who helped out?
There were some nice messages from a few folks, and, in alphabetical order, I would like to particularly thank Cranioscopical, Deozaan, Mouser, and Stephen66515 who all made suggestions that I feel improved the game.
I also want to thank Perry one more time, since he worked so hard on keeping all us "nanyteers" organised.