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

Pages: [1]
1
General / Re: Key press freezes enemys' movement
« on: May 13, 2020, 03:12:11 pm »
Well, I guess technically this is right.  I have all the characters moving at the same speed now which I want.  I am considering if the "feel" would be better if the characters continued there motion instead of "freezing".  Any idea how this is done?

Josh

2
General / Re: Key press freezes enemys' movement
« on: May 12, 2020, 10:06:57 pm »
I hope I have this right.  The enemy is on the platform and therefore moves with it.  However, because the enemy is also moving left and right he shouldn't stay put on the platform. He should be moving back and forth there too.

Josh

3
General / Re: Key press freezes enemys' movement
« on: May 12, 2020, 09:17:16 pm »
Oh, also the player's character moves slower when in the mid section.  May I please have help with this too please?   8)

Josh

4
General / Key press freezes enemys' movement
« on: May 12, 2020, 07:32:58 pm »
I am having problems with some SFML code.  When the program runs without interaction the code runs fine and the enemy on the platform moves left and right as needed.  However, when the S key is pressed and held (to move player right) both enemy types freeze when the character is in the middle section.

The S key press updates the movement and sets a string flag to "right" and changes the code run here in main:

if (isLeft == 0)
                {
                       
                        //continual running
                        window.clear();

                        //one change of movement from ongoing non key press
                        character.EnemyObject->moveEnemies(window, 1, -1, 0);
                        miscObject.moveEnemies(window, 10, 0, 1);
                        window.draw(marioSpriteL);

                        if (character.gPlatformsMoved == "right")
                        {

                                character.EnemyObject->changePlatformEdgesForEnemy(window, -10);
                                platform::SearchVectorForPlatforms(vectorPlatforms, window, -10, 0.0f, 0);
                               
                                character.gPlatformsMoved = "none";
                        }
                         window.display();
 

Here are the two functions that are called differently when there is a right movement flag:

int Enemy::changePlatformEdgesForEnemy(sf::RenderWindow& inWindow, int changeX)
{
        for (std::vector<EnemyOnPlatform>::iterator it = enemyVector2.begin(); it != enemyVector2.end(); ++it)
        {
                if (it->platformLeftEdge >= -150 && it->platformLeftEdge <= 800)
                {

                        it->platformLeftEdge = it->platformLeftEdge + changeX;
                       
                }
                //150 is the width of platforrm, 800 is screenwidth
                if (it->platformRightEdge >= 0 && it->platformRightEdge < 800 + 150)
                {
                        it->platformRightEdge = it->platformRightEdge + changeX;
                       
                }
        }

        return(1);
}




//loop through platforms and move them horizontally
int platform::SearchVectorForPlatforms( std::vector<platform>& vector,sf::RenderWindow& inWindow, float changeX, float changeY, int isLeft1)
{

        sf::Sprite * gottenSprite;// = NULL;


        for (std::vector<platform>::iterator it = vector.begin(); it != vector.end(); ++it)
        {
                //sprite is platform
                gottenSprite = it->getSprite();

                it->x = it->x + changeX;

                gottenSprite->setPosition((it->x), it->y);

                if (it->x > -150 && it->x < (800))
                {

                        inWindow.draw(*it->platformSprite);
                }

        }
       
       
        return(1);
}


If more code needs to be shown let me know.

Here is a quick video that shows the problem: 

Thanks!

Josh

5
General / Re: No PDB Symbols Loaded for SFML Graphics
« on: October 02, 2017, 07:26:01 pm »
Well I put the pdb file for the windows graphics-d-2.dll in the appropriate folder with the d-2.dlls and I no longer receive the message about no symbols loaded for the text object.  However, there is still no actual string readout when I hover over sf:text object it is like it is incomplete.

It seems that the appropriate pdb would be : sfml-graphics-d-2.pdb not : sfml-graphics-d-pdb although like I said it does change the readout a bit and somewhat loads the symbols.

I looked at cmake and it looks very complicated.

Is there any easy way to accomplish the ability to simply read the text for an sfml::text object.  It doesn't seem to be a very unusual or far fetched request.


Thank you,

Josheir
 

6
General / No PDB Symbols Loaded for SFML Graphics
« on: October 02, 2017, 03:06:14 pm »
I am getting the message : <information not available, no symbols loaded for  sfml-graphics-d-2.dll> when hovering over the sf::Text object name for Visual C++ using Visual Studio 2017 (SFML).  I am wondering how do I load the symbols so I can view the text object's text for example? I am having trouble debugging without the symbols.

Are there any pdb files available or can I create them myself?

Could you please describe this in a full, easy manner for me?

Thank you,

Josheir

Pages: [1]