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

Pages: 1 2 3 [4] 5 6 7
46
Python / pysfml2-cython
« on: October 17, 2011, 11:59:26 pm »
Quote from: "bastien"
It looks like you didn't add the headers.
Yes, I think system32 is the right directory for DLLs.


Ok I added the includes. Now it gives me this error:

"failed to load and parse the manifest, file not found"

EDIT: Now I edited the python the way I found on some web page (adding /MANIFEST to args of some program) and the compilation finished, I guess. When I try to run a program made with SFML, I get this error:
Code: [Select]
Traceback (most recent call last):
  File "C:\Python27\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 325, in RunScript
    exec codeObject in __main__.__dict__
  File "E:\pysfml2\bastienleonard-pysfml2-cython-ca7f88f\examples\pong\main.py", line 9, in <module>
    import sf
ImportError: DLL load failed: File not found

47
Python / pysfml2-cython
« on: October 17, 2011, 07:17:49 pm »
I'm sorry, this is a little frustrating.

1. I downloaded the fresh SFML from github
2. I compiled Release and Debug in VC++2010.
3. I put all lib files in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib
4. I put all dll files in C:\Windows\System32 (no idea if this is right)
5. I downloaded fresh PySFML from girhub
6. I installed cython (no sf.cpp in your newest build)
7. I run setup.py, same list of errors as in the post before.

What am I doing wrong? Has anybody actually compiled this under Windows? As I've got the SFML.NET binding up and running, I'm really considering dumping my Python attempts. It's a shame, cause I really like python after first few looks.

48
Python / pysfml2-cython
« on: October 16, 2011, 09:55:44 pm »
Um, sorry, you mean the latest SFML no PySFML :oops:

Tell me please, where should I put the headers and libraries of SFML so that the MSVC compiler sees them? I guess this is what I'm doing wrong.

49
Python / pysfml2-cython
« on: October 15, 2011, 10:52:58 pm »
Hi Bastien!

I tried to compile the latest PySFML2 from your github page. I have VC++ 2010 Express installed on Windows 7 x64. I've got an error:

Code: [Select]
C:\Users\Przemek\Downloads\PySFML 2-0.0.1\PySFML 2-0.0.1>setup.py build_ext
running build_ext
building 'sf' extension
error: Unable to find vcvarsall.bat


I checked the PATH variable in my command line and I'm sure that C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC was added (this is where the vcvarsall.bat resides).

Going further, I followed a hint on some website to change line 243 of C:\Python27\Lib\distutils\msvc9compiler.py to toolskey = "VS100COMNTOOLS"

This is the result of the compilation:

