Archive for July, 2010

Google Sites: setting an icon

Custom icons on a goggle site is possible. Point your browser to http://www.genfavicon.com/, upload a picture and select the 64×64 size (this is supported by google sites). Pick out your favourite part of the picture, then download the ico file.

Now you will need to upload the .ico file into sites. Load up the site, go to ‘More Actions > Manage site > Attachments‘ and upload it there. If there is an existing favicon.ico then you will need to write over it. Once you have uploaded and save, refresh the page and bam; it should be there with your new favourite icon!
You can also use photoshop to do it, create a 64×64 image, and download the save as ico plug-in from telegraphics.

Android Development (from noob, to less noob) pt1

For the past week I’ve been making an android application on my fancy Desire phone running Android 2.1 Google’s phone operating system, manufactured by HTC from the Telstra Network (throwing in company names there in case I can get some free shit from them). It’s basically a contact list type application so that you can contact people within the organisation without needing to add them to your phone contact list, separating your personal contact list and work contacts. I feel that there the function of separating your person life and work life is very important, especially when your best friend’s name is John Miller and your boss’s name is John MacIntosh, a misclick and understood message could get you into a life of strife. I also don’t see the usefulness of having work contacts in which you only need to call Mon-Fri taking up space on your contact list. So essentially the loose brief for this app  is to create a contact list of people within the organisation.

I’ve never really developed anything useful before, or outside of university life. The software development cycle is a conceptual idea to me and I’ve never really live through it. However, upon returning to the lifestyle of work and/or working for ‘the man’, I’ve had to make sacrifices and do what ‘the man’ tells you to do. Which includes returning to the spiteful days of using java… (I remember those days. It was a dark world out there).

Of course, being Google technology, there’s a LOT of tutorials out there. This is great to start learning the android environment, the java coding complexities, and understanding how everything works. There’s also the assumption you actually know stuff, things, whatever. If you’ve been out of the loop like me, then well… you’re pretty much screwed. So what I really wanted to write was a somewhat meaningful post about my experience with the android platform and creating a noobish application for it, in terms that the local Penshurst butcher could understand (maybe there’s free sausages for me).

To begin with, you need an IDE. I don’t know how anyone can deal with Java without an IDE (Integrated Development Environment). I would say it’s impossible, and if someone actually manages to build applications without an IDE, well I have a new god to worship. In short, Java is confusing and an IDE is required. The IDE of choice is Eclipse, and there’s a reason for that. Google has been nice enough to give us a tutorial in how to install the Java SDK, Eclipse IDE and the plug-in’s required. You can find that link here, I see no point in reinventing the wheel. I will summarise it; you’ll need to install Java SDK, then get the Android SDK, install Eclipse, do some settings and install some plug-ins. Then you’re ready to tackle some tutorials.

To get anything working, you need to create an Emulator (also known as Android Virtual Device or AVD). This will create a window in which looks like an Android phone, so you can test your application. To do this, you need to install the AVD plug-in which you should already have, then in Eclipse go to ‘Window’ in the menu and there’s an option for the ‘Android SDK and AVD Window’. Here you’ll be able to create an emulator of an Android Version. I’m using 2.1 because it’s the version my phone uses, and the phones in the company are using. It’s safer to build something in earlier versions, usually applications are forward-compatible so this application would run on anything 2.1+ (including the new 2.2 Froyo build).

Now, if you wanted to run and compile something, you’ll need to point your application to that Emulator you just made. Starting an emulator takes a bit of time, it might look like it’s frozen but it is doing something. So that takes care of building an AVD and running/compiling an app. When compiling your code, make sure you have a .java file selected in your /src directory and not an .xml file, because often using the ‘Run’ command will compile just the xml and fails, making a .out.xml file or whatever. I’ve done this often when adding Activities to my Manifest file and not realising, and Eclipse will try to render the XML file and give you errors, and make a new .out.xml which you need to delete. This might not make sense now, but when the problem happens, you’ll be glad you knew this.

The Manifest file is important. I never really understood what the function of it was until I made something. The manifest file is an XML file that is automatically generated when you first create your android project. It does need tweaking however, for every Activity (Class) you make in your project, you need to write this into the Manifest file. Why? Well I believe the Manifest is the file that gives permissions, themes, labels and what-not to the Activity. Also, your application won’t compile without it, so if you’re stuck and wondering why your application doesn’t compile and you just added a new class, then this is most likely your problem. It also gives permissions to your app.  Once I find a good code snippet embedding plug-in for WordPress, I’ll post it below.

