Having heard all about the rave of Plants vs Zombies in the mobile gaming world, and that Microsoft have backed the game to be top 6 games, I had to find out yourself why this game got some commotion and praise.
The simple tower defence game entails you to set various plants on the outlay of the garden to block hordes of zombies going along the same of line of path to the house, you have to prevent them from entering and strategically put them for them to fire projectiles (flower power I guess) to the kill the zombies after several attacks till they simply drop and fall apart.
Even though I had thought that graphically, Popcap had made it as simple in design as possible in terms of cheery cartoon visuals I thought they have bitten off more than can chew (excuse the pun for the title), but I was wrong. The thing I like is that it is simple as possible, the menu at top to select sunflowers, pea shooters and cherry bombs, and other plants are clear and simple, with the notion that 100 sunshine items gives you another plant to purchase to place in the garden. I thought that maybe too simple but the faster the sunshine drops, the quicker you need to place convert these to plants and place them on the garden (if you are too slow, you're gonna get bitten and infected, not literally).
The thing I like is the sheer simplicity of it all which is why it is my top 6 Windows Phone games, the instructions are brief and clear even the storyline is so ever simple, and you can see how many zombies you need to attack at the start of each stage. The thing that entices you in, is the fast pace action of it all, and the quirkiness of the enemy zombies which they are dressed as leading protesters holding signs up, to wearing eighties' back-up dancer leotard's, the light humour of it all even gives you the happiness to possibly hug the zombies rather than destroy them.
For the arsenal, the various plant types you can do to attack such as daisies in the first stage, to cacti and cherry bombs that make the attacks very interesting like blasting zombies to smithereens usually ending in a nasty mess, and there's even wall-nuts to block enemies to go further to save you time.
Achievements are easily viewable in the game and attainable as well linking with Xbox achievements like Soil Your Plants for planting ten peashooters to Explodonator for planting 10 cherry bombs that explode successfully.
The other thing is the multiversity of strategic gameplay, you can place the pea shooter attackers to throw projectiles to the back so they can attack further without being eaten whilst the sunflowers can be near the front, and you don't know where to see the zombies walk on which path so its all guesswork, and whether you wait 1 minute more to get the more devastating attack plants, it's this open end style to gameplay which makes the game worthwhile.
All in all, the game is brilliantly poised.
Thursday, 7 July 2011
Plants vs Zombies review
Wednesday, 6 July 2011
Isolated Storage Tips #3
It has been a while since I wrote more Isolated Storage Tips, so I am going to explain a bit more about the various useful coding implementations in Isolated Storage in terms of creating text files, writing to it, and then later reading that data and appending to it.
Here is the code: -
using System.IO;
using System.IO.IsolatedStorage;
using System.Windows;
using Microsoft.Phone.Controls;
namespace WP7IsolatedStorage
{
public partial class MainPage : PhoneApplicationPage
{
// Constructor
public MainPage()
{
InitializeComponent();
}
private void btnSave_Click(object sender, RoutedEventArgs e)
{
string fileName = "mytestfile.txt";
using (var isoStorage = IsolatedStorageFile.GetUserStoreForApplication())
{
// 0. Check to see if the file exists
if (!isoStorage.FileExists(fileName))
{
// file doesn't exist...create it.
isoStorage.CreateFile(fileName);
}
// 1. As we are appending to the file, we use FileMode.Append
using (var isoStream = new IsolatedStorageFileStream(fileName, FileMode.Append, isoStorage))
{
// opens the file and writes to it.
using (var fileStream = new StreamWriter(isoStream))
{
fileStream.WriteLine(txtText.Text);
}
}
// 2. Cannot read from a stream that you opened in FileMode.Append.
using (var isoStream = new IsolatedStorageFileStream(fileName, FileMode.Open, isoStorage))
{
// opens the file and reads it.
using (var fileStream = new StreamReader(isoStream))
{
txtCurrentText.Text = fileStream.ReadToEnd();
}
}
}
}
}
}
In point 0, we have created an IsolatedStorage File object that creates and holds the physical location of the Isolated Storage, and we then check if a current object file exists, if it doesn’t then we can create a new one.
In point 1, once we find out the file exists, we open the file which we called the object here isoStream, and set it to FileMode.Append which we then use the StreamWriter class to write to it. It is then, the contents of txtText.Text is stored into the object isoStream, where that line is appended to the file.
In point 2, finally, we have to use the using annotation again as you cannot read whilst appending. We then set the StreamReader, and use the code fileStream.ReadToEnd() to read the whole file, and place it into the txtCurrentText textbox.
Monday, 4 July 2011
How to redirect to error page in view?
Recently I made a forum answer post to how you can redirect to a customised error page in ASP NET MVC 2 for error pages?
Here is the answer: -
<customErrorsmode="On"defaultRedirect="CustomErrorView" >
<errorstatusCode="404"redirect="Error/Error404" />
<errorstatusCode="500"redirect="Error/Error500" />
< /customErrors>
The controller:
public class ErrorController : Controller
{
// Return the 404 not found page
public ActionResult Error404()
{
return View();
}
// Return the 500 not found page
public ActionResult Error500()
{
return View();
}
}
This could be done with a static page if needed:
<customErrorsmode="On" >
<errorstatusCode="404"redirect="Static404.html" />
< /customErrors>
The link to the forum post is http://forums.asp.net/t/1693685.aspx/1?How+to+redirect+to+error+page+in+view+
Friday, 1 July 2011
Free icon set for GUI designers on WP7, Android and iPhone
I wanted to make a blog post on some really good simple toolbar icons in particular for the WP7, and I have found a few of these.
First is the Noun Project which has a “Metro” themed design style to the icons, it is a collective collaborative effort by designers that uses free pictograms and icons and contains so far 500+ icons in the “Metro” theme. It is run and community funded by www.kickstarter.com (the largest funding platform for creative projects) which the CEO (Perry Chan) gave some really insightful talks at the Guardian Summit (thumbs up to them). It is called www.thenounproject.com and its funding is going really well at $14,366. You get a free t shirt of 3 icons of your choice if you fund them of over $30.
The other is Gentleface Toolbar Icon Set made for GUI designers, it is along the same vein of “Metro” styled icons with 8 sets of cursors and 296 icons in black and white versions. The free version gives away the entire set totalling 304 original icons in 32-bit PNG format optimized for 16x16 pixel size and available in 16x16, 32x32 and 48x48 pixel sizes. This is given as a license for the Creative Commons as a non commercial product but if you want the royalty free license which includes .eps and even Flash SWF formats, this costs $29.99 if you want to use these commercially. See http://www.gentleface.com/free_icon_set.html.