Categories
programming

SVG Spec: missing documentation: the “Viewport” (and <svg width=”…”>)

In app development, the most common thing people do with an SVG is “render it to fit a specific area on screen”. This is very wise – it’s making use of the core feature of Scalable Vector Graphics: resolution independence.

Unfortunately, achieving that aim is a lot less obvious than you would expect. Most of the SVG Spec is extremely well written, but for this aspect the authors “had a bad day”, and wrote some rubbish prose that’s not technically possible. This leads to a lot of confusion…

I’m trying to make SVGKit for iOS/Mac be 100% standards compliant, and the lack of specification in this area has made it very difficult. Worse … people using the library are often confused by simple items like “how do I make the SVG file fit into a small area on screen?”.

It’s been difficult to work through, and I’ve decided to document what I *think* the authors intended – and how I’m implementing it in our open-source library.

Categories
advocacy amusing programming

Compiler author demanded ownership of all programs written using his compiler

(from 1982. Blogged now because … the named individual who apparently came up with this scam)

http://imgur.com/a/P9kFa

(for those that haven’t been following: four years after Langdell tried to bully an award-winning iPhone game into giving him their money, using his invalid trademark to threaten legal action … the USPTO has finally started cancelling each of his trademarks. Trademark law is FUBAR: 4 years for a fraudulent(*) TM to be cancelled? Ouch.)

(*) – my opinion, but: read the case notes … he apparently committed blatant fraud to keep-alive a trademark that legally had already expired

Categories
android Google? Doh! programming

Android Dev: Eclipse won’t start? Hangs at splash screen? Kill Mylyn…

For the last couple of months, one of our dev machines has been literally incapable of opening a simple Android project. It crashes every time, on startup, while displaying the Eclipse logo:

Screen Shot 2013-04-05 at 14.45.54

Re-installing everything had no effect. We tried everything, and the only thing that worked reliably was to keep deleting the project and re-synching from SVN every time we wanted to start Eclipse

Today I finally discovered the cause: Mylyn

Categories
computer games games design

Round Earth? Flat Earth? Impossible to tell?

https://en.wikipedia.org/wiki/Bedford_Level_Experiment

(unsubstantiated, but hilarious): “If the measurement is close enough to the surface, light rays can curve downward at a rate equal to the mean curvature of the Earth’s surface. In this case, the two effects of curvature and refraction cancel each other out and the Earth will appear flat in optical experiments.”

…”an increase in air temperature … of 0.11 degrees Celsius per metre of altitude would create an illusion of a flat canal, … [or if] higher than this … all optical observations would be consistent with a concave surface, a “bowl-shaped earth””

…”Ulysses Grant Morrow, … found that his target marker, eighteen inches above water level and five miles distant, was clearly visible he concluded that the Earth’s surface was concavely curved”

(the history of maps and globe representations of the Earth is full of wonderful things like this)

Categories
computer games

Activision shows computer-generated human indistinguishable from reality

OMGWTFBBQ…

http://uk.ign.com/videos/2013/03/28/activision-reveals-next-gen-tech

IMHO this is one of those watersheds: for the people who still believe “I could tell” if video is fake … no, you can’t. Done properly, you really can’t.

UPDATE: and the blog from one of the guys who did it

Categories
bitching Google? Doh!

The new gmail: Downgraded, hated by users

I really don’t understand this. My best guess: there’s a new Senior Manager at Google who was doing badly in their peer-reviews, and was determined to “make their mark” by changing Gmail – if necessary over the cold, dead bodies of the thousands of people pointing out that this is a bad idea.

I thought Google was a company that prided itself on taking the best of a group of people, and putting “Product” concerns above all else?

But this week they forced a change on all several hundred million users that removes core features, breaks existing features, and adds only 1 minor feature (you can compose two emails at once without opening a new tab).

Let’s run through it, using Google’s own “Learn more” page as a reference.

Categories
fixing your desktop programming

Apple finally supports Windows 8

Apple has finally released drivers for Windows 8 (NB: because Apple takes standard PC hardware and then customizes it, Apple customers are reliant on Apple for “custom” drivers; the manufacturer drivers don’t work)

Download link for the new drivers (March 2013)

Also: the built-in copy of BootCamp has been updated, if you upgrade OS X to version 10.8.3 or later.

