Experienced Points

Experienced Points
Why Video Games Need Their Own Programming Language

Shamus Young | 9 Dec 2014 19:00
Experienced Points - RSS 2.0

More pressingly, a newer language would likely be a little slower. The whole point of using a language like C is that it's pretty raw and close to the hardware. While your typical word processor or MP3 player isn't going to push your computer to the limit, the recent controversy surrounding games that can't maintain 60FPS or can't reach 1080p can attest that speed is still very much a big deal in videogames. Indies are free to dabble in other languages (and indeed, a lot of them do) but if you're making a big-name AAA game targeted at modern consoles, then you still need to worry about every processor cycle.

Part of the problem is that only parts of our games need to be designed with an eye towards efficiency, and other parts of it don't. The graphics, character animation, AI, and physics systems have a voracious appetite for CPU cycles and will eat all the power we throw at them. On the other hand there's a lot of other mundane crap that is complex to design but isn't nearly as demanding, performance-wise. Stuff like the interface, game logic, networking, and processing of player input. That stuff can take up a lot of lines of code and a lot of hours of programmer time, but it doesn't need to be written in something hardcore like C. It would be easier to write in dozens of other languages and the performance impact would be negligible.

There have been a lot of efforts to tackle this two-path nature of game development. For years Unreal Engine had UnrealScript, a lighter-weight language designed to handle the game logic while the underlying engine did all the heavy lifting. Other approaches have been tried, but there hasn't been a silver bullet answer yet.

Which means most developers are still painstakingly building large ambitious games on top of this ancient programming language.

The console wars aren't helping. Sony, Microsoft, and Nintendo are each in charge of the development tools for their respective gaming platforms. If any of them invented a really great language or system to solve this problem, they would make it exclusive to their platform. If one of their rivals created one and offered to share, they'd refuse because they wouldn't want any part of their console development to be controlled by the competition. This means that any innovation needs to come from outside of the big three. But nobody else has the kind of clout it takes to introduce a new language and make it popular enough that the big three would want to adopt it. It could happen, but a process like that could take years. It would require one language or idea to gain such a massive mindshare that at least one or two of the the big three would feel obligated to adopt it.

Will Jon Blow invent that language? Statistically, I wouldn't bet on it. Innovation is a risky uphill battle and even fantastic new ideas can often lose against entrenched bad ones. I liked what he had to say in his presentation and he echoed a lot of my own frustrations with C, but I've never written a compiler and I don't feel qualified to judge his language proposals from a technical standpoint. Language authoring is tricky business.

At the same time, I'm really cheering for him and his efforts. Assaulting the status quo is hard work and just keeping the conversation going is a valuable thing.

Shamus Young has been writing programs for over 30 years, from the early days of BASIC programming in the 80s to writing graphics and tech prototypes today. Have a question about games programming for Shamus? Ask him! Email askshamus@gmail.com and your question might appear in a future Experienced Points column.

Comments on