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

Author Topic: Views and his limits  (Read 1674 times)

0 Members and 2 Guests are viewing this topic.

Nesvi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Views and his limits
« on: June 27, 2012, 11:00:40 pm »
Hi,

First , congratulations for sfml, i love it ;). Since some months i have been developing an pseudo-infinite tile system for my game, now i have a doubt. What is the limit of movement of a view? integer ? can i change it to unsigned long long?(i made my own scrolling system, but i think that the developer of sfml knows how to get a better performance).

Thanks, ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Views and his limits
« Reply #1 on: June 27, 2012, 11:06:06 pm »
SFML uses floats for units of the 2D world. So you can go far but you may lose precision.
Laurent Gomila - SFML developer

Nesvi

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Views and his limits
« Reply #2 on: June 27, 2012, 11:33:56 pm »
That was other question i had, the float unit control pixels  in 1:1 zoom, and the non integer part is used when you use the zoom?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10988
    • View Profile
    • development blog
    • Email
Re: Views and his limits
« Reply #3 on: June 28, 2012, 12:52:25 am »
You could've easily looked at the source code instead of waiting for an answer.

I don't see anything that would deal with integers, i.e. everything is using floats and they are fine if you don't zoom too much or move too far away.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/