To recap:

  • 2011 September: Microsoft releases first beta of Windows 8
  • 2012 May: Microsoft releases final beta of Windows 8
  • 2012 September: Windows 8 (final) goes on sale
  • 2013 March: Apple enables their customers to install Windows 8

Even being generous, that’s an 11 month delay between “the world discovering that Apple hardware needed a new set of drivers, or Windows 8 wouldn’t run” and “Apple delivering the drivers”. Many Apple machines were fine, but a large proportion were effectively blocked from running Windows 8 at all. It’s good to see this finally released, but … that’s a pretty poor service from a company the size of Apple.

Worst was the iMacs, where even machines less than 18 months old were (allegedly, according to the Apple.com forums) unusable on Windows 8. You could install it (with some hacks), but then the graphics card was disabled. This means: most major software won’t run (because the graphics card is used so heavily on modern computers you got corruption of on-screen info, or just massive drops in performance, so that apps were unusable), and definitely: no games.

…which, after all, is one of the main reasons for Mac users to dual-install Windows.

Interestingly, it seems this was caused by Apple’s modifications of the ATI graphics card, so that the ATI drivers were convinced there was an external monitor (which Apple didn’t provide a socket for, so there was nothing you could do – even if you owned a second monitor).

Interesting because: in the PC world, ATi used to be famous for writing low-quality, poorly-tested graphics drivers. ATi owners were accustomed to poring over every new minor version update “just in case” it fixed the glaring bugs in the previous one – and spent a lot of time de-installing and re-installing the older versions (when the newest version frequently introduced major new bugs).

So … although it’s ostensibly Apple to blame here in being so late to fix it, my suspicion is that it was some shoddy code in ATi’s driver that (accidentally) only affected Apple-modified cards.

3rd Party Device drivers: every OS-developer’s nightmare!

Categories
computer games games design games industry

Tomb Raider 2013 shows games as a force for good

Ashelia/HellMode’s review of Tomb Raider 2013:

“Tomb Raider triggered me, sure. But it didn’t do it needlessly. It didn’t do it tactlessly. It didn’t do it for a cheap rise. It instead captured a real emotion and a real experience millions of women will encounter in their life. Some of them won’t be as lucky as I was. Some of them won’t be as lucky as Lara Croft was, either. Some of them won’t survive. Some of them will be silenced forever.

Some of them will die and some of their attackers will live.

Tomb Raider triggered me and that’s ok. Maybe that’s even good. I think it is because it means it’s the first realistic, non-gratifying portrayal of violence against women that I’ve seen in video games. It’s the first one I’ve seen that wasn’t exploitive.”

Categories
conferences games industry

GDC 2013 feedback on speakers

This year: I hadn’t even left the talk before I got this email:

Screen Shot 2013-03-26 at 11.36.14

This is excellent. Easy and automated (using the RFID tags in the pass itself, that’s scanned as you walk in the door), it’s quick and accurate.

As a bonus, I can rely on it to give me an email record of which talks I attended (so I can easily look them up, share with colleagues, etc).

I’m looking forwards to more conferences doing this…

Categories
computer games games design games industry

“We are a compromised profession” (Game Designers)

Carlo Delallana responds to the sensationalized report that “I think most game designers really just suck”:

“One of biggest problems that game designers face in their path towards mastery is respect. It’s easy to respect an artist with a demonstrable skill, no average person assumes they can do what an engineer does. But game designer? For one thing our profession faces a common misconception, that game design is coming up with ideas (as noted by Garrott’s comment on lazy designers). That all you need to do is clone, that you are no better than your competition (as noted by Mark Pincus).

We are a compromised profession, tasked at executing a formula to minimize risk. Unfortunately, executing on formula is counter to mastery of any skill. If the marching order is “status quo” instead of “challenge yourself” then how does a game designer grow?”

(NB: Gamasutra clearly did the IMHO scummy journalist thing of sensationalizing RG’s quote; and RG should have been a lot more careful – personally I believe he didn’t mean it the way it came across, but it came across … badly)

Either way, Carlo’s reply is worth reading in full

Categories
android

Download link for Android ADT in 2013

Tonight I lost 30 minutes because Google’s Android team still has the wrong links on the download page of their website. Every few months someone from their team copy/pastes the wrong link back onto the page…

