1
Python / Re: sf.Keyboard.is_key_pressed() expensive?
« on: August 07, 2014, 09:40:01 pm »
One question: Why do you have 70 objects checking for keypresses? What kind of game do you control 70 objects at a time?
If you really need to have this many objects controllable at once, you could optimize by saving the result of is_key_pressed each frame and just checking the variable.
If you really need to have this many objects controllable at once, you could optimize by saving the result of is_key_pressed each frame and just checking the variable.