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

Pages: 1 [2] 3 4 ... 13
16
Python / Re: pysfml2-cython
« on: August 05, 2012, 10:32:09 pm »
The default font has been removed, like in C++ SFML.

The Cython bug that required to edit the sfml.cpp file should be fixed with this commit, but I haven't been able to try it yet: https://github.com/cython/cython/commit/01adf0000e88b70eaf3a7315cfeaf80aa4e21bc1
I'm not sure whether this is included in the 0.17 beta.

17
General discussions / Re: Default font removed in SFML 2
« on: August 05, 2012, 09:30:19 pm »
You added this in getFont(): “If the text has no font attached, a NULL pointer is returned”.
As far as I can tell, it's impossible to create a text with no font. When does this case apply?

Edit: maybe it would be nice to be able to specify the default font, so you don't have to pass your font every time you create some text.

Edit 2: I'm stupid, I didn't notice the no-parameters constructor.

Edit 3: if it's still possible to create a Text object with no font by calling the no-parameters constructors, why isn't it possible anymore to create one with a string but no font?

18
General discussions / Re: How to make music/sound, easily?
« on: July 12, 2012, 08:12:03 pm »
There are sound generators, this one is pretty nice: http://www.bfxr.net/

There are some music generators too: http://www.ludumdare.com/compo/2012/04/16/some-useful-music-generators/
Although personally I would prefer looking for free music.

19
General discussions / Re: SFML 2.0 RC
« on: July 09, 2012, 06:24:04 am »
I really like the Libertine fonts and they're free/libre/open source too.

Another license problem is that, as far as I can tell, you don't distribute the license with the binary dependencies. This is needed for the BSD license, for example.

20
General discussions / Re: Another python binding: python-sfml2
« on: June 25, 2012, 10:26:42 pm »
I guess I should give my opinion at some point. I find some of the changes in this binding interesting, and I will probably copy/adapt some of them. But overall, I find that your arguments actually don't support that such change is more pythonic, natural or makes more sense.

For example, you removed the copy() methods because “in Python copies are done via the copy module”. As it turns out, dict, one of the most basic classes in Python, has a copy() method.

Consider the following reasons not to use the copy module. The most obvious one is that operations on objects should be done via methods, as it's more natural in an object oriented language. Another one is that copy provides two kinds of copies, and it's not obvious which are supported. On the other hand, it's very easy to see if a copy() method exists, either via the documentation or the interpreter in interactive mode. I also think that making use of the copy module is overkill in the sense that deep copies don't seem to be needed.

In your third point, you don't give any reason why your design is better. You say that Python doesn't support multiple methods definitions, but that only matters to the implementer. I probably don't need to explain why emulating method overloading is often better for the users, especially those who come from C++ SFML.

I'm not sure what's the best way to implement vectors and rectangles. I think that they way they currently work is good enough, though. I think the way you describe Python's type system is misguided; there is a difference between, say, int and float, and Python enforces it. There is no static type checking, but that doesn't mean that any types can be mixed together. SFML also uses the different vectors and rectangles types for different purposes, which means that users should care what they are. It seems to me that the only question is whether or not these classes should be considered as generic containers.

As for missing classes, I'm open to suggestions. If there's a good reason to add them, I will do it. Streaming will be available soon(ish).

Overall, it seems that by “natural” and “pythonic”, you mean which that follows your opinion of how an API should look like, even when there are objective reasons to consider alternatives. I think that we should be rational when designing APIs, and recognize when the reasons that guided us are subjective. To be honest, it often seems to me that you're more interested in spreading slogans for your binding than having rational debates.

21
Python / Re: pysfml2-cython
« on: June 19, 2012, 01:22:04 am »
Just noticed that this website has installers for the latest source release, and it supports 2.6 as well as native 64 bits: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pysfml2

I installed his installer for 32 bits 2.7 for a quick test, and the bug-at-program-exit seems now gone. Can anyone confirm this?

22
General discussions / Re: Script to compile latest SFML
« on: June 07, 2012, 01:49:50 pm »
This is a good occasion to learn and use a library like Clint.

23
Python / Re: pysfml2-cython
« on: May 20, 2012, 02:10:43 pm »
Just noticed that this website has installers for the latest source release, and it supports 2.6 as well as native 64 bits: http://www.lfd.uci.edu/~gohlke/pythonlibs/#pysfml2

24
Python / Re: pysfml2-cython
« on: May 20, 2012, 02:47:09 am »
I just noticed now that SFML's default constructor creates an identity transform, so yeah it makes sense to support it in pySFML.

25
Python / Re: pysfml2-cython
« on: May 18, 2012, 12:25:51 am »
You can also use Transform.IDENTITY.

26
Python / Re: pysfml2-cython
« on: May 17, 2012, 11:15:55 pm »
I also added a tutorial for people who know C++ SFML and want to learn pySFML: http://pysfml2-cython.readthedocs.org/en/latest/cppdev-tutorial.html

As well as a “caveats” page: http://pysfml2-cython.readthedocs.org/en/latest/caveats.html#caveats

27
Python / Re: pysfml2-cython
« on: May 17, 2012, 10:55:51 pm »
I think I fixed it, but now I get a totally white screen. I get the same thing with in C++, however. I also uploaded a bugfix source release (0.1.1). Tell me that works for you.

28
Python / Re: pysfml2-cython
« on: May 15, 2012, 10:56:13 pm »
I explained the problem here: http://groups.google.com/group/cython-users/browse_thread/thread/5bc84c723b057c35

I uploaded a source release a day ago, if that's sufficient you can simply use that: https://github.com/bastienleonard/pysfml2-cython/downloads

If you really want to build from Git, you need to modify the generated sfml.cpp file.
You need all these declarations:

Code: [Select]
__PYX_EXTERN_C DL_EXPORT(PyObject) *wrap_time_instance(sf::Time *);
__PYX_EXTERN_C DL_EXPORT(PyObject) *wrap_render_target_instance(sf::RenderTarget *);
__PYX_EXTERN_C void set_error_message(char*);
__PYX_EXTERN_C DL_EXPORT(PyObject) *wrap_chunk_instance(sf::SoundStream::Chunk*, int);

I don't know if it's the same exact problem everywhere, but on my system I get the first declaration and not the others. So you can look for the wrap_time_instance() declaration, and copy-paste the others after it.

29
Python / Re: pysfml2-cython
« on: May 13, 2012, 12:51:00 am »
I have finally added two new installers, as well as a source release that doesn't require Cython: https://github.com/bastienleonard/pysfml2-cython/downloads
As usual, feedback is welcome.

The “crash at the end of the program” is still there. I'll try to fix it for the next release.

30
For some reason, Windows loaded the 64 bits opengl32.dll instead of the 32 bits one. As soon as I copied the 32 version in my directory, my binding worked. Luckily the problem doesn't happen when installing the module via the installer.

Pages: 1 [2] 3 4 ... 13