Android’s download page (http://tools.android.com/download) says:

“download …ADT and Tools … from http://developer.android.com/sdk/index.html ”

This is 50% true. The “Tools” are on that page (although some poor web design means you now have to jump through silly JavaScript hoops to see them – this is a new “feature”).

…but “ADT” has NOT been on that page for something like 2 years now. I am surprised that no-one cares enough to fix this. You can wipe your system and download 0.5 gigabytes of trash to replace it, hidden inside which is the ADT – but you cannot get to the ADT itself.

So, until the Android team checks their links and fixes their webpage, here’s the actual (official!) download page for ADT:

http://developer.android.com/sdk/installing/installing-adt.html – Google’s ADT download page, NB: IGNORE the part at the top, the actual link is in “Troubleshooting”, and has been there for 3+ years

Categories
iphone programming

Every size you need to know when designing for iOS

References

Building an app, the basics

iPhone launchimage/splash

Default.png Default-568@2x.png
Model Size Model Size
3 + 3GS 320×480
4 + 4S 640×960
5 640×1136

iPad launchimage/splash

Default.png Default@2x.png
Model Size Model Size
1 + 2 768×1004
or 1024×748
3 + 4 1536×2008
or 2048×1496

iPhone fullscreen

No status bar with status bar with status bar + navbar
Model Size Model Size Model Size
3 + 3GS 320×480 3 + 3GS 320×460
or 480×300
3 + 3GS 320×416
or 480×268
4 + 4S 640×960 4 + 4S 640×920
or 960×600
4S 640×832
or 960×536
5 640×1136 5 640×1096
or 1136×600
5 640×1008
or 1136×512

iPad fullscreen

No status bar with status bar with status bar + navbar
Model Size Model Size Model Size
1 + 2 768×1024 1 + 2 768×1004
or 1024×748
1 + 2 768×960
or 1024×704
3 + 4 1536×2048 3 + 4 1536×2008
or 2048×1496
3 + 4 1536×1920
or 2048×1408

iPhone app icons

App iTunes Spotlight
Model Size Model Size Model Size
3 + 3GS 57×57 3 + 3GS 512×512 3 + 3GS 29×29
4 + 4S + 5 114×114 4 + 4S + 5 1024×1024 4 + 4S + 5 58×58

iPad app icons

REQUIRED
App iTunes NewsStand (if Newsstand app)
Model Size Model Size Model Size
1 + 2 72×72 1 + 2 512×512 1 + 2 >= 512
3 + 4 144×144 3 + 4 1024×1024 3 + 4 >= 1024
OPTIONAL
Spotlight Settings
Model Size Model Size
1 + 2 50×50 1 + 2 29×29
3 + 4 100×100 1 + 2 58×58
Categories
iphone programming

Touch interfaces: Help for new users (any app)

I’m writing an iPad game that’s designed to be self-evident and trivial to use.

Today, I made a re-usable “tell the user how many fingers to use” animation that would work well with any app. So, I decided to open-source it and stick it on github.

Screenshot from my current app (NB: you need to photo YOUR fingers – not mine! – if you want it to look like this)

Usage

Instructions are in the source code, but my intention is for this to be ULTRA SIMPLE for you to use, so here goes:

[code]

// Add this to the main UIViewController for your app – the one that displays
// when you’re ready for user interaction
-(void)viewDidAppear:(BOOL)animated
{
VFingersHelp* helpView = [[[VFingersHelp alloc] init] autorelease];
/** This will position the helpview in bottom-left corner. Bottom left/right corners are where
users prefer to "touch" (c.f. Disney’s style guide for toddlers).
While they’re watching the help, we don’t want them touching, so we deliberately place in bottom corner.
(feel free to move to top corner if you prefer).
NB: it’s easy to take a photo of your fingers and display at bottom of screen…
*/
helpView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleRightMargin;
helpView.center = CGPointMake( 0 + helpView.bounds.size.width/2.0, 2.0 + self.view.bounds.size.height – helpView.bounds.size.height + helpView.bounds.size.height/2.0);
[self.view addSubview:helpView];
}
[/code]

Categories
fixing your desktop

OS X: Make your Mac load web pages 1000x faster

Apple’s core networking for OS X (Lion, Mountain Lion, etc) is famously poor. One of the (many) unfixed bugs is this:

“I go to a webpage (e.g. google.com) and my browser displays a message saying ‘Server not Found’. If I keep hitting Refresh, it never works. If I wait a few minutes and try again, it works”

This is entirely Apple’s fault. They aggressively (and incorrectly) cache “failed” lookups. And … because it’s Apple … you can’t turn it off. It’s been broken for at least 5 years now, which suggests they have no intention of fixing it.

But: you can “flush” it. Since it’s a cache (which are designed to auto-flush anyway), there’s no harm in doing this.

Solution: restart Apple’s DNS cache

  1. Open a Terminal window
  2. type: “sudo killall -HUP mDNSResponder”
    • (you’ll need your admin password, annoyingly, because you’re ‘forcing’ Apple’s code to behave itself)
  3. Reload your webpage – works immediately

After the first time, you can repeat the command frequently without typing your password. Simply hit the “up” arrow (to re-type previous command) and Return to run it.

Categories
advocacy computer games Dare 2 Be Digital education games design games industry GamesThatTeach iphone programming

Teenagers learn to program, write own 3D game, in 3 weeks

Background

Last year, Pearson ran the first ever Innov8 competition, giving tech startups a chance to make their own innovative new product/project. The grand prize was £5,000 towards building the product.

Most of the teams were adults (even: real companies), but a team of students from Blatchington Mill School won, with their idea for an iPhone/iPad app: “My Science Lab”.

Team: Quantum Games

The three students named themselves “Quantum Games”: Jon, Nick, and Oli. All three of them have been studying for their GCSE’s in parallel with this project.

They’ve been supported by Mark Leighton, Assistant Head / ICT Director at the school.

For mentoring and game-development expertise, they had me – Adam Martin – previously CTO at MindCandy and NCsoft Europe, now an iPhone/Android developer

Previously

The students chose to focus on a game that would help other students revise the “Momentum” part of GCSE Physics.

In summer/autumn 2012, they learnt the basics of game design and development. We didn’t do any formal teaching – they simply had to pick up the skills they needed as we went along. YouTube videos, and “trial and error”, were our primary techniques…

In particular, they learnt 3D-modelling and texturing (using Wings3D and Photoshop) and game-programming (using Unity3D and Javascript).

By the end of 2012, they’d written their own physics engine, some basic gameplay, and a simple simulation of an exercise/problem in Momentum.

Last month

The big thing this month has been BETT. Pearson had a large stand, and asked the students along to talk about the project. They gave an excellent presentation to an audience of approx 30 people at BETT, covering the background and some of the things that went well, that didn’t, and what they’d learnt from it.

Leading up to BETT, they worked hard to squeeze in a new build of the game, with a rethink on the interactive sections and how they hang together. Unfortunately, we hit what seemed to be a major bug in Unity’s camera-handling, and none of us could fix it in time (nor could we get an answer from Unity support in time). But the students managed to invent a workaround at the last minute which worked fine for demoing at BETT.

The game isn’t finished yet – GCSE’s and schoolwork left too little time to complete it before BETT – but we’re very close now. The students are aiming to finish it off this month and next, and I’m hoping I might even be able to take a copy to the GDC conference in March (taking place in San Francisco, GDC is the commercial games industry’s main annual conference).

In the meantime … you can sign up now on the Quantum Games website (http://quantumgames.co.uk), and we’ll email you as soon as the game is ready – or sooner, with a private beta-test!

Categories
iphone photos

London … from VERY high up

Courtesy of Gareth, I got a surprise trip to the Shard on opening day, just after sunset.

Tragically, I had my DSLR with me and *left it behind* 10 mins before Gareth phoned me, so all this is from an iPhone 4 (gasp!). Even so, it’s impressive. The Shard is so tall that you get a view of London without the typical “squashing” from perspective. Even from airplanes, flying in to Heathrow for many years, I’ve never seen quite such a decompressed view of London at night…

IMG_3417

IMG_3427

IMG_3448

IMG_3452

IMG_3456

Categories
amusing programming

Modem dialup noises … visualised (and transcribed)

Visual spectral diagram showing the noises modems make, and box-outs for what they’re actually saying:

…and Transcription for txtrs

Modem A: hey babe, you dtmf?
Modem B: u know it
Modem A: what u up 4 2nite? wanna v.8?
Modem B: i wanna ack u like my daddy net2phone use 2 ack me
Modem A: um ok… v.8 then
Modem B: lol jk, u comin?
Modem A: brt just gotta turn off echo suppressors n cancellers
Modem B: ok i wait
Modem B: my pcm is so modulated
Modem A: lol rly? u think u can handle V.90/V.92?
Modem B: D/A?
Modem A: …D?
Modem B: wtf no, im not into that
Modem A: lol jk we can do V.42 LAPM if u want im down 4 nething
Modem A: up to 3429 o/c
Modem A: u know i give as good as i get, ne way u want it, loud or soft, high or low, fast or slow, i got all the time in the world 4 u babe, my clock source is internal
Modem B: of course no 3429. and same 4 me. except i might lose track of time, lol
Modem B: and honey if u with me we gon be makin sum NOISE
Modem B: 6db at LEAST u know how i like it
Modem A: lol i hear ya, 3200 all nite long, the way u get me goin maybe we even go 2 4800 lol
Modem A: set ur pre-emphasis filter params n put on that 1920 hz carrier frequency i got u
Modem A: im here baby
[SCRAMBLED]

Categories
games industry startup advice web 2.0

Amazon and the high-value of a low-margin business model…

Some good observations on tech business strategy here

Low-margin can still mean high-value-business:

“Most people just look at a company’s margins and judge the quality of the business model based on that, but the cash flow characteristics of the business can make one company a far more valuable company than another with the exact same operating margin. Amazon could have had a margin of zero and still made money.”

Preventing the number-1 biggest threat to a mainstream company (disruption):

“Study disruption in most businesses and it almost always comes from the low end. Some competitor grabs a foothold on the bottom rung of the ladder and pulls itself upstream. But if you’re already sitting on that lowest rung as the incumbent, it’s tough for a disruptor to cling to anything to gain traction.”

And … an idea I’d considered more seriously back when I started in iOS development. This was the perfect way to disrupt agencies (tough and unpleasant though it was):

“Not having to sweat a constant onslaught of new competitors is really underrated. You can allocate your best employees to explore new lines of business, you can count on a consistent flow of cash from your more mature product or service lines, and you can focus your management team on offense. I”

Categories
amusing fixing your desktop

Virgin Atlantic – how to get them to phone you back

Here’s the magic URL, that you can’t access directly from the site:

http://www.virgin-atlantic.com/en/gb/bookflightsandmore/bookflights/callme.jsp

Huh?

In 5+ years of flying with Virgin, their online booking system has always, every single time, failed – and redirected me to a page where I get that link to get THEM to phone ME.

(which is useful, since the evil mobile network operators don’t like Virgin’s 08-something numbers, and turn them into premium-rate bills)

It’s a pain going to the site, going through the pointless online booking, knowing that you’ll end up on the “our booking system sucks, click here” page.

So I’m blogging this so I never need to do it again!

Categories
agile games industry marketing startup advice web 2.0

How middleware (and open source) downloads ought to work – Unity3D

While upgrading Unity, I noticed the current download page is a great example of how it SHOULD be done:

Unity 4 has some … issues … with backwards compatibility – but at least they made the “need an older version?” link prominent. And how many old versions can you download?

Many!

(it goes on right back to unity 3.0)

Old versions? Who cares!

Well, that backwards compatibility thing is a *****. If you work on a project with other people, and they’re using Unity 3.5 … you SHOULD NOT (must not?) use Unity 4 (there be Dragons).

But it’s fine; Unity makes it trivial for anyone joining such a project to get exactly the version they need.

Some games middleware *cough*Hansoft*cough* companies declare that everyone must use the latest version, even if it is buggy and breaks existing projects. Or if it requires staff retraining. You must retrain EVERYONE! NOW!

(Hansoft has probably changed by now – maybe unfair to single them out. But for a long time they only allowed you to download the “latest” version, and actively deleted everything else. As soon as a new version existed, BOOM! Everything else got wiped. A happy customer I was not)

Recap

So, here we have a piece of middleware, with a download page:

  • Lives at an obvious, permanent URL: http://unity3d.com/unity/download/
  • Makes it very easy to find the download link (many open-source projects: shame on you)
  • Uncluttered webpage, and makes it easy to understand which download you want (Eclipse.org: shame on you)
  • Every version has its release notes right there, for you to click on! (Apple (every product), and Firefox: shame on you)
  • Every version has BOTH the windows AND the mac downloads (computers today are cheaper than they’ve ever been. Many people have a laptop thats Mac, and desktop that’s Windows, or vice versa. You can’t assume that the browser they’re using dictates the desktop they’ll be working from)

Designing a website to look simple is certainly a difficult and non-trivial task.

But in the case of a download page – where almost everyone has the same needs, and there are many examples to copy (plagiarise) from – it doesn’t take much. More projects (and companies) should at least try to do this.