C++11 gave us enum class and while it’s great to have scoped enums I don’t find it great for error handling. Let’s talk about why.
Most of my readers, I hope, have been able to use C++11 for a while now (if not hello, I’m sorry the world has changed to become this weird during your 14 years sleep). With it came a small change that allowed for better scoping of names without resorting to weird quirks: enum class. The idea is simple: owing to C, enum values in C++ belong to the class or namespace they are declared in but if we add the class keyword to the declaration they know become their own scope instead of leaking to their parent.
Let’s talk about game simulations. In this episode we look at different ways to approach task-based parallelism.
During summer we explored some simple multi-threading models. They had the advantage of giving us a migration path for existing code that runs a very serial/imperative simulation. Now is the time to explore what other approaches we could take for a new project, or if we’re willing to refactor a lot of existing logic. Today we look at task-based parallelism.
We take a little break from our “What Makes A Game Tick” series to get a little bit philosophical about the topic of performance and what it means for different people.
I was at CppNorth a month ago and after listening to a few talks and having conversations with fellow speakers and attendees I realized that despite all of us being here because we care about performance to some degree (else we’d all be doing Python or Javascript or something) when it came to nitty-gritty details, I wasn’t sure we were talking about the same thing. And maybe that could explain some of the disconnect I can sometimes observe between various industries talking about using C++ on social media?
Let’s talk about game simulations. In this episode we go back to code architecture and check out a few approaches to using multiple threads.
After a threepartdigression about scripting, it is time to revisit our first two articles. Back then we mentioned how some of the common engines on the market handle ticking in a somewhat crude virtual void Tick() {} fashion. Today I wanna show some alternatives I have used when making Grand Strategy Games.
Let’s talk about game simulations. Today we look at some more real life script performance issues and discuss the two hard problems in computer science.
Last time we studied one real life case of script performance related to gameplay. While it required a bit of game knowledge, and perhaps more software engineering experience than what we expect designers to have, it was easy enough for us to fix and could be done entirely without access to code. But sometimes studying those performance bottlenecks reveal problems that run deeper and require some re-engineering to be properly solved. Today we look at an art bug from early Victoria 3.