1
Graphics / Creating an image
« on: June 24, 2011, 09:20:59 am »
Hello, I'm creating a platform game, and i've got everything working so far, but rendering the map is incredibly inefficient. I was wondering how I could speed things up, or just create an image and load that, instead of displaying every piece of the map every single time.
That's the function that I call to display each tile. What can I do to make my game more playable?[/code]
Code: [Select]
void InitBox(int x, int y, int Size,sf::Color Color)
{
Box.AddPoint(0, 0, Color,Color);
Box.AddPoint(Size, 0,Color,Color);
Box.AddPoint(Size, Size,Color,Color);
Box.AddPoint(0, Size,Color,Color);
Box.SetCenter(0,0);
Box.SetPosition(x,y);
Window.Draw(Box);
}
That's the function that I call to display each tile. What can I do to make my game more playable?[/code]