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

Author Topic: I forget how big of a Borderless Map can SFML Handle?  (Read 2213 times)

0 Members and 1 Guest are viewing this topic.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
I forget how big of a Borderless Map can SFML Handle?
« on: April 02, 2014, 06:07:00 am »
Just wondering since I'm planning a game that needs and endless map or as endless as I can get it anyways.  Also forgot what classes let this be doable as well. :)


That aside hopefully once I get what I need up and running there won't be as many questions leaving feeling dumber than I am.  ::)
I have many ideas but need the help of others to find way to make use of them.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
AW: I forget how big of a Borderless Map can SFML Handle?
« Reply #1 on: April 02, 2014, 08:11:44 am »
Short answer: No limits with the right implementation.

Long answer: If you just use a view to move your character around, the limitation will essentially be the inaccuracy of floats in C++. When you're too far out everything will get jittery. But before yoi hit that issue l, you'll most likely run into other problems, such as storage.

If you want to get rid of the float issue, you could reset the coordnate system after a certain distance has been made.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

AncientGrief

  • Newbie
  • *
  • Posts: 32
    • Yahoo Instant Messenger - what?
    • View Profile
Re: I forget how big of a Borderless Map can SFML Handle?
« Reply #2 on: April 02, 2014, 04:41:22 pm »
I created a thread about this topic:
http://en.sfml-dev.org/forums/index.php?topic=14264.msg100057#msg100057

Maybe it helps a little bit. Especially my idea on keeping the map "endless": http://en.sfml-dev.org/forums/index.php?topic=14264.msg100057#msg100057
I grew up with C++...but then I met C#...got lazy...time to turn back to my one and only love!
My system:
Wintendo 10 with Intel i7 4770k
Palit GeForce GTX 980
16 GB RAM

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: I forget how big of a Borderless Map can SFML Handle?
« Reply #3 on: April 02, 2014, 08:52:08 pm »
hmm seems interesting.  Been busy converting some of the code examples into C# so it might be a while before I get setup but at least I know I can let people be crazy and zap them if they try to cause memory issues. :P
I have many ideas but need the help of others to find way to make use of them.

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: I forget how big of a Borderless Map can SFML Handle?
« Reply #4 on: April 03, 2014, 02:52:39 am »
Now if only I could remember how to center the view on the sprite so it'll move with the sprite.  I know the Move method makes it move but can't ever remember if it is moving from top left or center when it does. >.<
I have many ideas but need the help of others to find way to make use of them.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: I forget how big of a Borderless Map can SFML Handle?
« Reply #5 on: April 03, 2014, 03:51:15 am »
I think the SFML 2.1 view tutorial is VERY clear about that. (and the Move method would work the same whether it's from the center or the top left corner) Try reading the relevant part and you'll know, it's only 3 lines.

 

anything