Nexus 7 Poetic Case Review

A few days ago I finally had a case delivered for my Nexus 7. I say finally because I’ve had the device for over a month now and been without a case the whole time. I start Uni next week and plan on using my N7 for taking notes in lectures, so a sturdy case is a must have to keep it nice and safe in transit. I’ve had the case since Monday now so have decided to do a bit of a review.

Deciding on a Case
When choosing a case there were a couple of things I was looking for:

  1. No Bezel Coverage Please. I didn’t want a case which covered the bezel of the device right up to the edge of the screen. The main reason being that I think it ruins the sleek look of the N7, but also, it may get in the way of touch input when touching the outermost parts of the screen.
  2. Protectiveness. There are some cases out there which look the part but will only protect the device from light knocks and scratches. An example is the official Asus case. I wanted a case that can withstand some quite hard knocks and drops.
  3. Cheapish. Finances are a bit tight for me at the moment, as they always are in the first Semester, so price was another big point in my decision process.

The Chosen One
So, with these points in mind I hit amazon and looked for a case. As well as using Amazon I also used r/nexus7 to check out what people were saying about various cases. Anyway, in the end I decided on this Poetic Case.

It fits my criteria perfectly! It has no leather covering the bezel of the device, it looked pretty tough, and it cost £13 which seems like a reasonable price.

This Poetic case can also be found with some different brand names (I believe there is an identical one branded as IVSO) most of them pretty much identical in appearance and price. It has the smart lock thing incorporated into its design too which is pretty cool. Another cool feature is a hand strap, which you can put your hand through when holding the device in one hand whilst playing a game, leaving your other hand free to tap and swipe away.

First Impressions
Fit
One of the first things I noticed about the case was how nicely the Nexus fits into it. It is a snug fit which is more than tight enough to hold it in place, but not so tight that it feels like the device will break before the case let’s you take it out. The device is held into place via 6 brace like things which come up from the back of the case: one in each corner, and then two more which help keep it in place when using the stand.

Here you can see the 6 “braces” holding the device in place. The four corners, and then one on the top and bottom which help keep the device in place when using it stood up. Note: The other black thing on the right is a stylus holder!

Stand
The case stands up in quite an unusual way; at first I thought I’d been given a faulty one because I didn’t understand exactly how it works. Here’s a picture to illustrate what I mean:

You can see here that the back of the case folds and the device rests into a ridge on the front cover.

Basically, you take the left side of the device (when held vertically) out of the corner holders and then bend the back of the cover so that you can then place the side of the device into one of the ridges on the inside of the front cover. This might seem like a bit of a faff, especially considering most other cases just have the front of the case fold up under the back of the device to stand it up, but when you consider how little you’ll be doing this you realise it’s not really a problem. Although the case does stand up, it only stands in landscape and not portrait. Some cases do offer both landscape and portrait standing options, although I think the only reason I’d want to stand the case in portrait it if I’m reading an eBook or PDF and want to view a whole page at a time; other than this landscape suits most needs, for me at least.

Smart Cover
The smart cover feature is a pretty cool feature similar to what you can get for the iPad. When you shut the cover, a small magnet let’s the device know and the screen is locked and turned off. Then, when you open it back up, the magnet being taken away turns the screen back on, just like magic! I’m glad this case has that feature as it’s only a magnet so it can’t be that much expense, and I don’t think I’ve seen many cases (no matter how cheap) that don’t have this feature.

Toughness
The braces that keep the device in place seem like they’ll offer a decent bit of protection against light drops, the only downside is that parts of the device are left bare around the sides which leaves those sections open to scratches from keys/loose change/whatever may be in your bag at that time. If you get this case I’d recommend not keeping it with anything that could scratch it. Despite this, the screen is still well protected from pretty much any kind of damage; the cover is sturdy and soft on the inside so the case itself won’t scratch the screen.

Summary
To summarise: this case is excellent, not just for it’s price, but in general it’s got everything I could want/need. Not only does the case look the part, but when holding it feels sturdy, and I’m confident that if/when I have an accidental drop it will protect it’s precious cargo more than adequately! If you’re in the market for a case I’d look no further, you should get this case whether it be the same brand or another.

Looks great I think! The black strap you see can be used to hold the device in place better when you have the front cover folded behind the device and not using the stand. It works OK but covers a little bit of the screen.

Advertisements
Tagged , , , , , , , , , , ,

Simple 2D Cave-like Generation using a Cellular Automaton Method.

The other week whilst having a break with my girlfriend’s family I came upon this blog post, which discusses the use of something called “Cellular Automaton” for Cave Generation. I was immediately intrigued by the title because it kind of fits in with my Final Year Project (Procedural Generation of Planets). In preparation for my project I’ve been doing a bit of research into PG (Procedural Generation) but hadn’t, until now, implemented anything. So, after reading the aforementioned blog post, I decided to actually create some code!

A Brief Intro. to Cellular Automaton int his Context… by a Noob

I really can’t compete with this, so for a decent understanding of CA you should really have a read of that post. However, I will give a quick overview of how it works in the context of this post.

Basically, say we have a 2D grid of cells (each being represented by a single pixel) all with only two states: Dead or Alive. An alive cell will be black, and a dead cell will be white. Now, in a pass of Cellular Automaton there is a rule for the conditions needed for a cell to be “Born” or to “Survive”. This rule is often given in the following format: Bx/Sy where x and y represent the number of alive neighbours around this current cell. When we talk about neighbours we refer to the eight neighbours of a cell:

Image showing the 8 neighbours of a cell.

As an example: B23/S45 would mean a dead cell is born (becomes alive) if there are 2 or 3 alive cells out of it’s eight neighbours (counting diagonals), and an alive cell survives the generation if there are 4 or 5 neighbours alive. Simples.

So, it turns out this method is a great way to make procedural rogue-like 2D caves.

My Implementation

For my implementation I used C++ with The CImg Library which I had never used before (turns out it’s really simple to use).

So let’s start with the function that does the good stuff.

void cellularAuto_B678_S345678(CImg<unsigned char> &image)
{

I’ve called the function after the rule I’ve used just so I can recognise it a bit better. What I want to talk about here is the CImg<unsigned char> &image part. In the CImg library an image can be represented by many different types such as longs, chars, ints, but char seems to be the most commonly used so that’s what I went for. So here we’re just passing a reference in to the image we want to perform the algorithm on.

for(int x = 0; x < image.width(); x++)
	{
		for(int y = 0; y < image.height(); y++)
		{
			if (x==0 || x==image.width()-1
				|| y==0 || y==image.height()-1)
			{ //set-up border up
				for(int c = 0; c < 3; c++)
						image(x,y,c) = 0;
				continue;
			}

The first thing we do is set up a one pixel border around the image so our cave is closed around all edges. If you look at the for(int c =0; c< 3…) loop what’s happening here is we’re looping through each channel of the pixel at (x,y) and setting it to be 0 so the final pixel colour will be black and thus an Alive cell. Once we’ve done this we continue on to the next iteration of the loop, we needn’t do any of the actual algorithm on this cell because it’s just a border.


			if (image(x, y, 0) == 255)
			{//if this pixel is currently dead...
				switch(countNeighbours(image, x, y))
				{ //get number of neigbours
				case 6: case 7: case 8: //BORN!
					for(int c = 0; c < 3; c++)
						image(x,y,c) = 0;
					break;
				default:
					break;
				}
			}

If the pixel wasn’t a border pixel we come onto this part. Here we check if the pixel is currently dead, if it is we check if it can be born using B678 (B678/S345678 is a great rule for cave generation). If it can, then it is! Note I’ve created a separate function for counting the neighbours of a pixel, I’ll post this later on.


			else //pixel must be alive...
			{
				if (countNeighbours(image, x, y) < 3){ //DIED!
					for(int c = 0; c < 3; c++)
						image(x,y,c) = 255;
				}
			}
		}
	}
}

And finally, if the pixel is not dead it must be alive, so checks if it survives using S345678.

And that’s it really, that’s the algorithm that makes a simple cave. All that’s left is to set up an image to pass into this function:

