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

Pages: [1]
1
Graphics / Re: It is not always what it seems
« on: February 04, 2013, 05:14:42 am »
Yup, It's not the Tiling, Sorry.
Was the Mutex, which means,Was the networking code.
Sorry.

But, thanks for making me feel not alone.

However, i'm glad I migrated to VertexArrays, so not all is lost.

2
Graphics / Re: Chop and Stutter; sprite-based tiled game
« on: February 04, 2013, 02:26:20 am »
Uh oh...
I think I have an unnecessary mutex.
I did the time based profiling in VS 2010...showed me the light....
I haven't ever been able to repro the problem on my computer, so i'm waiting on people to stop watching TV.
But,i'm pretty sure this may be the problem...if so, i'll come back here to report, redact and apologize..

3
Graphics / Re: Tiling with sf::RenderTexture
« on: February 04, 2013, 12:13:56 am »
Well, I suppose the topic of the original post is now obsolete (EDIT: I changed it).
When i originally wrote it, i thought that it was the tiling..
But, now that I've changed paradigms from sf::RenderTexture to sf::VertexArray, and am still experiencing the chop,  I am suspecting it is not the tiling...
But something else.
Unfortunately, I don't know what...
The wildly varying FPS makes me very concerned...

I am attempting to come up with minimal working code with stutter...

I appreciate your inquiries

4
Graphics / Re: Tiling with sf::RenderTexture
« on: February 03, 2013, 10:58:38 pm »
Ok, so;
On one of the problematic computers; ContextSettings indicates OpenGL 4.3
And, again, i'm running 4.0.

Problematic computer has FPS that wildly swings between 40 and 6
My computer(which does NOT experience the chop) has a wildly swinging FPS  of between 250 and 130

I'm not using sleeps, i'm not enabling VSync, i'm not setting  FrameRateLimit
I have tried both fullscreen and windowed mode.

I have tried employing timeBeginPeriod/timeEndPeriod with unimproved results..
I cannot figure out why there are such wild timings...





5
Graphics / Re: Tiling with sf::RenderTexture
« on: February 03, 2013, 10:54:10 am »
Chop, Stutter

I have moved from sf::RenderTexture to sf::VertexArray
Still having chop issues. But, only tested it on one of the problematic computers.
And the test was performed before i implemented rudimentary culling (fog of war =)). So I consider this test invalid. But still disheartening.

Here is specifically what I am working on.
http://imagebin.org/245312
This game is a multiplayer, team based dota/tower-defense style game.
I know for a fact that the chop is not network related.
have run empirical performance tests with and without server traffic involved...chop stays constant.

ContextSettings tells me Major 4, Minor 0 on my computer.
I will see what it says on problem computers next chance I get.

with a tile map of 30x60, where each tile is 128x128 pixels, would there be any limitations(as there is with sf::RenderTexture) on drawing the whole map?

The part of the story you are familiar with, is that I have a large, static map. It now uses a VertexArray, and is relatively constant. I only rebuild quad mesh every so often, not every frame.

The next piece of my story is that there are a ton of little sprites. Bullets, minions, explosions, other tanks. These things are always translating and rotating.

So, i digested, and followed advice given in this:
http://en.sfml-dev.org/forums/index.php?topic=9846.15

Hence all the little sprites are drawn using a VertexArray also.

We shall see what happens when my peoples come around and test my new build..

6
Graphics / Chop and Stutter; sprite-based tiled game
« on: February 01, 2013, 07:05:28 am »
Hi,

First, thank you for this wonderful software.
Overview
It 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 Down
I 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

Pages: [1]
anything