Short #2 Leave these parameters alone

lemmings_portal_method_parameters
You’re updating an old method by adding only two simple lines of code at the end, but something is really wrong here. You checked all the method calls and parameters that you’re passing, but they are correct. So maybe their values are incorrect? You run a debugger and check. Nope, they are perfectly fine. The problem might be in the function itself, but it worked like a charm until now, so you’re rechecking your two lines and you still cannot see any issues. Continue reading “Short #2 Leave these parameters alone”

Short #1 Don’t stick to ‘no negations in conditions’ rule

I mean, what’s the point? Let the code flow naturally after the ‘if’ and leave more unlikely situations for ‘else’ (displaying error for instance). In the ‘if’ block, you can put cases that are more natural for your game. A player wants to deal damage to living enemies. It is more common, as dead bodies are usually waiting for being cleaned up and are less attractive for the player. So: Continue reading “Short #1 Don’t stick to ‘no negations in conditions’ rule”