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

Pages: [1]
1
General / Re: SFML 2.0 not immediately compatible with Codeblocks?
« on: July 03, 2013, 02:59:37 pm »
:D thanks so much all of you, everything is working perfectly. This saved me even more hours of frustration. I don't remember having to get the TDM SJLJ package with codeblocks, is that new?

2
General / Re: SFML 2.0 not immediately compatible with Codeblocks?
« on: July 03, 2013, 09:16:46 am »
I downloaded the SFML 2.0 archive from the "latest stable build" download page.
http://www.sfml-dev.org/download/sfml/2.0/
GCC 4.7 MinGW (DW2)

I downloaded code::blocks version 12.11 from here:
http://www.codeblocks.org/downloads/26

3
General / Re: SFML 2.0 not immediately compatible with Codeblocks?
« on: July 03, 2013, 08:10:47 am »
Yeah, I was still linking using the global compiler settings like you had to do for 1.6 :P. Now my code compiles without any errors, thanks :) However when I run the code it throws an error saying:

The procedure entry point __gxx_personality_v0 could not be located in the dynamic link library libstdc++-6.dll.

Here is my code, but I doubt there is anything wrong with it. It's from the tutorial on the main site.

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

4
So I haven't used SFML in quite some time (since 1.6) and I come back to find a new site and a 2.0 release. After downloading 2.0 and configuring codeblocks, I tried running the sample code it provides in the tutorial. This brought up 50 or so errors, which from what I remember means that it wasn't linked properly. I tried a few more times, but to no avail. So I started scrolling through other people's posts and tutorials on getting 2.0 up and running. They are all saying that you have to recompile it with cmake. I was wondering why you have to do this, isn't the download precompiled? And if it does have to be recompiled, could someone point me to a more in depth tutorial, I don't fully understand the one on the site.

5
Graphics / Re: Array of sf::Shape::Rectangles
« on: February 03, 2013, 02:09:49 am »
Window.Clear();
    for(int c = 0; c < 14; c++){
    for(int d = 0; d < 14; d++){
    Window.Draw(board[c,d].disp);
    }}
    Window.Display();

I use nested loops for interfacing with the array, "board" that stores all of the objects. Window is the sf::RenderWindow that I am using and disp is the public sf::Shape::Rectangle for each object. However when I run this, nothing is drawn to the screen. This most likely has to do with me overlooking some blatantly obvious error but as stated above, I have not taken the time to fully comprehend C++ or SFML. Thank you for helping me regardless :D.

6
Graphics / Re: Array of sf::Shape::Rectangles
« on: February 03, 2013, 01:48:40 am »
Oh never mind, instead of making one array of objects bound to another one of sf::Shapes, I just make each object contain a sf::Shape. Also a vector would have made it harder to check adjacent cells in the grid.

7
Graphics / Array of sf::Shape::Rectangles
« on: February 02, 2013, 11:00:14 pm »
For my first game I have been trying to make a basic "Snake" game. Since it runs on a grid I have an array of objects, one for each square. I also want to make an array of sf::Shape::Rectanges so that I can display the game board. How would I create that array?

Pages: [1]
anything