Wow thanks for that, I’ve downloaded the pdf and plan to read it sometime.
Just remember I’ve never done any python programming at all really, so this is brand new and I’m just wrapping my head around how the logic works in bge.
Why do you need “player” in the is snippet
I was using a youtube video and was just copying the code and changing variables to see what they affected. Yes you’re right proper naming conventions are important.
In regards to script vs module, I totally understand. As I see it a module is sort of like a class, much like a java class where you can call the properties direct. However, this abstraction is quite confusing for newbies especially used to functional programming, so until I get comfortable with python I won’t be using modules any time soon.
At least do not call your code “main”. This does not express what it is supposed to do.
I’m not quite sure how main works with python. I know in c++ we always define int main() as the entry point, so I just assumed this is how it works in python and bge. It’s also a curious point to make as the default game_logic template has def main(). So why would they include def main() if it was bad practice? Very odd.
Thanks in advance for clarifying my questions. I’m sure I’ll have more at some point.