Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How to scale position and size?  (Read 1391 times)

0 Members and 1 Guest are viewing this topic.

Ben_

  • Newbie
  • *
  • Posts: 1
    • View Profile
How to scale position and size?
« on: February 20, 2016, 03:31:20 pm »
I am trying to make a game, and I want it to support multiple resolutions.

All I need to do is simply scale the sprites, but from my tests, it only scales the size when I need it to scale both size and position.

Does SFML allow me to do this? Or should I make my own functions to scale the position?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: How to scale position and size?
« Reply #1 on: February 20, 2016, 04:02:58 pm »
You cannot "scale position", it makes no sense. What do you mean?

Can you show an illustration/sketch of what you want to achieve?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How to scale position and size?
« Reply #2 on: February 20, 2016, 04:34:10 pm »
I think he means zooming the whole scene, not just resizing entities without changing their position.

Use views, this is exactly what they do.
Laurent Gomila - SFML developer

 

anything