I think the check was that if the size is zero, then the data doesn't exist (hence no pointer is needed).
Ah, so 'this->ImportantPointer' is uninitialized, and the correct code should've been e.g: else { this->ImportantPointer = nullptr; }.
I think the check was that if the size is zero, then the data doesn't exist (hence no pointer is needed).
Ah, so 'this->ImportantPointer' is uninitialized, and the correct code should've been e.g: else { this->ImportantPointer = nullptr; }.
Level design rules. A game is only as good as its levels and this is one category that I'm spending time to learn myself. The player is not going to care about the code. Does the character move? If yes, then you're good. The excitement of playing the level is a big factor. Are there lots of secret areas? Is the level challenging. I recently learned that by adding warp pipes to a level it is much more fun due to the access of secret areas. So I'd say learn level design more and coding second.
That code is immediately smelly to me. No initializer list? And especially no initialization of the pointer member in all cases?
Stuff like this is why I support having a peer review process for every submission.
Francoisdiy, I believe you meant to post in this thread:
Coding vs Level Design
Thread is eight months old; locking.