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

Pages: [1]
1
Graphics / [solved]Tiles are showing black lines at the borders (1.6)
« on: April 09, 2010, 02:59:54 am »
Thanks guys, very helpful forum.

SetSmooth(false) did the trick.

2
Graphics / [solved]Tiles are showing black lines at the borders (1.6)
« on: April 09, 2010, 12:52:25 am »
Hi everyone. Thanks for this great site!

Anyways I am having a problem where black lines are drawn around my tiles. Here's an example with a white 64x64 tile:



Here's the relevant segments of my code:
Code: [Select]

    float loopVarX = 0;
    float loopVarY = 0;
    int forX, forY;

    // Create the main window
    sf::RenderWindow App(sf::VideoMode(1600, 1200), "MY GAME");

    // SET 2 dimensional array of sprites all to the grass image
    Sprite Sprite1[25][18];  

    for ( int a = 0; a<25; a++)
        for (int b = 0; b<18 ; b++)
        {
            Sprite1[a][b].SetImage(CammyCreature.Grass);
        }


        // Draw the grass
        for (forX = 0; forX <25; forX++)            // DRAW 25 tiles horizontally
        {

            for (forY = 0; forY <18; forY++) // DRAW 18 tiles vertically
            {
                App.Draw(Sprite1[forX][forY]);          // Draws the grass at the location specified by the variables
                loopVarY = (forY * 64);                 // Configures the Y Coordinate to be images new location
                Sprite1[forX][forY].SetY(loopVarY);     // Sets the next Y Coordinate location of the next image to be drawn
                Sprite1[forX][forY].SetX(loopVarX);     // Sets the next Y Coordinate location of the next image to be drawn

            }

            loopVarX = (forX * 64);
           
        }



Anyone have any ideas? I just upgraded from 1.5 to 1.6. I could be wrong but I thought that it was working with 1.5. I only noticed this with the upgrade to 1.6. Though its definitely possible that it could have been there the whole time. Could this be the 1.6 bug that other people are having problems with?

I could definitely post the whole program (123 lines of code) if you guys think that would help.

Thanks so much

Pages: [1]