Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Switching from Pygame  (Read 8667 times)

0 Members and 1 Guest are viewing this topic.

Rukiri

  • Newbie
  • *
  • Posts: 11
    • View Profile
    • Email
Switching from Pygame
« 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...

Code: [Select]
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.


Sonkun

  • Moderator
  • Full Member
  • *****
  • Posts: 241
    • View Profile
Re: Switching from Pygame
« Reply #1 on: March 17, 2013, 01:58:24 pm »
I don't know Pygame but if you tell us what it does, we can come up with the equivalent :)
Interested in using SFML with Python ? Try out its Python binding!

shackra

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://swt.encyclomundi.org
Re: Switching from Pygame
« Reply #2 on: April 18, 2013, 08:26:22 pm »
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 which is the most quickies way to draw things and displaying them on the Window.

GNU User
Python programmer
Blog