infinite jumper end of "editor size 650000" problem

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nighttraveler
:warning: Old Version Published before Godot 3 was released.

Hi this is my first attemp to make a game (my little game) it’s a infinte jumper but actually when the player reachs the “editor border” the camera hold in there, i was trying to fix it with a Area2D and when the player touch it , jump down it isn’t a very good way because the area2d it’s close to the middle of the camera, So it’s kinda weird when happends, as you will solved?

:bust_in_silhouette: Reply From: Ace-Dragon

One possibility is that you’re starting to hit the limits of 32 bit floating point numbers, or maybe it’s a hardcoded limited in Godot designed to prevent such errors.

To alleviate, you could (once you get to such coordinates) ‘teleport’ the current section back to the coordinates where you started from (in a way where it appears seamless), as I doubt you would’ve kept every level section ever generated in memory.

func _on_backpos_body_enter( body ):
if body.get_name()==“player”:

		ypos=0 #the pos where paltaforms  start to spawn
		last_plataform_ypos=0 # the pos of the last created plataform in spawn i made then 10 platafmorms and when player is close to the last, spawm 10 more
		body.set_pos(Vector2(55,-20))# back to start pos
	for i in plataforms.get_children():
		i.queue_free() # queue the old plataforms
	pass # replace with function body

here a video of what happens with that code

Nighttraveler | 2016-03-05 03:27