Why do random spawning labels speed up another moving label? Why do random spawning labels speed up another moving label? tkinter tkinter

Why do random spawning labels speed up another moving label?


It is more likely to do with that there is nothing in your code that regulates the speed of your animation. The reason that your animation is more stable on a different computer could be to do with your application getting a more even share of the resources on the second machine, this making your animation play at a more constant rate.

Depending on your machine factors such as network activity, disk activity, ram size, swap size, graphics cards, disk fragmentation etc etc etc could all affect the speed at which a free wheeling piece of code runs (I.e. Code which makes no attempt to regulate it's own speed)

You should research timing loops and frame rates, but basically your code should try to regulate the animation rate itself - one common technique is to decide how often to do an animation frame (say once every 1/25s) and use a simple clock/sleep technique to ensure that you only animate that fast.

Btw : a sample size of two is not a big enough sample with which to draw any conclusions, about your code, or your computers.


A bit like Tony said, your code isn't the issue, but rather the fact that no two computers are exactly the same. We can guess what is wrong with one of them, but will never truly know, and you cannot really solve this, except for avoiding the computer in question or by regulating your code.


Ok it appears that the problem was not to do with the code for the bonus labels (although it must have played a part), but more an issue with the computer I was using. It appears that the above code works with most (?) computers, but the one I was on was not one of them.