Industry Speaking: At the University of Bradford

After two previous and successful discussions at the University (the first on setting up an indie studio and the second on things all indies must know), Mark was invited back a third time, tasked with broaching the subject: What we look for in a Graduate.

Providing some general advice on CV writing, cover letters and portfolios, Mark then delved into the specifics of how to get noticed – and often the pitfalls many an applicant make!

There was a lively discussion in the Q&A section of the talk, with many of the students already looking at the state of the industry, getting hired into larger companies and focusing more on targeting jobs in their specialisation – with some considering forming an indie studio themselves.

___________________________________

Big Screen Game

Developed with the University of Bradford’s Digital Media Working Academy, the Big Screen Game was developed for the BBC giant screen in Centenary Square, Bradford (UK). This game utilises motion control via a camera mounted alongside the giant screen. Players would move left or right to guide their avatar up and down, avoiding the obstacles. They can also jump to trigger firing a projectile.

Play the game here!
You will need a webcam.
The game was designed to work with a 30ft outdoor screen, so players might not have the same experience at home.

___________________________________

How to detect a Phone or Tablet in Android

While developing on Android, we came across a rather simple problem:  How do I tell if my APK is installed on a Phone or a Tablet?

It seems like an easy one.  Surely there’s a “Tablet” flag, somewhere?  But then, what constitutes as a Tablet?
Is it the screen resolution?  We can’t really use this as, for example, in the Samsung Galaxy line of products, the Note 1 is a 1280×800 screen but so too is the Tab 8.9 – to name just two.

But here’s another interesting oddity: The normal rotation on a Phone is “Portrait”, whereas on a Tablet it’s “Landscape”.
That is, if you use getRotation() from the default display, then the “normal” rotation is when this returns a value of 0 (Zero).

The solution is actually very simple.
First, we get the rotation of the device.
If we have 0 or 180, then the device is in one of the “starting” positions.  That is, for a Phone it’s either the normal Portrait orientation, or it’s upside down, yet still portrait.  And similarly, for a Tablet, it’s in normal landscape or upside down landscape.
Now we know the device is in the “normal” or “start” position, we can check the display size.  This value changes depending on what orientation the device is in.  So, if we have a tablet that has a rotation of 0 (or 180), then it’s width will be greater than it’s height.  And of course, the opposite is true for a phone.

A quick check for if the devices rotation is 90 or 270, then we know it’s in the other orientation – Portrait for a Tablet, or Landscape for a Phone.
Now the height > width for a Tablet, so we know we have a tablet in this orientation.

A quick example.
First, get yourself a Display instance:

WindowManager windowManager = (WindowManager)context.getSystemService( Context.WINDOW_SERVICE );
Display display = windowManager.getDefaultDisplay();

Now we can check for the rotation and also get the screen size:

int rotation = display.getRotation();
Point size = new Point();
display.getSize( size );

And finally, perform a check on the rotation, followed by a check on the screen size, to determine what kind of hardware we are running, be it a Tablet or a Phone

if( Surface.ROTATION_0 == rotation || Surface.ROTATION_180 == rotation )
{
  if( size.x > size.y )
  {
    // This is a Tablet and it is in Landscape orientation
  }
  else
  {
    // This is a Phone and it is in Portrait orientation
  }
}

The size instance we get from Display will change on every orientation change, so you’ll need to call getSize() on every orientation change.  Also, the size.x/y values related to the width and height of the screen.

Hope this helps someone!

___________________________________