Hi,
First, thank you for this wonderful software.
OverviewIt runs fine on my computer, but runs very choppy on everyone else's computer; some of the computers are much more powerful then mine. we all have NVIDIA gfx cards of varying degrees of quality, mine not being the best.
all of us have win7, and i'm statically linking to a recent snapshot of SFML 2.0 (LaurentGomila-SFML-2.0-rc-95-g4c04a0c)
This problem exists in release mode. Although, I have not tried deploying a debug build on these other computers.
Narrowing it DownI have a PNG file with an alpha channel. It is 512x512 pixels. It has several sprites on it(among a few others) that i use to create the floor in a game. Each floor sprite is 128x128 pixels.
The floor tiles are arranged in a 60x30 tile map. The tile map is static, but i pan around by use of a sf::View that is centered on a player character.
Specifically
In the initialization routine, that is only called once, i create a large render texture, and populate it with all the tiles:
arenaTexture.create(60*128,30*128);
for (int i = 0;i < 60*30;i++)
{
Tile &tile = g.arenaMan.getTile(i);
sf::Sprite s = g.assetMan.getSprite(tile.getId()+4);
s.setPosition(tile.getPosition());
arenaTexture.draw(s);
}
arenaTexture.display();
arenaSprite.setTexture(arenaTexture.getTexture());
Then, in the routine that is responsible for rendering each frame, I have:
sf::FloatRect fr = sf::FloatRect(pos.x-(g.scrWidth/2.0f),pos.y-(g.scrHeight/2.0f),g.scrWidth,g.scrHeight);
arenaView.reset(fr);
window.setView(arenaView);
window.draw(arenaSprite);
So, for now, my question is; is the method i'm using above bad?
Thanks,
~Hibchibbler