Code: [Select]
running build_ext
building 'sf' extension
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include -IC:\Python27\PC /Tpsf.cpp /Fobuild\temp.win32-2.7\Release\sf.obj
sf.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
sf.cpp(560) : error C2039: 'Texture' : is not a member of 'sf'
sf.cpp(560) : error C2143: syntax error : missing ';' before '*'
sf.cpp(560) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sf.cpp(560) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sf.cpp(705) : error C2039: 'RenderTexture' : is not a member of 'sf'
sf.cpp(705) : error C2143: syntax error : missing ';' before '*'
sf.cpp(705) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sf.cpp(705) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
sf.cpp(1003) : error C2039: 'Texture' : is not a member of 'sf'
sf.cpp(1003) : error C2065: 'Texture' : undeclared identifier
sf.cpp(1003) : error C2059: syntax error : ','
sf.cpp(1798) : error C2039: 'IsButtonPressed' : is not a member of 'sf::Mouse'
sf.cpp(1798) : error C3861: 'IsButtonPressed': identifier not found
sf.cpp(1896) : error C2039: 'GetPosition' : is not a member of 'sf::Mouse'
sf.cpp(1896) : error C3861: 'GetPosition': identifier not found
sf.cpp(1908) : error C2039: 'GetPosition' : is not a member of 'sf::Mouse'
sf.cpp(1908) : error C3861: 'GetPosition': identifier not found
sf.cpp(2069) : error C2039: 'SetPosition' : is not a member of 'sf::Mouse'
sf.cpp(2069) : error C3861: 'SetPosition': identifier not found
sf.cpp(2081) : error C2039: 'SetPosition' : is not a member of 'sf::Mouse'
sf.cpp(2081) : error C3861: 'SetPosition': identifier not found
sf.cpp(2134) : error C3083: 'Joystick': the symbol to the left of a '::' must be a type
sf.cpp(2134) : error C2039: 'IsConnected' : is not a member of 'sf'
sf.cpp(2134) : error C3861: 'IsConnected': identifier not found
sf.cpp(2188) : error C3083: 'Joystick': the symbol to the left of a '::' must be a type
sf.cpp(2188) : error C2039: 'GetButtonCount' : is not a member of 'sf'
sf.cpp(2188) : error C3861: 'GetButtonCount': identifier not found
sf.cpp(2278) : error C3083: 'Joystick': the symbol to the left of a '::' must be a type
sf.cpp(2278) : error C2039: 'HasAxis' : is not a member of 'sf'
sf.cpp(2278) : error C3083: 'Joystick': the symbol to the left of a '::' must be a type
sf.cpp(2278) : error C2039: 'Axis' : is not a member of 'sf'
sf.cpp(2278) : error C2065: 'Axis' : undeclared identifier
sf.cpp(2278) : error C2146: syntax error : missing ')' before identifier '__pyx_v_axis'
sf.cpp(2278) : error C2059: syntax error : ')'
sf.cpp(2278) : error C3861: 'HasAxis': identifier not found
sf.cpp(2368) : error C3083: 'Joystick': the symbol to the left of a '::' must be a type
sf.cpp(2368) : error C2039: 'IsButtonPressed' : is not a member of 'sf'
sf.cpp(2368) : error C3861: 'IsButtonPressed': identifier not found
sf.cpp(2458) : error C3083: 'Joystick': the symbol to the left of a '::' must be a type
sf.cpp(2458) : error C2039: 'GetAxisPosition' : is not a member of 'sf'
sf.cpp(2458) : error C3083: 'Joystick': the symbol to the left of a '::' must be a type
sf.cpp(2458) : error C2039: 'Axis' : is not a member of 'sf'
sf.cpp(2458) : error C2065: 'Axis' : undeclared identifier
sf.cpp(2458) : error C2146: syntax error : missing ')' before identifier '__pyx_v_axis'
sf.cpp(2458) : error C2059: syntax error : ')'
sf.cpp(2458) : error C3861: 'GetAxisPosition': identifier not found
sf.cpp(2512) : error C3083: 'Keyboard': the symbol to the left of a '::' must be a type
sf.cpp(2512) : error C2039: 'IsKeyPressed' : is not a member of 'sf'
sf.cpp(2512) : error C3083: 'Keyboard': the symbol to the left of a '::' must be a type
sf.cpp(2512) : error C2882: 'Key' : illegal use of namespace identifier in expression
sf.cpp(2512) : fatal error C1903: unable to recover from previous error(s); stopping compilation

50
DotNet / VC# 2010 & SFML.Net
« on: October 13, 2011, 08:02:21 pm »
Hi Laurent! :)



I downloaded SFML.net from https://github.com/SFML/SFML.Net



(BTW it's not that easy to find as it's not linked anywhere!)



Then I open the solution in Monodevelop 2.8



When it tried compiling, there was an error with missing Tao, so I installed Tao and added it to references. After that it compiled itself without any errors. But it's very strange as the whole SFML.net solution compiled itself in 2 seconds and the output libraries are like 35 KB in size. Is that because they are bindings?



Also, when I run any of the examples, a window apprears "Program window.exe stopped working".



EDIT: OK, i copied all the files in Extlibs folder into the executable folder and now everything runs fine. It's been a long time since I used SFML, I can see that what used to be called IMAGE is now called TEXTURE. I'm missing some docs. Can I find any SFML.net documentation? I think the monodevelop didn't generate any doc for me, as the doc folder contains only some sample code.



Also, in the example there are some bits of code that I don't understand, like:



Code: [Select]
RenderWindow window = (RenderWindow)sender;

What does this line mean really? Thanks for help.

51
Python / pysfml2-cython
« on: October 13, 2011, 07:12:50 pm »
Thanks for a prompt answer. Two comments:

