I just noticed that pygame rendering works so slow on OSX... I thought that the problem is in my code, but when I run the same code on windows it runs much faster.. (on OSX I get ~25fps, on windows ~1700)... Is there any way to speed up pygame on OSX? Or maybe I have to use other programming languages for creating nice and fast working games on OSX? And the sample code that I was using for this test...
import pygame
from pygame.locals import *
import time
import sys
pygame.init()
width = 28*40
height = 28*21
DISPLAYSURF = pygame.display.set_mode((width,height), DOUBLEBUF)
x, y = [0,0]
t = time.clock()
speed = [1,1]
while(True):
pygame.draw.circle(DISPLAYSURF, (255,0,0), (x,y), 10)
if x>width or x<0:
speed[0]=-speed[0]
if y>height or y<0:
speed[1]=-speed[1]
x+=speed[0]
y+=speed[1]
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
print(1/(time.clock()-t))
t = time.clock()