FOR someone who was not exactly a model student in his days at university Andrew Richards has not done badly.

As head of Codeplay the physicist runs one of Scotland’s most exciting technology companies. But he admits his career had an inauspicious beginning.

“I spent my whole time at university writing video games; I was not a good student. I passed,” notes Mr Richards of his time at Cambridge University.

His apparent lack of regret may surprise those who aspire to join Oxbridge’s academic high flyers.

But Mr Richards has become a big success after taking the risk of focusing on the problems that have interested him rather than his teachers.

Codeplay can claim to be among the world leaders in the highly specialised field it works in.

The company develops compilers which are used to convert programmes written in computer languages into instructions that machines can understand.

“We’re doing compilers that allow you to write something which is done thousands of times at the same time on a graphics processor,” notes Mr Richards, adding: “We are internationally known as the specialists in that field.”

After developing steadily helped by winning business from firms working on technologies used in things like mobile phones as well as video games, Codeplay is set to move up a gear or two. It has become clear its expertise could come in very useful in a market that is set to explode.

Codeplay has recorded a surge in demand from firms that are working on driverless car technology. These need processors that can complete hugely complex tasks, such as helping cars detect pedestrians, but that are small enough to make their power demands manageable.

The chips concerned must process massive amounts of data at lightning speed.

Mr Richards notes Codeplay’s systems can play an important role in helping firms adapt prototypes that may be developed using bulky super-computers under controlled conditions into units that are suitable for mass production.

The company raised £3.1 million last year from private equity heavyweight Foresight, half of which came through a fund backed by the company behind the Williams Formula 1 team.

The success indicated that sophisticated engineers and financiers saw huge commercial potential in Codeplay’s technology.

Speaking in the brutalist former government office block in Edinburgh that Codeplay shares with a range of emerging firms, Mr Richards says trying to convince people of the significance of graphics processor-related technology has felt like an uphill struggle at times.

“We were quite early into this area. It takes a long time to introduce an idea. So for years we were were doing this pioneering stuff.

“We started 2017 saying this is a real opportunity we’re going after this, we’re going to raise funds but all the investors said no you’re mad. We got nowhere.”

The funders that eventually supported Codeplay have backed Mr Richards’ conviction that Codeplay should risk a big increase in employee numbers in the belief business is set to take off.

“it feels the opportunities for next year are pretty crazy,” says Mr Richards, citing conversations with potential customers, without naming any.

“Something has to go horribly wrong for us not to have to hire a lot of people.”

If all goes to plan, employee numbers could double to 150 within a couple of years.

Codeplay is talking to car producers and to firms that are making components. Some are working to tight deadlines to develop mass production parts for car makers.

The long term potential of the auto market is huge.

Regardless of whether or not driverless cars become the norm, Advanced Driver Assistance Systems will likely be deployed in millions of motors, filtering down from high end models.

With exciting times in prospect, Mr Richards can feel the decision to invest so much time in computer games over the years was a good one.

He started writing games for the revolutionary ZX Spectrum console in his bedroom at the age of 11 after becoming hooked on computers while living with his parents in New Zealand during a roving childhood.

“It’s incredible to think of it but in those days you could do that, you could write a game in your bedroom at home, you could take it to a publisher and the publisher would get it into shops.”

Mr Richards notes that Rockstar North, of Grand Theft Auto renown, employs an army of games developers in Edinburgh.

He enjoyed his first big commercial success in his early 20s with a tennis game endorsed by US legend Pete Sampras.

“The games I could do best were sports games which is ironic because I’m terrible at sport.”

Mr Richards drew on his knowledge of physics to write the code required to get the balls on screen to drop over tennis nets like they do in the real world.

Other people could not handle the maths required to produce realistic results.

The programming expertise he acquired helped Mr Richards get plenty of work on projects in areas such as gaming after graduation.

After developing his entrepreneurial skills as a freelance he founded Codeplay with Artificial Intelligence specialist Jens-Uwe Dolinsky in 2002 with a view to drawing on the power of graphics processors to develop technologies for use outside the gaming world.

But after launching the business in London Mr Richards found the early going was tough.

“By the time I got around to doing it, it was dot.com crash time. It was extremely difficult to raise money.”

London seemed to be crowded with early stage technology firms that were struggling after raising lots of money during the boom.

“They were sucking up all the advisers saying please can you help us save this company.”

Against that backdrop the decision to move Codeplay to Edinburgh not long after it was founded was the best he ever made.

“Scottish Enterprise and the university here really wanted to do outreach into small companies so they provided lots of advice for technology companies and they were really interested. The scale of things in Edinburgh was much smaller so a small company would engage with it.”

Official funding through schemes such as the Smart awards programme provided huge help in the early years.

The Nottingham-born Mr Richards loves living in Edinburgh, which he reckons is a beautiful place. He likes to unwind by going on long walks with his Border Collie.

The quality of life in the Scottish capital makes it easier for Codeplay to recruit the kind of highly skilled specialists it needs to deliver projects.

But as the company competes for staff in a global market, the uncertainty about what the results of the Brexit vote might be is a concern. Other factors to consider include the trading regime, regulations and the value of the pound .

“It is very difficult to work out the current political situation and what that’s going to mean for us, it is a great worry,” observes Mr Richards.

"We are very dependent on hiring international talent … It goes through periods of getting difficult. When politicians make a lot of noise that gets very difficult and when they keep their mouths shut it gets a lot easier.”

The uncertainty may force Codeplay to think more seriously about expanding overseas just to be able to hire people. One of its specialists is based in Toronto.

“I don’t think we’ll have to leave Edinburgh, I hope not, but I do think it may become very disruptive.”