1. Vim? There's a joke: how to generate a random keyboard input? place a user in front of Vim and tell them to exit the program. Vim is waay to hardcore for me. Seriously, there's no good IDE that would have everything in one place?

2. Is there a way to avoid installing Python and still be able to run python applications? For example, the .NET apps require to put a few libraries in the executable folder and that's it.

52
DotNet / VC# 2010 & SFML.Net
« on: October 13, 2011, 11:22:52 am »
Hello

I would like to make a game using SFML. I've been told that I should not use C++ if I'm not experienced in using this language. I've been suggested to use C# instead, as it has better standard libraries and debugging. I wonder if you could assist me with the following:

1. What functionalities of the C++ SFML have been left out in SFML.NET? Is the network package present? If not, is it still possible to make an online game using SFML.NET?

2. Should I use VS2010 or is Monodevelop OK as well? I prefer Monodevelop as it is a multiplatform IDE so it would be easier for me to compile the game on different platforms. Moreover, monodevelop is more lightweight.

3. I tried compiling SFML.NET from github using monodevelop and it doesn't work. Maybe it's because I've been using the VS2010 solution file. Any suggestions?

4. I've heard about XNA. For anyone who ever used both SFML and XNA, how would you compare these two libraries in terms of ease of use? I understand that using XNA would limit my game to be Windows-only?

Thanks for your help!

53
Python / pysfml2-cython
« on: October 13, 2011, 10:51:54 am »
Hello

I would like to make a game using SFML. I've been told that I should not use C++ if I'm not experienced in using this language. As I've done most programming in PHP, it was suggested for me to use Python. I wonder if you could assist me with the following:

1. What functionalities of the C++ SFML have been left out in pysfml2? Is the network package present? If not, is it still possible to make an online game using pysfml2?

2. Would it be problematic to make a multiplatform game using pysfml2? I'm planning to do main coding on Windows, but would like to release linux and OSX versions.

3. What IDE do you recommend for python on Windows? I'd prefer something lightweight.

4. I'm totally new to python. Are programs made in python regular exe files? What is the speed comparison between C++ SFML and pysfml? Will users have to install anything to be able to run my game?

Thanks for your help!

54
General / SFML Complete Game Tutorial
« on: October 06, 2011, 05:22:51 pm »
Hey Serapth :), I have read your introduction to becoming a game dev. From what you wrote I understand I should either choose C# or Python. The problem is, I would like to stick to SFML and would not like to start learning XNA (I also would like my game to run on Mac and Linux). So, would you approve of going with C# + Monodevelop + SFML? I should add I'm not a fan of Visual Studio cause its bloated, its like a swiss army knife when I just need a knife. Hence the monodevelop.

Regarding the bindings, I only see bindings for C# and Python for version 1.6. Is it possible to compile a fresh nighly build of SFML and use the bindings?

If I went with C# + SFML, would your game from scratch tutorial still be of use to me?

I also took some time to see the differences between programming languages. So, what I like in programming languages is: weak type strength, implicit types, dynamic type checking, failsafe i/o, easy implementation of associative arrays.

From what I've seen in comparisons, I should either go with Python or Lua. However, AFAIR there are no up to date bindings with SFML for these :(.

I do not see the big difference between C++ and C#. My friend told me, that if I used C++, I could still do a majority of what I need to achieve without getting into the complex stuff. For a hobbyist programmer, I don't see where is the simplicity that C# brings. I can see that there are more built-in functions and easier to use too.

55
General / SFML Complete Game Tutorial
« on: October 05, 2011, 07:47:09 pm »
Allright, I'll follow your advice and read the guide. I like your writing style. You know a lot about making games, you write in an non-boring manner, which brings me to a question: who are you? :P Are you a professional developer?

When it comes to choosing programming language, I went with C++ because SFML is made in C++ and I knew C. I even tried reading books about programming in C++ but it was a few years ago and I forgot. Moreover a friend who is a professional programmer himself recommended C++ "as the pro choice" and told me not to fool around with C#. Finally, I don't fully understand the concept of bindings and how to make them work, they seem to me like another layer of complexity. And, as I fell in love with SFML, I did not want to use any other library.

56
General / SFML Complete Game Tutorial
« on: October 05, 2011, 04:57:25 pm »
Dear Serapth, I have read your tutorial.

