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 - wurzeldrei

Pages: [1]
1
Python / Problem with views and python
« on: June 29, 2008, 07:17:14 pm »
Is there a release date for the python bindings?

2
Python / Problem with views and python
« on: June 29, 2008, 06:34:58 pm »
When I use
Code: [Select]
view=sf.View(sf.FloatRect(0.0,0.0,WIDTH,HEIGHT),1)
and later
Code: [Select]
window.SetView(view)
I get an "Segmentation fault (core dumped)" error, window is a RenderWindow-Instance and WIDTH and HEIGHT are 1024 and 700 which is the size of the RenderWindow, too. I'm usind linux.

I use Version 1.2, because there is no python-binding for 1.3, is this a problem with the library?

3
Feature requests / More Keys for Press/Release events
« on: June 17, 2008, 09:12:35 am »
I think this is not what the additional function would be good for, since if one has to send keys over network (i think, this is not a good idea in general) he can just use the standard method. But most games will provide an interface to change the key bindings for that game, especially for that user on that platform.
I think there are better solutions, but very much harder to implement:
- Provide all keys on all keyboards via the standard method, here we had to add pages of key codes for some systems,
- Provide a complete key binding management that holds the raw key codes in a black box so programmers are not able to do unwanted things with them (sending key codes over network ;-) )
For the last thing i would suggest a BindingManager class that can be used as follows:

Code: [Select]

z=enum{C_GAME_EXIT, C_JUMP, C_RIGHT}
A=BindingManager()
A.Learn(C_GAME_EXIT) %waits for user input and saves raw key code internally


   while window.GetEvent(event):
      if event.Type==sf.Event.Closed:
         running=False
      if event.Type==sf.Event.KeyPressed:
         if A.Get(event)==z.C_GAME_EXIT: %Returns code (z-value) for the event saved in event
            running=False

    4
    Feature requests / More Keys for Press/Release events
    « on: June 16, 2008, 09:19:04 pm »
    i think you get key codes from the os (of course os- and locale-specific), if there was a function RawCode containing that os code (from Windows API or X11) i could write

    Code: [Select]

    while window.GetEvent(event):
    if event.Type==sf.Event.Closed:
    running=False
    if event.Type==sf.Event.KeyPressed:
    if event.Key.RawCode==KEY_END:
    running=False


    and fill KEY_END on first run of my game by user input, sorry if my english is bad, school is long ago..., i'll train

    5
    SFML projects / Papertanks
    « on: June 16, 2008, 11:36:19 am »
    I've just started playing with sfml to develop some multiplayer game like the commercial Space Tanks which is a 2d space game. I started with sdl, but the sprite rotation is much better in sfml.

    6
    Feature requests / More Keys for Press/Release events
    « on: June 16, 2008, 11:33:33 am »
    What about providing an additional function to fetch raw key codes. I have german keyboard layout and no access to the Umlaut-keys or tilde, dot, comma, plus or minus. If there were a method to fetch raw key codes one could implement a user interface to configure the keys when the game starts for the first time. So we would not have any problems with different systems.
    By the way: is it possible to do this on my own in python without having to patch the library?

    greetings,
    wurzeldrei

    Pages: [1]