int main(int argc, char **argv)
{
	srand( time(NULL));

	CImg<unsigned char> image(200, 20, 1, 3, 255); //Create blank image (w, h, d, ch, col)
	CImgDisplay main_display(image); //Create the display window

Here we’re just setting up the random number generator so it’s always random. Then we create an image using the constructor: CImg<T>(width, height, depth, channels, initialColour);
Then to create a display in CImg so we can see the image is as simple as above.

for(int x = 0; x < image.width(); x++)
	{
		for(int y = 0; y <image.height(); y++)
		{ //Loop through image pixels, randomly assigning dead or alive
			if (getRandInt(0, 100) < 45){ //~45% tiles "ALIVE" 0 = alive 255 = dead
				image(x, y, 0) = 0;
				image(x, y, 1) = 0;
				image(x, y, 2) = 0;
			}
		}
	}

This is the setup of the image. We go through the pixels and randomly assign them to be Dead or Alive. It turns out that starting with around 45% of the pixels alive gives the best results, changing this value by just 5% either way can make a big difference in the final “cave”. Again, we have to go through the channels(RGB) and set them accordingly.
And Finally…

	main_display.display(image); // display the updated image.

	image.save("cave.bmp", 0); //Save original image

	int count = 0;

	for (int i = 0; i < 5; i++)
	{ //Perform algorithm on image 5 times.
		cellularAuto_B678_S345678(image);
		image.save("cave.bmp", i + 1); //Save each progression
	}

Here we’ve updated the display with the newer random image and then we save this image. The second parameter in image.save adds a number onto the file name, and so cave.bmp becomes cave000000.bmp. The next bit is pretty self explanatory I think.

And voila! That’s it! Here’s an example of the progression of a 60×60 cave after 5 iterations:

A Gif of the progression of a 60x60 cave

Obviously this algorithm isn’t perfect, in the above example all areas are not connected and I’ve not looked into a way around this yet. The caves generated in smaller resolutions such as 30×30 are much more rogue-like and more likely to be mostly joined together. Here’s an example (sorry for the blurryness):

30x30 Cave

I also realized this method can be used (and maybe was used, I’ve not checked) for the generation of Worms-like levels like this one I generated:

A 200x20 Cave resembling a Worms level.

I’m thinking such images could also be used for procedural texture generation, I’m sure you could get a nice camouflage effect out of it if you experiment a bit with colours. This method is also expandable into a 3D world to create Minecraft like worlds, but first I think it needs some tweaking to make the caves flow a bit better and be more connected. Watch this space… I might just give it a go.

Tagged , , , , , , ,

Getting back into the swing of things.

So I haven’t blogged for quite some time, a really long time in fact. This is because of a few of reasons: (1) I wasn’t up to much and then (2) I went on holiday with my parents and girlfriend for a couple of weeks. Oh and now I’m enjoying another two week break with my girlfriend’s family. This hasn’t left much time for doing much programming or work towards my Final Year Project, so whilst on this current break I’ve started doing a bit of programming again!

I hadn’t touched C++ since finishing my 2nd year and so thought I best freshen up on what I know and even perhaps learn a bit more. At the moment my sole resources for this are cplusplus.com and r/dailyprogrammer. I’m pretty certain almost every C++ programmer will already know about cpp.com, I’ve found that whenever I google something about the language it’s often one of the first results.

screen cap of r/dailyprogrammer

r/dailyprogrammer is a subreddit where any programmer, no matter what language he/she uses, can get involved. Every day a mod will submit three challenges: easy, intermediate and difficult. These challenges are submitted by followers of the subreddit and can be completed by anybody feeling up to it. It’s a great way to keep your programming in shape as well as learning new things, not just by looking at other people’s solutions but also by the challenges themselves. You may find yourself learning new algorithms for many different things such as encoding/decoding. You may even learn things not related to programming; some challenges will be based around a subject you don’t know much/anything about so will need to go off and find the information you need. It seems like a really friendly community and I plan to take part more by posting my own solutions.

So to finish off, I’ve learnt quite a bit in the last few days from just looking at solutions on r/dailyprogrammer and looking up the things I didn’t know on cplusplus.com. As of now I’ve only completed one challenge myself, and it was an easy one. But I’m out of practice and I don’t want to throw myself back in the deep end, I’m happy enough working myself up learning new things on the way. I might start doing posts of new things I learn actually, I suppose it would help embed the knowledge in my head a little better by trying to describe it myself. I think it was Albert Einstein who said: “If you can’t explain it simply, you don’t understand it well enough.”.

Tagged , , , , , , , ,

I’ve been awarded something!

A few days ago I posted about receiving my second year results and, safe to say, I did pretty well. So today I wake up to find a letter at the bottom of the stairs, addressed to me, bearing the Department of Computer Science stamp on the back. I just thought this would be a letter to confirm the results I had already collected online, or maybe just a letter saying “Well done you! Give yourself a pat on the back and eat some cake, you deserved it!” which was almost right I suppose. The letter was actually informing me that the Board of Examiners in Computer Science recommended that I be awarded the G B Cook Prize in Computing for Outstanding performance in the Diploma Stage. It’s nice to be rewarded for so much hard work, in my High School it was mostly the troublesome kids that got rewarded for not being troublesome for once; people like me who were never any trouble were rarely rewarded.

I also get a nice £100 credited to my bank account which will be really helpful for my upcoming holiday.

I wasn’t even aware of such a reward, but I’d like to thank Warren Viant (Head of Department) and whoever else was involved in awarding me this prize, Thank You!

Tagged , , , , ,

Ninite – Your new best tertiary friend.

Screenshot of Ninite in action.Tertiary friends are tertiary for a reason, they have their benefits but you don’t need them around all the time.

Today I decided to do a clean install of Windows on my laptop, to start from scratch, as it’s been running like crap. Whilst waiting around for it to finish doing its business I had a little browse on reddit, where I found a nice little thread full of cool computer tips and tricks. I recommend anyone reading to check it out, no matter how much you know about computers I’ll guarantee you’ll find something useful there. I did. I found out about Ninite which is a great service which will install/update the most popular freeware programs for you. Continue reading

Tagged , ,

Spanish Grand Prix Preview

Today is a great day for sports fans, the deciding day of the Premier League title and also Grand Prix day! Being a bigger fan of F1 than of football, I’m looking forward to the latter more, but I will still be flicking between the two Manchester games when they’re on. (For the record I’m a Manchester United fan, haters gonna hate?)

Continue reading

Tagged , , , , ,

Simon Pegg and Nick Frost in awesome comic book style!

The other day we (me and my girlfriend) went out into Hull, mainly to have a look around and get out of the house. I didn’t have any plans on buying anything, not even any sexy looking DVDs I might see. Well, my plans didn’t turn out very well because I ended up buying THESE BEAUTIES:

Image

I think you’ll agree… it was ten pounds well spent. Continue reading

Tagged , , , , , , ,

Avengers Assemble!

The Avengers Movie PosterSo today I went to watch The Avengers and it was AWESOME!

If I’m honest I wasn’t expecting much from it, after watching Captain America and Thor (the former in particular) I thought it could go pretty badly. Oh, how wrong I was. Continue reading

Tagged , , ,