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

Pages: [1]
1
General discussions / aMessage_To_Laurent
« on: September 02, 2015, 04:36:34 pm »
Should have said so earlier, but hey mate thanks for creating this api

2
General / modifying old code
« on: August 31, 2015, 01:42:17 am »
Hello all. I have recently started playing around with SFML. I have found an excellent tutorial online and I am working through it. The tutorial was written for version 1.6 to be used for microsoft  visual 2010. However I am using microsoft visual 2013 and i have installed version 2.3.1 I have been modifying the code and all seems to to work reasonably well. However I am stuck with these lines of code here:

 void PlayerPaddle::Update(float elapsedTime)
{

   if (Game::GetInput().IsKeyDown(sf::Keyboard::Left))
   {
      _velocity -= 3.0f;
   }
   if (Game::GetInput().IsKeyDown(sf::Keyboard::Right))
   {
      _velocity += 3.0f;
   }

   if (Game::GetInput().IsKeyDown(sf::Keyboard::Down))
   {
      _velocity = 0.0f;
   }

   if (_velocity > _maxVelocity)
      _velocity = _maxVelocity;

   if (_velocity < -_maxVelocity)
      _velocity = -_maxVelocity;


   sf::Vector2f pos = this->GetPosition();

   if (pos.x  < GetSprite().GetSize().x / 2
      || pos.x >(Game::SCREEN_WIDTH - GetSprite().GetSize().x / 2))
   {
      _velocity = -_velocity; // Bounce by current velocity in opposite direction
   }

   GetSprite().Move(_velocity * elapsedTime, 0);
}


I am reading through the documentation in order to create a suitable modification. But in order to speed up my build does anybody have an existing solution to this. Has this problem been solved already?

3
General / sfml and mobile phones
« on: August 30, 2015, 01:19:49 pm »
Hello, i've just started tinkering around with sfml 2.3.1. Can sfml be used with developing games for Andriod, window and iOS phones?

4
General / Has GetSize() and SetCenter() been deprecated
« on: August 30, 2015, 12:32:45 am »
Hello, I've just started using SFML after having few nightmare experiences with OpenGL. I'm currently working through an online tutorial. I'm using SFML version 2.3.1, however the tutorial was written for version 1.6

I'm writing much of the code, however I can't figure out how to replace the functions in this line of code

        GetSprite().SetCenter(GetSprite().getSize().x / 2, GetSprite().GetSize().y / 2);

So far I know that I can replace SetCenter() with SetOrigin() but what can I replace GetSize() with?

Pages: [1]
anything