2971
General discussions / Re: SFML tutorial video
« on: August 30, 2014, 03:57:58 am »
__YOU_ARE_WELCOME__
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.
if(indexY <= Grid.size())As I mentioned earlier, these should never be equal.
I fixed most of the problemsLies! I fixed them
Grid.resize(GridSizeY);That makes no sense as you are resizing the grid to hold rows and then go through them as columns. Then, when you're iterating the "y", you're pushing the new y's based on the y. That was not a very good explanation of what I mean. However, in your code-style, I think it should be this:
for (int x = 0; x < GridSizeX; x++)//Column
{
for (int y = 0; y < GridSizeY; y++)//Row
{
Grid[y].push_back(blankGridSprite);
blankGridSprite.setPosition(x * 32, y * 32);
}
}
Grid[indexY][indexX].setTexture(tileTexture);and here:
Grid[indexY][indexX].setTexture(blankGridTexture);
need to download your header only projectI believe Aurora is supplied with Thor. Just looked; it's in the extlibs folder.
I'm using bool paused like that:Is paused a boolean or not? If so, why are you assigning it 1 and 0 instead of true and false, and why are you testing for comparison to 1 and 0 instead of paused and !paused? Mixing is confusing :pif (!paused)
{
okno.display();
}
I've checked it by using:Can you create a complete and minimal example which uses this code and still has the problem you're describing so that we can compile and test it for ourselves? Does this bit of code work in other projects?if (event.type == sf::Event::KeyPressed)It returns key codes, but for letters/digits it does not return anything.
{
cout << event.key.code << endl;
}
http://gafferongames.com/game-physics/fix-your-timestep/This is almost always the link that I would recommend for timestep information.
Hi, I'm trying to create a solid bounding box style collision system for my game. So far, I can tell whether or not the horizontal planes intersect, but whenever I attempt at detecting whether or not they intersect vertically, the horizontal detection overrides it no matter what order I program it in.Could we see the vertical detection code and where you put it?