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

Pages: 1 ... 10 11 [12]
166
General discussions / Re: SFML 2.0 RC
« on: May 16, 2012, 05:29:07 pm »
If this was explained, I wouldn't be here for asking :) I didn't expect anything special for events that are triggered when a window closes but as I'm writing a binding I wanted to be sure.

167
General discussions / Re: SFML 2.0 RC
« on: May 15, 2012, 11:08:29 pm »
The documentation about events says "Depending on the type of event, the event instance will be filled with different parameters" but where to find more about how is filled an event when it's a precise type of event ? E.g: if the event type is sf::Event::Closed, how is the event filled ? The same question for the other seventeen one.

168
General discussions / Re: Another python binding: python-sfml2
« on: May 12, 2012, 07:06:43 pm »
That's what I planned :p Actually I stopped working on the binding in the middle of January because I had to leave abroad but now I'm back, I wanted to release my work before going on and update the project with the sfml2-rc. I worked hard to provide a nice documentation, tutorials, etc but now everything has changed and I must redo. But thanks for this piece of advice anyway, I'll take it :)

169
Lol, look at where your return statement is. "While the window is open, close the program".

170
General discussions / Re: Another python binding: python-sfml2
« on: May 11, 2012, 08:36:35 pm »
I must add for Windows users I didn't try to compile on this platform and feedbacks would be appreciated.

171
General discussions / Another python binding: python-sfml2
« on: May 11, 2012, 03:24:59 pm »
A MORE RECENT VERSION IS AVAILABLE! HERE


Hello everybody,

I wanted to let you know about my project, a python binding for sfml2. Also written with cython and it was forked from the official python binding written by Bastien LĂ©noard on the 20th November 2011 because I needed some features at once to write my current C++ projects in Python.

It has since then widely improved and I decided to share my work.

The release I'm about to introduce is based on a snapshot of sfml2 which was available on the 20th November 2011 that I used to call sfm1.9. I decided to stay and work with this version because maintaining a binding up-to-date with the very latest changes is time consuming (also because I have projects which depend on the binding and a change made in sfml2 involves a change in the binding which involves changes in all my projects).

This release version is v0.9 and I hope to provide for the next one (v1.0) a binding compatible with the release candidate; I've already started working on it.

Despite its dependency on the snapshot, it provides some features that may interest people.

What has changed since its fork ? (copy-paste from the documentation)
  • network module implemented.
  • sound module rewrited.
  • some current limitation of the module have been fixed such the derivability of sf.Drawable.
  • modules are implemented separately; you can import each module independently.
  • support cython 0.16 (faster).
  • many official examples are available and new examples have been added (such integrating with pyqt4).
  • an extra-layer to the sfml has been added to avoid dealing with type and to provide more flexibility
  • available trough depot in launchpad for ease of installation.

I suggest you to read the documentation to know more: http://openhelbreath.net/python-sfml2/0.9/doc/introduction.html

How to install ?
Just read the doc about compiling and if you are on ubuntu 12.04, packages are available trough a launchpad ppa. Type:
Code: [Select]
sudo apt-add-repository ppa:sonkun/sfml
sudo apt-get update
sudo apt-get install libsfml2-dev python-sfml2

Notes that the packages provide examples too, you may want to install sfml2-examples or/and python-sfml2-examples, then you just have to type:
sfml2-<examples name>
python-sfml2-<examples names>

For examples:
Code: [Select]
python-sfml2-pyqt4 # will run script pyqt4.py that use the binding.
sfml2-sound
pyton-sfml2-shader

If you are interested in following the version 1.0 development and having automatic updates, I'll set up another depot named sfml-development with sfml2-rc in and the binding as well.

Links:
Main website: http://openhelbreath.net/python-sfml2/
Documentation: http://openhelbreath.net/python-sfml2/0.9/doc/
Downloads: http://openhelbreath.net/python-sfml2/downloads/ or https://github.com/Sonkun/python-sfml2/downloads
Bug-tracker: http://openhelbreath.net/python-sfml2/flyspray/
Launchpad ppa: https://launchpad.net/~sonkun/+archive/sfml

172
General discussions / Re: SFML 2.0 RC
« on: May 06, 2012, 01:39:40 am »
When I say ugly, I'm talking about writing CircleShape, ConvexShape (which should be ConvexPoligon by the way) and RectangleShape. Theese name are long because of the substring "Shape" which make things ugly.
You have a quite... special understanding of ugly. sf::Shape::Rectangle is more beautiful because it is... hm, longer? Or do you always write using namespace as soon as you see a namespace?

Honestly, the names match their meaning perfectly. "Shape" is the base class, and "RectangleShape" is a specialized shape (namely a rectangle), so its name is standing to reason.

Finally you are right. Maybe because I'm used to write sf::Shape::Rectangle() to create my rectangle.

When I say non-natural, I'm talking about why RectangleShape doesn't inherit from ConvexShape because a rectangle is no more than a convex polygon.
Probably because some functions like setPointsCount() are not appropriate for a rectangle.

Why can't I move my RectangleShape's points anymore
You can, using setSize() and setPosition().
The reason may be about hardware acceleration but I can make a Rectangle using ConvexShape with wich I can move the point as I want. I thought I could use RectangleShape not to start from scratch when I want to make a parallelogram.


why have point's properties (color, outline color) disappeared ? I found them very useful.
There is now less confusion with global/point-local color. The special case of differently colorized points can still be achieved with sf::VertexArray.
I did not notice this class. How do I set a color ?

173
General discussions / Re: SFML 2.0 RC
« on: May 05, 2012, 07:54:31 pm »
It's just a personal opinion but I think the design of the sf::Shape part of the API is ugly and non-natural. Of course, I know nothing about the under layer (which is OpenGL) so I won't criticize. If SFML 2.0 is meant to be a widely used version, from my point of view, this should need a face-lifting before being released :)

When I say ugly, I'm talking about writing CircleShape, ConvexShape (which should be ConvexPoligon by the way) and RectangleShape. Theese name are long because of the substring "Shape" which make things ugly. Why don't you put everything in a namespace named sf::Shape ?

When I say non-natural, I'm talking about why RectangleShape doesn't inherit from ConvexShape because a rectangle is no more than a convex polygon. Why can't I move my RectangleShape's points anymore and - by the way - why have point's properties (color, outline color) disappeared ? I found them very useful. Now I would understand if this comes from a technical reason belonging to a layer below the SFML but it took interest in using sf::Shape. Why don't you add other shapes such sf::TriangleShape.

I just want the best for Simple and Fast Multimedia Library :)

Pages: 1 ... 10 11 [12]
anything