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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sebastiend

Pages: [1]
1
General / Key code problem
« on: March 18, 2008, 01:06:02 pm »
I encounter something strange:

Code: [Select]
from PySFML import *
     
if __name__ == "__main__":
    global window
    window = sf.RenderWindow(sf.VideoMode(800, 600, 32), "SFML Window")
    global running
    running = True
    while running == True:
        evt = sf.Event()
        while window.GetEvent(evt):
            if evt.Type == sf.Event.Closed:
                running = False
            if evt.Type == sf.Event.KeyPressed:
                print evt.Key.Code
        window.Display()

This display 51 each time I press a key indepently of the real code.
Could it come from my compilation or system as I use a 64 bits Fedora?

2
Python / Python
« on: March 14, 2008, 08:55:35 am »
Did you get python files generated in the way you made the python binding?
They would not be usefull for the library itself, but the IDE will be able to display available functions in a selection menu.

3
General / Clocking
« on: March 13, 2008, 08:43:18 pm »
Sorry.
It is my fault. Reusing the class in the same way into a test program works, except that I still don't know what make the first implementation wrong.

4
General / Clocking
« on: March 11, 2008, 08:37:22 pm »
I get a problem with the clock.

The following code works:

Code: [Select]
from PySFML import *

if __name__ == "__main__":
    clock = sf.Clock()
    print clock.GetElapsedTime()
    clock.Reset()
    while True:
        if clock.GetElapsedTime() >= 10.0:
            print "Tick"
            clock.Reset()


I followed the same scheme into a class making units and a program havind a drawing part but clock looks staying at this value: 1205263872.0

Here is my function:
Code: [Select]
       if self.clock.GetElapsedTime() >= 10 and len(self.buildingQueue) > 0:
            self.parent.addUnit()
            self.buildingQueue.pop(0)
            self.clock.Reset()

Seconds don't seem to matter, the queue is completely proceeded with no delay. The function is called each frame to check if a unit must be created according to the delay.

5
Python / Solved
« on: March 07, 2008, 04:22:57 pm »
Solved.
The name used by the package is PySFML.

6
Feature requests / Some features
« on: March 07, 2008, 02:15:11 pm »
I think it won't be too hard making it work with chipmunk. For 3D models, perhaps opengl calls will be usefull.

About Gui, an existing system which has an opengl renderer is CEGUI, with a lot of widgets.

7
Python / Python
« on: March 07, 2008, 02:09:36 pm »
What is installed with the python package, and where? I did:
Code: [Select]
python setup.py install
It does not reply anything, but there is nothing into both /usr/lib/python2.5/site-packages and /usr/lib64/python2.5/site-packages
Code: [Select]
import sfml doesn't work, of course.

8
Feature requests / Some features
« on: March 06, 2008, 10:06:07 pm »
What are SFML underlying libraries? I have seen it is openal for sound. SDL and Opengl for gfx? Network?

9
Feature requests / Some features
« on: March 06, 2008, 08:24:04 pm »
SFML looks really promising good things for now and the future.

I am currently using the pygame Python library and some features would be interesting if implemented with SFML. I think about sprites groups. It also manage collisions (Only rectangles); so having collisions managed by polygons would not be too much. Having an integrated physics engine or a bridge with an existing one could also improve some games gameplay, even if others may not need it.

Anyway, SDL can render opengl spaces. Still in Pygame, using it make you unable to use both sprite and draw modules. What would be nice is to replace characters sprite animation by a 3d model making it smoother, but still exploring a 2d tilemap like Nintendo has done for both zelda and mario.

Making the first part (sprite groups) could be in my abilities; others, why not with time and good documentation.

Pages: [1]
anything