First of all, I would like to thank you for the hard work you put in this. It's really nice to see people dedicate their free time to help others.

I have to say, however, that your tutorial has made me more scared than eager to make a game. In the beginning of your tutorial you wrote:
Quote
I am writing it in C++ because regardless to all the people say “DON’T DO THAT IN C++!” the vast majority of people still do.

...people state things like “I hate OOP, I’ll just use functions”.

I have no academic programming experience, I'm more of a hobbyist programmer, so I'm not really aware of what people say. After reading your tutorial, I'm thinking they may have a point :). I tried writing stuff in a couple of programming languages and I have to say that the best memories come from writing in PHP. For me, PHP is very easy to use and the syntax is easy to understand. PHP is packed with useful functions and very well documented on the php.net website.

From the history of programming I know that OOP is a step forward in making programming more abstract and "human". However, for me, objects make the source code so difficult to understand/grasp. For me, OOP should give me a set of blocks to play with. That's what I like SFML for.

However, your tutorial shows the true face of the OOP. Public/ protected/ private/ virtual/ constructor/ destructor/ static class, put a tilde here, an asterisk there and a colon. All this stuff makes my head explode and I don't consider myself to be a dimwit.

To conclude, I have read your tutorial thoroughly and understood a portion of it. To me the most useful part is the final product, which is the attached project file. The tutorial itself is an explanation of how and why you made the source code look like that. I will try to fiddle with that source code, but it looks like ultra complex to me, and I would never ever come up with anything similar so I don't know if I will make big use of it. I understand that your tutorial was meant for us to take over at some point and create similar stuff to what you did, but I think it's too complex for me.

I attempted to make a game with SFML once, but had to focus on other stuff. Now I would like to start over, that's why I read your tutorial. My game can be found here:
http://grebocin.com/upload/screenway08.zip

I made this game after fiddling with with SFML Pong example, which is much less complex than what you're offering (without objects, private, public, virtual etc.). I don't know if it makes sense for me to make this game, as you clearly state in your tutorial that not following it will lead to a fail.

57
Feature requests / Load sf::Sprite as a subrect of sf::Image
« on: April 25, 2010, 07:40:32 pm »
Quote from: "nulloid"
I don't know what he wants exactly


Let me explain. Old graphic cards support very small textures, even 256x256 pixels. If you try to load an image using SFML, that is larger than this, you will get an error.

Support for textures of 2048x2048 pixels is common, but what about these poor guys who won't be able to load your program, only because the textures are too big?

58
Feature requests / Load sf::Sprite as a subrect of sf::Image
« on: April 25, 2010, 01:50:20 pm »
Hello. I'd like to ask, if it would be possible to implement a method to the sf:Sprite class that would look sth like this:

Code: [Select]
sf::Sprite::SetImageRect(sf::Image, sf::Rect)

If I am right, the problem with displaying large images lies on the sprite side. So if I could load a large image with sf::Image and then slice it into smaller subrectangles, supported by the graphics cards, and make sprites of them.

Is this doable? Or do I have to split the image manually to ensure, that my sprite is not too big for some old hardware? Thanks.

59
Feature requests / FS#82 - Add functions to sf::Vector2
« on: April 25, 2010, 01:41:41 pm »
Hello, I've got a question about this ticket. Does it mean that it will soon be possible to use sf::Vector2f like a euclidean vector?

http://en.wikipedia.org/wiki/Euclidean_vector

Will it be possible to declare a vector not only by its XY coordinates, but with angle and magnitude as well?

If the vector is declared by XY coords, will it be possible to read its angle and magnitude, and vice versa?

Will it be possible to change the vector after it is declared?

Will the operators be overloaded so that we can add, substract or even multiply vectors? (http://en.wikipedia.org/wiki/Cross_product)

I'm asking, because I'd like to use the sf::vector in my physical equations, and not have to create a separate class for that.

60
SFML projects / Screenway - a racing game
« on: April 24, 2010, 10:38:08 am »
I uploaded revision 8. Now you can race against time. The timer starts when you start moving. It stops when you cross the finish line. My record time without going out of track was 64.0 seconds. Try to beat that!  8)

Pages: 1 2 3 [4] 5 6 7
anything