Sunday, 12 October 2014

Smash Info App

The other week I bought a Windows Phone. It was just after the iPhone 6 had come out and everybody was getting those. So I walked into O2 after work, waltzed past the people signing out their lives for a contract for the latest in Apple's line of phones and asked for the Nokia Lumia 630. And a few minutes later I waltzed back out again.

I've been wanting to develop for Windows Phone for a long time. At Uni when we learnt about XNA, there was an option to export for Windows Phone (I had something running, but only had an emulator to test it on). Sadly, XNA is not an option for WP8. If it were, I can guarantee I'd be starting a hell of a lot more projects on it (finishing them is another matter).

Super Smash Bros. for Nintendo 3DS launched the other week and it comes with a list of Challenges you can complete to unlock some extra content (this extra content is mainly trophies, music and moves to add to your custom characters). I wanted to create a tracker for myself in order to keep track of what I had and hadn't done outside of the game. That way, I could use the tracker and plan things out before jumping straight into the game. Ironically, development of this has meant less time playing the game and therefore less time attempting these challenges.

I kept the design really simple. It's my first Windows Phone 8 project so I didn't want to go overboard with it. I do like creating things in WinForms since it's quite easy to lay stuff out in but WP8 has an Android-esque feel to it which I'm not overly fond of. I did expand on the idea for just challenges and included information about characters and stages too.

The category page. This is specific to the 3DS version - the Wii U version currently contains just Characters and a Coming Soon button.
From the front page you select the platform which then takes you to select your category (Characters, Stages and Challenges). The first two take you to a page which generates a list of buttons based on an XML file containing data relating to characters and stages, and whilst Challenges also uses an XML file, there are always 35 challenges on a panel so each button was defined up front. Whenever you click a button on any of these pages, it will then take you to an information page which works out its information based on the XML file and the data inside the button you just pressed.

The Challenges grid. There are 35 challenges per panel, and 3 panels in total. The buttons at the top cycle through each panel and the rest take you to the page that contains data about that challenge.
After creating the Characters XML file, I decided to do a side project to assist in the development. So I went back to trusty old WinForms and created an application that lists each member of the XML file and shows information which can then be edited. As I hadn't yet created the Challenges XML, I also added a button which allowed me to add a new entry as well.

An excerpt of code that creates a button for each character in the XML file and then adds it to a list. A button click event is also defined
The WinForms application isn't perfect - it could be made more user friendly as you have to know exactly what you are doing otherwise you can accidentally overwrite data (especially if you click Save instead of Add). There also aren't any fail safes if you enter data that isn't allowed for an XML file. So if you were to add an ampersand into a textbox, hit Add or Save and then click on that item in the list, the application would crash. In fact, in would probably crash before that point but I haven't tried that to verify. The main thing is that it works and fits its purpose so I'm pleased with it, especially for a side project. It's not meant to be perfect.

The editor also has a search feature to easily filter through the list. Here is a list of all the Pokémon characters.
I may eventually upload the editor and its code for people to take a look at, but not just yet. The WP8 app has been published (I had only just submitted it before I started writing this post; that was fast!!) but will require an update for when Super Smash Bros. for Wii U launches. Of course, it's out in the UK 2 weeks after its launch Stateside so I'll be relying on the internet to gather the information about character unlocks and challenges. I was also thinking about implementing trophies but that could be a nightmare to do regarding images. Initially only characters were going to have images but all 3 currently have support for images (only challenges do not have them available just yet).

I had planned to develop an Android version too and release them both at the same time. I still intend to develop the Android version, but as for whether I opt in for using Layouts, or I use my own Android engine I have yet to decide.

The WP8 version is available on the store now.