The C++ programming language, while daunting to many, is one of the most important development tools for computer scientists and software engineers around the world. Recognized for its powerful versatility and portability, it continues to form the basis of countless major products — from popular video games to operating systems to business applications and more.
Designed by Bjarne Stroustrup in the mid-1980s, the C++ language has changed and adapted over time with newly added features and functionality. Through the work of the International Organization for Standardization (ISO), along with a worldwide community of volunteers, the language continues to accommodate the shifting needs of its many users.
But how do these changes actually come about?
“It does take a while,” says Allan Deutsch, a 2017 DigiPen Institute of Technology graduate from the BS in Computer Science program who is working to make his own contribution to the C++ community.
A program manager by day in Microsoft’s advanced technology group, Deutsch works with a team of engineers to improve the experience for outside developers shipping on the Xbox platform. Outside of his job, he’s also an active participant in the C++ developer community. Most recently, he presented on “Game Engine API Design” at the C++Now conference in Colorado. Last fall, while he was still finishing his bachelor’s degree at DigiPen, he gave a talk on “Esoteric Data Structures and Where to Find Them” at the CppCon conference in Bellevue — an unusual honor for an undergraduate student.
Perhaps even more ambitious, however, is his ongoing effort to propose new language for a future version of the ISO’s standardized C++. If all goes according to plan, Deutsch hopes to introduce a new type of data structure to the C++ Standard Library, one that could be of particular benefit to current and future game developers.
His proposed data structure, colloquially referred to as a “slot map,” is a type of data container that — among other things — stores a set of data in a contiguous section of a program’s memory. Part of its appeal, he says, has to do with the efficient manner in which the stored data can either be accessed or iterated upon.
“So a real-world example could be like a car valet,” Deutsch says to illustrate. “You take your car to the valet, and you say, ‘Here, hold on to this for me.’ And they say, ‘OK.’ And they go park it somewhere, and they’ll manage it for you. They give you a little ticket, so you can show up to them and say, ‘OK, here’s my ticket.’ They can go straight to your car, get it, and bring it back to you, because they know where your car is based on that ticket.”
That, he says, is roughly analogous to the way in which a slot map — or a similar type of data container — stores information for quick and efficient retrieval.
“In games, you could think of this as anything in your game world,” Deutsch says. “It could be a rock. It could be a tree. It could be the player. It could be an enemy. Those are all things, and they need to get stored somewhere in memory. So we do that. We put it somewhere in our slot map, and our slot map gives us back a little ticket to find our data later.”
But it’s not the only benefit of using a slot map. Thanks to being stored in a contiguous section of memory, a slot map’s method of storage also makes it particularly suited for algorithmic functions that need to quickly iterate over the entire set of data. Even if an individual item is deleted from the container, Deutsch says, the slot map will automatically adjust the placement of the remaining data to fill in the gaps and remain contiguous.
“Where the slot map shines here is that all of those things you put into it get stored next to each other,” he says. “So when your graphics engine wants to draw them all on the screen, it can just walk down the line, see everything, and put it onto the screen really efficiently.”
Whereas the concept for the slot map has existed for several years, it has not been available to developers in a readymade, standardized template. Instead, Deutsch says, various developers have implemented their own versions of a slot map data structure for their individual needs and purposes.
It was both a reasonably large challenge, but it also already had real-world usage and people who wanted it.”
And therein lies one of the challenges for Deutsch as he continues to refine the actual code for the standardized slot map container.
“One of the issues that I have to conquer is, ‘How do I create a single version of this that satisfies everybody’s problems?’” he says. “Another question that I have to answer is, ‘How can I make this something that’s approachable to people who haven’t used it before, while still making it useful for the people already using it?’”
According to Deutsch, his entire foray into the C++ community began while attending the Game Developer’s Conference during his sophomore year at DigiPen. At the encouragement of fellow DigiPen graduate Sean Middleditch, Deutsch attended a special meeting of the SG14, a study group connected to the C++ standards committee that focuses on games and low-latency applications.
“While I was there I was basically encouraged to write a proposal. It didn’t really matter what it was — just get involved, that sort of thing. I talked with Sean about it, and he suggested doing slot maps, since it’s a really popular container in games,” Deutsch says. “It was both a reasonably large challenge, but it also already had real-world usage and people who wanted it.”
Soon after, with the help of two DigiPen instructors — Dr. Claire Joly from the Department of Humanities and Social Sciences and Chris Comair from the Department of Computer Science — Deutsch began working on his slot map proposal as an independent study project.
He also began networking with various members of the C++ community and in May 2017 landed a coveted spot in the volunteer program for the C++Now conference. It was also during that conference where he gave his first public presentation in the form of a five-minute “lightning talk” on the slot map data structure.
“From there I got to have my first real conference presentation … and got to know a lot more of the community,” Deutsch says.
In addition to continuing his long-distance correspondence with conference organizers and attendees, he also traveled to a C++ standards committee meeting in Toronto. While there, Deutsch received even more in-person feedback, both for his slot-map proposal as well as for what would soon become his accepted lecture proposal for the 2017 CppCon event. That particular presentation — which was an extension of his earlier slot map lightning talk — focused on a number of non-standard data structures and their individual pros and cons.
“I just find the way that data gets stored to be interesting, like just taking these real-world constructs and [figuring out]: How do we put those in 1s and 0s on a computer?” Deutsch says. “There’s all sorts of exciting different ways that it gets done for different sorts of performance characteristics.”
While it’s too soon to tell what the end result of his standardized slot map will become, Deutsch’s efforts have already given him a strong foothold within the C++ community. It’s a project he continues to work on in his spare time through email correspondence and with new iterations of his code implementation. With luck, he says, the code for his slot map will soon be added to a major open-source library, such as Boost, giving other developers a chance to test out Deutsch’s implementation and offer more valuable feedback.
“Another example is some studios have asked me for it — various game studios. I can send it to them and get their usage feedback as well,” he says. “Once I have all of that, then I can say with a decent amount of data to support it, ‘Yes, this is desirable. It’s solving developers’ needs.’”
For now, Deutsch says there are still many steps to be taken as the proposal makes its way through all of the formal and informal processes of the C++ standards committees. In the meantime, he’ll be keeping plenty busy with a number of other side projects — such as his recent participation in a PAX West DigiPen alumni panel — and work commitments at Microsoft, where he’s currently transitioning to focus on education and events for game developers. Despite the potentially long road ahead, he’s hopeful his efforts to standardize the slot map data structure will eventually come to fruition in a future ISO release.
“And that would be really neat because then that code would be shipping on billions of devices,” Deutsch says, “which would be a pretty good impact for a game developer.”