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

Pages: [1] 2 3
1
SFML projects / Another tile map editor
« on: April 08, 2014, 09:52:19 pm »
Hello.

I introduce you my own tile map editor, made with pySFML and gobject-introspection (gtk3 on python). Actually, it doesn't work on Window, because Gtk's Dlls are "broken" (I have some problems with texts.....)

The format of the map is a XML format. I think it is easier to use this format for its implementation.

Actually the main part of the program works : I can save and open my format file, use dynamic and static tiles on layers, set tile properties (name, type) and soon others properties made by you ! You can also make objects, etc.

You can find the code here : https://github.com/Gaulois94/TiledMapEditor

The pysfml version you have to use is on my repository : https://github.com/Gaulois94/python-sfml because I add on it some function for the implementation with Gtk.



The maximum of the map is around "45x45" (because the Minimap crash after that, I'm looking why).

Else, the program is slow after.... 50x50 on my computer.

Thank you for your reading, and sorry for my english :) .

2
I up this thread again in the hope that we can find a solution about our problem :) (1 mouth it's a bit long, no ? :) )

3
I up this thread for knowing if a solution could be find.

4
Python / Re: How to install ubuntu 12.04 on PySFML (Python3.3.2)
« on: July 30, 2013, 01:35:11 pm »
For installing pySFML, you need SFML writting in C++

5
I tried cx_freeze today, and I have the same problems. Creating executable for windows is very a difficult stage :D .
cx_freeze create 5 file : sfml.<module>.pyd (where <module> are graphics, window, network, etc.).

6
Python / Re: Somes problems with sf.Event
« on: July 18, 2013, 06:49:27 pm »
Yeah I find the solution : Replace
if self.__class__ is not RenderWindow:
by
if not isinstance(self,RenderWindow)
in drawable.pyx :) .

I think others objects haves this problem with inheritance. Please, check them when you have time :D

7
Python / Re: Somes problems with sf.Event
« on: July 16, 2013, 12:03:28 am »
Check the french forum, I think you will more understand than here (where I speak English x) ).

8
Python / Re: Somes problems with sf.Event
« on: July 13, 2013, 04:50:46 pm »
Sorry it's me again. I went to see your code, and I see a very strange thing :
def __init__(self, VideoMode mode, title, Uint32 style=sf.style.Default, ContextSettings settings=None):
                if self.__class__.__name__ != 'RenderWindow':
                        if self.__class__ is Window:
                                if not settings: self.p_window = new sf.Window(mode.p_this[0], toEncodedString(title), style)
                                else: self.p_window = new sf.Window(mode.p_this[0], toEncodedString(title), style, settings.p_this[0])

                        else:
                                if not settings: self.p_window = <sf.Window*>new DerivableWindow(mode.p_this[0], toEncodedString(title), style)
                                else: self.p_window = <sf.Window*>new DerivableWindow(mode.p_this[0], toEncodedString(title), style, settings.p_this[0])
                                (<DerivableWindow*>self.p_window).set_pyobj(<void*>self)

Why you didn't do an else about this line : if self.__class__.__name__ != 'RenderWindow': ?
Others things, I see the missing variables are on DerivableWindow. I think it miss a call about his constructor.

Thanks again :) .

9
SFML projects / Re: 2D platformer using SFML 2.0 and Box2D 2.2.1
« on: July 13, 2013, 04:42:54 pm »
Very good for a first project, espacially if you are new on C++ and sfml. You had to spend many time on front of your computer during this 2 mouth :) .

10
Python / Re: Somes problems with sf.Event
« on: July 13, 2013, 04:19:13 pm »
Hi again :) . For the problem, I see that the view is also resize,  (whereas the default behaviour is that the view isn't resize).

11
Python / Re: sf.Vector2(sf.Vector2) create some problems
« on: July 13, 2013, 12:11:29 am »
Thanks :) . I do it many times because I need to copy the vector (for not modifie the first).

12
Python / [Solved] sf.Vector2(sf.Vector2) create some problems
« on: July 10, 2013, 09:52:34 pm »
Hi . I'm post today for saying that if you do newVector = sf.Vector2(vector) where vector is a sf.Vector2 too, then newVector.x is a sf.Vector2 and newVector.y = 0. Can we have a constructor who do a copy of the first sf.Vector2 ? Thank you :) .

13
Python / Re: Somes problems with sf.Event
« on: July 09, 2013, 01:06:11 pm »
Maybe with this code you can find the problem :
#!/usr/bin/python3
#-*-coding:utf-8-*-

import sfml as sf

class Window2(sf.RenderWindow):
        def __init__(self, MODE, STRING):
                sf.RenderWindow.__init__(self, MODE, STRING)
window = Window2(sf.VideoMode(800,600,32),"teste")
window.framerate_limit = 60

check = sf.CircleShape(20)
check.position = sf.Vector2()

while window.is_open:
        for event in window.events:
                if type(event) is sf.CloseEvent:
                        window.close()
                if type(event) is sf.ResizeEvent:
                        print(1)

        window.clear()
        window.draw(check)
        window.display()
 

I tried with the lateste sfml git version and with the official 2.0 version. I use your git repository and python3

and the error are :
1Traceback (most recent call last):
  File "./test.py", line 20, in <module>
    print(1)
AttributeError: 'str' object has no attribute 'on_resize'
 

or
1Traceback (most recent call last):
  File "./test.py", line 20, in <module>
    print(1)
SystemError: null argument to internal routine
 

Sorry for problems :) .

14
Python / Re: Somes problems with sf.Event
« on: June 20, 2013, 01:08:08 pm »
Here you can find screenshots who explain the problem :
As you can see, I have many errors of segmentation. With a resize, the circle is not resized :


Thank you :) .

15
Python / Re: Somes problems with sf.Event
« on: June 19, 2013, 12:50:09 pm »
Sorry, for me "pass" works with generator, but may it's because I use python 3.3. I tried this code :

#!/usr/bin/python3
#-*-coding:utf-8-*-

import sfml as sf

class Window2(sf.RenderWindow):
        def __init__(self, MODE, STRING):
                sf.RenderWindow.__init__(self, MODE, STRING)
window = Window2(sf.VideoMode(800,600,32),"teste")
window.framerate_limit = 60

check = sf.CircleShape(20)
check.position = sf.Vector2()

while window.is_open:
        for event in window.events:
                print("ok")

        window.clear()
        window.draw(check)
        window.display()
 

but the conclusion is the same : I have an error of segmentation....

sorry for the problem.

Pages: [1] 2 3