Skip to content

Blog

Runtime-Compiled C++

Just back from the Game/AI Conference in Paris. I enjoyed this year even more than usual, thanks to all the familiar faces – and having the opportunity to show our Runtime-Compiled C++ project to the wider world.

In our presentation, Doug Binks and I talk about the headaches AAA studios find down the line with scripting languages. During the conference, it brought a smile to my face on several occasions to hear other speakers mention that they just used pure C++, or had dropped their scripting language, or in the case of one FPS developer, ask why on earth anyone would use one anyway? This may sound alien to you – hot-reloadable scripts seem like a no-brainer for the rapid iteration they allow. However, the bigger the project, the more headaches they seem to entail – the API maintenance, lack of good debugging tools on a multi-million line project, lack of multithreading support and the performance problems.

In the RCC++ project, we show how you can get that same hot-reloading functionality from pure C++. We don’t use any interpreter. An enabled project can compile as normal to a single DLL, but it watches it’s own source code, and as you make changes to it in Visual Studio, it recompiles itself a file at a time into tiny DLLs. By linking these in at runtime – and making use of serialisation – it can bring in your changes in just a few seconds. All the state of the running game can be preserved, while you bring in whole new features to your live C++ application.

We had a few more things to show. When you can make small rapid changes so easily, it’s important you don’t bring the house down with your first null pointer. In RCC++ we allow you to debug crashes in Visual Studio as normal – but then to catch them and carry on running. Your app keeps on running even if the game objects have to stop, until you fix the code – and it all sets off again.

As you play around with it, you start to realise all the simple tricks you can use this approach for. We show how you can create a C++ interactive console that lets you interact with your C++ objects – without having to add reflection code or a complex API. And how you might not need all those XML parsers or GUI tools any more, if you can just edit the source freely. As an independent developer without a tools department, these bang-for-buck solutions really appeal!

So there’s the summary. But if you’d like to hear more: check out the teaser video below, the Runtime-Compiled C++ blog, or fetch the MIT-licensed source code and play with it yourself.

First Steps from RuntimeCompiledC++ on Vimeo.

Contracts, Collaborations, Conferences

2011 has been a busy year so far! I’ve been working on an AI contract for a French company – very interesting work, but still confidential for now – as well as a couple of projects of my own. I’ve also been to Australia and back, visiting old friends and collaborators. Currently I’m looking forward to the Paris AI conference, where I’ll be presenting a new approach to fast iterative games development in pure C++.

Paris Conference Advisory Board

Christmas and the New Year have been an interesting time here, with discussion regarding contracts for most of 2011 and also re getting some extra help on-board, but everything’s now finalised – it’s great to have a whole year planned out!

I’ve been asked to lend a hand with the Paris Games AI Conference, sitting on the advisory board and reviewing submissions. It’s been fascinating – so many good proposals and a reason to sit down and read a whole bunch of research papers.

Crytek Frankfurt

I’ve been asked over to lend a hand with the SDK team in Frankfurt. For the week, I’ve been leading three excellent programmers in updating the SDK codebase with some of the Crysis 2 AI systems, trimming down some older systems that were no longer needed and training on some of the systems that were new to them.

It’s an exciting time to touch base with Frankfurt and a good opportunity to catch up with everyone, see how they’re faring and how development is going.

[This work saw the light of day with the 3.3 release of the CryEngine SDK]

Crytek UK

I’m back on-site with Crytek in Nottingham and continuing my work there. There’s a lot of excitement about upcoming Crysis 2, especially the multiplayer. As always, they’re working magic – this time its an innovative approach to memory fragmentation. Having been away for a while with Microsoft, its great to catch up with developments and with the team.

Intel – An Overview of Code Coverage

I was recently asked by Intel’s Arti Gupta if I would write a couple of posts for the Intel Software Network site on my “Code Coverage for QA” system. Forming part of a series with authors of Games Programming Gems 8, I’ve written a condensed summary “Getting more out of QA with Code Coverage” which will bootstrap you in 2 minutes and answer the question: “What can CC4QA do for me?”

For an in-depth treatment and technical details you can read the original article “Code Coverage: Informing the QA Process” in Games Programming Gems 8 or watch a discussion with Alex Champandard in a masterclass video available at AiGameDev.com. You can also check out the C++ source for an example implementation mcover.