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.


Topics - bastien

Pages: [1]
1
Hello,

I built SFML from Github a few months ago, without any problems IIRC. I'm trying to build it again with the same Cmake and Visual Studio versions, but with the latest SFML code from Github.
I get a link error about no argument specified for /machine. I can't copy-paste the exact message because it's in French. It may have to do with the fact that I'm using a 64 bits OS (by the way, how can I specify which platform I'm targetting?)

Does anyone have any idea? I'm not using the RC release because I'm using it to build a pySFML installer, and there seems to be a platform mismatch between the Python module and the SFML DLLs.

2
Python / pysfml-cython
« on: July 13, 2011, 02:27:20 am »
Project page: https://github.com/bastienleonard/pysfml-cython

Documentation: http://pysfml2-cython.readthedocs.org/

This binding is up to date (most of the time :roll:) and supports most features of SFML 2.
Currently there's no binary release, you have to compile the module yourself. If you download the current snapshot (in the downloads section on Github), you won't have to install Cython. I noticed in the past that I had forgotten to include some files in the snapshot, or that Github behaved strangely when replacing the it, so please tell me if something goes wrong when using it.
I guess that I will make the first binary release when SFML 2 has a binary release too.

Please read the documentation for more information on the binding, how to build it, etc. ;)

3
Python / Python binding generation tools
« on: November 04, 2010, 05:59:52 pm »
We were having a discussion about what tool we should use for the next Python binding: http://www.sfml-dev.org/forum/viewtopic.php?t=3451
Since this discussion is off-topic, I felt it would be better to create a new topic.

So I've played with Cython and made the hello world example work for 1.6, all the code is here with the example:https://bitbucket.org/bastienleonard/pysfml-cython/src

So basically it involves writing declarations for all the SFML methods and attributes, and then you write the wrapper classes in a language similar to Python. It should be pretty fast since it compiles to pure C++ code, and you can customize the wrappers in any way you want since you write them yourself. I guess the downside is that you need to write all this code, but it's fairly compact and I guess that fully automated generation wouldn't allow to tweak the end result as easily.

4
Window / Most simple way to get cursor coordinates?
« on: November 03, 2010, 02:04:26 pm »
The only way I found to get the cursor's coordinates at any time is to use Input::GetMouseX/Y. Is there anything more straightforward? Window has SetCursorPosition() apparently, but no GetCursorPosition(). Why?

5
Python / Image.Smooth() broken?
« on: October 29, 2010, 09:19:28 pm »
Image.SetSmooth() doesn't seem to do anything in my programs (it doesn't crash though). I'm using PySFML 1.6 from the Arch Linux packages.

In February Tank talked about this bug here:

Quote from: "Tank"
Also sf::Image::SetSmooth() and sf::Image::Copy() are not working. This will be fixed with the next revision.


I had a quick look at SFML's code on SourceForge, and there's indeed a revision saying that SetSmooth() has been fixed.

Can anyone test SetSmooth() with 1.6 and tell me if it works? In that case I'll try to see if something is wrong with the Arch Linux package.

6
Graphics / Artifacts in isometric view
« on: October 29, 2010, 11:02:16 am »
I'm writing an isometric tile engine, and I can't seem to correctly piece the tiles together. There is always some kind of shadow. In the end it makes the map look like there's a grid, which isn't that bad, but I'd like to show a plain grass map. How can I achieve that?

Note: I have the same problem on two different computers, on both Windows and GNU/Linux.

Here is a simple example, with 64x30 tiles:



Code: [Select]
#include <iostream>
#include <vector>

#include <SFML/Graphics.hpp>


int main()
{
    sf::RenderWindow app(sf::VideoMode(640, 480, 32), "Tile test");
    app.SetFramerateLimit(10);
    sf::Image image;
    bool running = image.LoadFromFile("grass.png");
    std::vector<sf::Sprite> sprites;

    sf::Sprite s1(image);
    s1.SetPosition(0, 0);
    sprites.push_back(s1);
    sf::Sprite s2(image);
    s2.SetPosition(64, 0);
    sprites.push_back(s2);
    sf::Sprite s3(image);
    s3.SetPosition(32, 15);
    sprites.push_back(s3);
   
    while (running)
    {
        sf::Event event;

        while (app.GetEvent(event))
        {
            switch (event.Type)
            {
            case sf::Event::Closed:
                running = false;
                break;
            default:
                break;
            }
        }

        app.Clear(sf::Color(255, 255, 255));

        for (std::vector<sf::Sprite>::const_iterator it = sprites.begin();
             it != sprites.end();
             ++it)
        {
            app.Draw(*it);
        }

        std::cout << 1.0 / app.GetFrameTime() << " FPS\n";
        app.Display();
    }

    app.Close();

    return EXIT_SUCCESS;
}


Here is the tile:


Pages: [1]
anything