- Joined
- Aug 28, 2013
- Messages
- 316
- Reaction score
- 36
- First Language
- English
- Primarily Uses
I was experimenting with window x, y, width, and height, and I found something interesting about them.
I tried the following code:
And based on the result that I got, while the x and y operator methods don't affect anything, the width and height operator methods will slow down your game by speed / 2n (with n is equal to how many times operator method is called, and of course 2-n is a rough rounding).
Does anyone has any clues about it?
Edit:
Btw,
use the following code if you want to see how your game is moving frame by frame.
I tried the following code:
class Window alias test_update update def update test_update #self.x += 0 #self.x += 0 #self.x += 0 #self.x += 0 #self.y += 0 #self.y += 0 #self.y += 0 #self.y += 0 #self.width += 0 #self.width += 0 #self.width += 0 #self.width += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 endend
Does anyone has any clues about it?
Edit:
Btw,
use the following code if you want to see how your game is moving frame by frame.
Code:
class Window alias test_update update def update test_update self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 self.height += 0 endend
Last edited by a moderator:

