Modern C++ gamedev: thoughts and misconceptions
vittorioromeo.info
Modern C++ gamedev: thoughts and misconceptions
1–10 of 221 posts
Re: Modern C++ gamedev: thoughts and misconceptions
#2> In my particular scenario, all the texture file paths are hardcoded
That feels like a very unique case. Usually data is given in a vector or something and then you're out of luck anyways. Plus the syntax is very unintuitive (think about your colleagues), debuggability is zero.
Also the argument about constness feels a bit contrived. Sure with this you can write const and feel good, but the other version is hardly a bad nonconst. You can wrap things in functions or whatnot. The function seems to be a bit long anyways.
Re: Modern C++ gamedev: thoughts and misconceptions
#3I agree with the author on many things - parameter packs however.. I've looked at them several times. Even if you get a grasp on their syntax, I've almost never been in a situation where they could be used. As he correctly observes it's a compile time thing. > In my particular scenario, all the texture file paths are hardcoded That feels like a very unique case. Usually data is given in a vector or something and then…
Re: Modern C++ gamedev: thoughts and misconceptions
#4Re: Modern C++ gamedev: thoughts and misconceptions
#5[1] https://www.youtube.com/playlist?list=PLTEcWGdSiQenl4YRPvSqW...
Re: Modern C++ gamedev: thoughts and misconceptions
#6Re: Modern C++ gamedev: thoughts and misconceptions
#7Re: Modern C++ gamedev: thoughts and misconceptions
#8After years of experience writing code for games, I find that the dumbest code is the best code. It doesn't matter if it's C# or C++, whenever I've used something like reactive extensions or template metaprogramming, it has been a terrible mistake every single time. Make your code simple, dumb and verbose all the time. Avoid using any complex abstractions or any overcomplicated syntactic sugar and you'll have a codeb…
Named parameters, for instance. It's insane that function parameters still can't be specified in any order with name=value expressions. That would have saved numerous bugs over the years, but apparently I'm the only one who thinks so. When a language such as C++ is harder to use than Verilog, somebody has screwed up badly.
Re: Modern C++ gamedev: thoughts and misconceptions
#9After years of experience writing code for games, I find that the dumbest code is the best code. It doesn't matter if it's C# or C++, whenever I've used something like reactive extensions or template metaprogramming, it has been a terrible mistake every single time. Make your code simple, dumb and verbose all the time. Avoid using any complex abstractions or any overcomplicated syntactic sugar and you'll have a codeb…
Re: Modern C++ gamedev: thoughts and misconceptions
#10After years of experience writing code for games, I find that the dumbest code is the best code. It doesn't matter if it's C# or C++, whenever I've used something like reactive extensions or template metaprogramming, it has been a terrible mistake every single time. Make your code simple, dumb and verbose all the time. Avoid using any complex abstractions or any overcomplicated syntactic sugar and you'll have a codeb…