SFML community forums
Bindings - other languages => Python => Topic started by: Rukiri on March 16, 2013, 11:38:36 pm
-
I'm really interested in using SFML mainly for hardware acceleration and we know that SDL is software accelerated which can make the game slow especially if you're doing anything 3D (I am or was doing a Mode7 in Pygame but it was pretty slow, currently working on a final fantasy rpg kit in python)
I seem to have gotten most of the commands down for SFML butt here's one command that I have not and that is surface, unless pysfml has surface that'd be great...
ground = pygame.Surface((1000,1000))
ground.fill((0,128,200))
for n in range(100):
c = random.randint(64,127)
x = random.randint(0,900)
y = random.randint(0,900)
pygame.draw.rect(ground,(0,c,c*2),(x,y,100,100),0)
sky = pygame.Surface((800,300))
sky.fill((16,64,255))
pygame.draw.circle(sky,(255,255,64),(100,100),50)
http://www.pygame.org/docs/ref/surface.html
I'm basically trying to convert my Mode7 demo from pygame to pysfml and because pysfml is faster than pygame it should run smoother and that's what I'm hoping for.
-
I don't know Pygame but if you tell us what it does, we can come up with the equivalent :)
-
I seem to have gotten most of the commands down for SFML butt(?) here's one command that I have not and that is surface, unless pysfml has surface that'd be great...
We have RenderTexture (http://python-sfml.org/api/graphics.html#rendertexture) which is the most quickies way to draw things and displaying them on the Window.