SFML community forums
Help => General => Topic started by: StormWingDelta 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. ::)
-
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.
-
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
-
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
-
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 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.