To create User Interfaces, you don’t need to create them in Java (thank god, gone are the days of swing!). You will make them using XML. You can find this in the res/layout directory. I would suggest playing around with the ones on the google android resource site, it has many examples of different views and the link can be found here. I’m a graphical user interface-y person and coding interfaces seems difficult for me at the moment, I am waiting on the App Inventor to provide me with a drag and drop interface builder in which I can then copy and paste the XML code.

So to finish up part 1:

  1. Install the SDK’s, Eclipse and the Plug-ins
  2. Create an Emulator (Android Virtual Device)
  3. Create a Project
  4. Ensure that Manifest file is kept up to date with your changes such as adding Activities.
  5. User Interfaces are made with XML

Applescript to show and hide hidden files in finder

Apple; some would argue are leading innovators of user experience. Why the fuck isn’t there an easy way to show and hide hidden files in finder?

Here’s an applescript to do that.

if (do shell script “defaults read com.apple.finder AppleShowAllFiles”) is equal to “0″ then
do shell script “defaults write com.apple.finder AppleShowAllFiles 1″
else
do shell script “defaults write com.apple.finder AppleShowAllFiles 0″
end if
do shell script “killall Finder”

ShowHidden.scpt

Microtransactions

The subscriber model has been the default model for payment in video games. Every MMO I can think of in the past few years have been using this model; you buy the game and pay per month (or block of months) to play the game and for a while, it has worked. However because of the popularity of WOW, new MMO’s are trying to break into the same market and aren’t being successful – it would seem that a majority of gamers aren’t willing to pay for more than one subscription to a game and rightly so – why should we be ‘bleed’ out money to play a game every month?

In the Eastern side of the globe, microtransaction model has been used and is very successful. What are microtransactions? Well, it’s paying a small amount (usually under 5 dollars or less) for something, maybe some points to buy new items, or a level or DLC (Downloadable Content). We’re seeing that the Western gaming companies follow suite.

There’s a few examples which I am playing at the moment; one of them being League of Legends. LOL takes a great approach to getting people to pay using microtransactions. There’s a lot of champions to play in this game (55 at the time of writing). As a non-playing player, every week you have access to 10 different champions – this is a great way to keep non-playing players interested by offering new champions to try out every week. If you really like a champion and would like to play them outside of the week, you can either use IP to buy then (earning IP as you win games) or pay money for Riot Points and purchase them. Having two methods of payments allows players have a choice to earn the champion or just pay for it. On top of this, there’s other things in the game to purchase, runes (to improve your champion) which can be earnt, and also if you’re one of those gamers who like to personalise things; some new skins for your champion.

Social Media games, such at Zynga networks, gives the game for free on facebook (or you can buy the app on iDevices). You get a set amount of turns for free, however if you want more turns to tend for your farm/mafia, then you can choose to pay money for these turns. I believe you can even pay just for levels, or weapons, or animals (I don’t know, I don’t play them). Either way, last I heard is that they were leaving facebook due to their changes in policy, and creating their own network called ZLive.

Digital Distribution networks like Steam also somewhat provide these gaming services, albeit differently. You don’t pay for an steam account, but to have any games on it, you purchase them. These bind to your account and you can change computers, play on your friends or whatever, as long as you are signed into steam and they download the game to their computer. Games can also be dual OS (Mac/PC); Valve providing support to their games, and you can freely change your OS and keep playing the games you already pay for. Steam always have some sort of sales on, you can buy bundles of games for a big saving rather than buying them alone, and if you already have a game you can gift it to your friends. Steam is very successful in being one of those digital distribution hubs – not only because of the cost/content but also the social aspect mechanism.

Real ID is something Blizzard is trying to do with their new revamped Battle.net, B.net accounts, and the coming release of Starcraft 2. You pay for the SC2 cd key, bind it to your battle.net account and freely play online SC 2 matches with it. These accounts also bind with your WOW account, so they’re providing some connection between their range of games. From inside WOW/SC2, you can see what friends you have online, what game they are playing, what character names and realms. Not so much to do with microtransactions but we can see a trend to social gaming, seeing all your friends playing SC2 will probably persuade you to think “maybe I should get this game because everyone on my friends list is playing it”.

Companies ultimately want to sell games, and need a new model to do it. Other MMO’s are coming up, and failing, because of the same old subscription model in which no gamer wants to pay per month, especially if they only play the game once or a twice a week. Microtransaction is this model, and the implementation will be the future of online gaming.