May I add my personal feelings about PySFML, after having used it for about 20 minutes.
So this is the point of view of a complete beginner with PySFML, but with good knowledge (not expert) in Python, and with a PyGame background.
Note: this is from a user point of view, I realize any of these may be hard / impossible to implement, or would need an update of the underlying C++ layer.
Also my goal is not to offend anyone, I find SFML and PySFML very easy to use, and efficient at the same time.
It's just, I feel that with a bit more love and polish on the Python side, PySFML could be even easier and Python friendly.
Use python naming convention.
For example use capitals for class names only,
we shouldn't write
sprite.SetPosition(10,10)
but
sprite.setPosition(10,10)
# or
sprite.setposition(10,10)
# or
sprite.set_position(10,10)
Don't use method calls for setting / getting simple attributes, use direct access.
For example, we shouldn't write
positionVariable = sprite.GetPosition(10,10)
sprite.SetPosition(10,10)
but
# get position
positionVariable = sprite.position
# set position
sprite.position = (10,10)
sprite.position.x = 20
Use tuples instead of classes that are used as simple data holders without methods, like the Color class.
For example, we shouldn't write
window.Clear(sf.Color(100,100,100,255))
but
window.Clear((100,100,100,255))
Simpler module import.
As already pointed above, we shouldn't write
from PySFML import sf
but
import sf
Don't force us to create empty objects, just as placeholders; instead return them directly, ready to use.
For example, we shouldn't write
event = sf.Event()
while window.GetEvent(event):
but
for event in window.GetEvent():
As already pointed above, we shouldn't write
image = sf.Image()
image.LoadFromFile("imageFile.png")
but
image = sf.Image("imageFile.png")
Allow negative sprite scaling instead of the flip method
For example, we shouldn't write
sprite.FlipX(True)
but
sprite.SetScale(-1,1)
# ideally
sprite.scale.x = -1
# or
sprite.scale = (-1,1)
I will add more when I'll be more familiar with the rest of the API.