Well, part of it would be the procedural generation of level-geometry. The manual has a section on this matter, here:
https://docs.panda3d.org/1.10/python/programming/internal-structures/procedural-generation/index
And I believe that Epihaius has posted some samples showing an implementation of procedural generation:
Otherwise, what is it that you’re currently struggling with, specifically?