Thanks for the comments. Indeed, sometimes too much is happening at the same time, which overloads the CPU and causes some sprite flicker. I tried to minimize it as much as possible...