10,318 reputation
12650
bio website klaimsden.net
location France
age 31
visits member for 4 years, 3 months
seen 10 hours ago

Making games with my bare hands. Building narratives with my forehead.


Dec
9
comment Allow iteration of an internal vector without leaking the implementation
You should probably also show the same code using auto as return types of iterator functions when using C++14.
Sep
30
awarded  Great Answer
Sep
15
awarded  Yearling
Jul
29
comment Are `break` and `continue` bad programming practices?
That answer is a rule of thumb, not a hard rule. It works in most cases, feel free to break it if it make sense in your context.
Jul
17
awarded  Good Answer
Jul
2
awarded  Curious
Jun
25
awarded  Nice Answer
Jun
17
awarded  Good Answer
Jun
3
comment How to maintain encapsulation with composition in C++?
I think it is best explained in details in Game Engine Architecture book, so again I recommend that you read the chapter about game object management, you might understand better. I will try to complete my answer when I have time though.
Jun
3
comment How to maintain encapsulation with composition in C++?
About inheritance, it's a long subject but 1) having arrays of objects to udpate is faster than having to go through a tree of objects spread more or less randomly around in the memory, like you are currently doing; 2) inheritance is one of the strongest types of relationships between two types: the more you try to compose objects with different unrelated features (like in a lot of games) the more you will have inter-dependant code and changing one feature might have an impact on another feature. What you want is actual composition of feature which is the point of component design.
Jun
3
answered How to maintain encapsulation with composition in C++?
Jun
3
comment What are the fundamental differences between C and C++?
@JoeDF It was at the very beginning but it's actually "compatible with C" now which don't mean the same thing at all. You don't code in C in C++ and not all standard C is compatible with standard C++.
Apr
24
comment How to avoid “managers” in my code
@nashwan Also, I think we can agree, and it's a well known fact, that naming things is one of the hardest but most important task we do in programming.
Apr
24
comment How to avoid “managers” in my code
@nashwan My way of doing it is to 1. use the most common term (or verb) in the specific domain. 2. if there are several possible, use one that matche the closest concept to what you do 3. if there is no term specific, then it must be generic, use an online dictionary with synonyms and antonyms, navigate through possibilities to find a good term 4. if that don't work, look into other domains which have similar concepts and might have a term for yours 5. sometime you even have to find a human language specific word out of english if it's not possible to make it match with english exactly.
Mar
21
comment Version control for independent developers?
I have no idea if it is, it looks overkill but I do use Google Drive and DropBox for non-textual resource files, which complete at least the backuping point.
Mar
21
revised Version control for independent developers?
added 366 characters in body
Mar
21
awarded  Guru
Jan
23
awarded  Popular Question
Jan
18
awarded  Enlightened
Jan
18
awarded  Nice Answer