Closed benekoehler closed 1 week ago
Thank you for the changes.
When including stuff from the C standard library, use <... .h>
instad of "... .h"
. Also include stdio.h
where printf
is used.
Okay. We're getting into a very important stage of the program now: Looking how we can integrate entities and their logic without creating a really big mess. @benekoehler is going to tackle this (good luck ;) ). A few notes that I want to see (most of it was already communicated in person with @benekoehler):
game.cpp
!CWorld
rather than have entities do things by themselves. Take this advice with a little bit caution: If it is the easiest thing to get stuff done and is for everyone the easiest code to understand than storing a pointer to CWorld might be okay (for now).I care a lot about this. At the same time I am guilty of all of the things I mentioned above: I tend to overcomplicate things, and it always has hurt me in the past. I know this is not easy to get right and I don't have the absolute answer to how entities should work. I am looking forward to see what you come up with @benekoehler . Good luck :100:
Cheers.
Overall, this looks good!
Just get rid of
cout
and overloading the<<
operator for printing. Also don't get in the STL's version of C headers and iostream:There are some modern C++ things in it like iterating over the map via auto. I think this is fine for now. Just note that we are going to replace the entire STL later. Look at id-tech3 source, as mentioned before. Not sure about the templated stuff. Again, see tech design document. Also give this a watch (regarding templates): https://youtu.be/qWJpI2adCcs