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

Pages: [1]
1
General / Visual Studio 2010 Errors When Trying To Build SFML 2.1
« on: July 08, 2014, 04:27:13 am »
Hello,

I am trying to build SFML 2.1 from the source for Visual Studio 2010. I have successfully completed it for Code::Blocks and I have been using that but I would like to start using Visual Studio.

When I try to configure the build commands using:

cmake -G "NMake Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=TRUE -D STATIC_STD_LIBS=FALSE c:/sfml/

I get lots of error output. I am using the visual studio command prompt. I am using cmake 2.8.4 and I have added the cmake to the path in the enviroment variables.

I can't figure out what my problem is. Any advice will help.

I have attached an screenshot of my error that I get. Please help!

Thanks

2
General / Re: More optimized way to move?
« on: May 04, 2014, 11:27:42 pm »
From what I have learned previously while programming calling the playerSprite.setPosition(position); function every update doesn't seem very fast to me.

I will run a profiler and see if what kind if results I get.

Thanks for the help and advice.

3
General / More optimized way to move?
« on: May 04, 2014, 11:10:13 pm »
Hello,

I was wondering if their is a more optimized way to do this?

I know about the playerSprite,move(position); function but it doesn't do what I want it to.

This code works just fine and the movement is smooth but just by looking at it calling the playerSprite.setPosition(); every update call doesn't seem very fast to me. IDK maybe that is the fastest way to do it.

void Player::update(float delta)
{
    if (sf::Keyboard::isKeyPressed(sf::Keyboard::W) || sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
    {
        position.y -= Player::VELOCITY * delta;
    }
    else if (sf::Keyboard::isKeyPressed(sf::Keyboard::S) || sf::Keyboard::isKeyPressed(sf::Keyboard::Down))
    {
        position.y += Player::VELOCITY * delta;
    }

    playerSprite.setPosition(position);
}

Pages: [1]
anything