gdquest-demos / godot-2d-space-game

A 2D space exploration and mining game made with Godot and our AI framework
MIT License
837 stars 109 forks source link

LayeredWorld.gd has unreliable planet retention and spawning issues #57

Closed Vine2D closed 4 years ago

Vine2D commented 4 years ago

I'm submitting a...

Bug report

What is the current behavior? \SpaceInfiniteGeneration\03-LayeredGeneration\LayeredWorld.gd If you fly far away enough from a planet for it to queue_free() then fly back towards it to reload it, the code will begin to spawn hundreds of instances of that planet over time. This behavior also causes unreliability when planets are loaded. Sometimes they fail to appear at all if attempted to reload them.

What is the expected behavior? Planets load/unload reliably, and without creating additional nodes every frame.

Tell us the steps to reproduce the bug, and if possible share a minimal demo of the problem.

  1. Run LayeredWorld.tscn
  2. Travel away from any planet on-screen until it unloads
  3. Travel back towards that planet until it should reload
  4. Observe the remote tree as it is populated with planets over time
Vine2D commented 4 years ago

Posted this in the wrong game