reset game

is it possible to “reset” a game, means that e.g. when the key “r” ist pressed, everything in the games is like it was at the beginning?

You can

But there is no easy way to do it.

Create an evenement in your code that is appied when you push the button.

base.accept('r', your_function)

and reset everything ‘by hand’ inside it, recreate or destroy object, replace them, relaunch task,…

I just wanted to add, that you can’t expect this kind of functionality OOTB (same with, for example, saving). Panda (or any other engine) doesn’t really know what you want done. It doesn’t know, by itself, what the “initial” state of your game is, so you can’t expect it to be able to return to that state. It’s your code’s responsibility to do that.