I’m new to gaming, not programming, and after reading and playing with some sample code in the past few days, I’m very excited to write a new game with panda3D!
I went over and played with the examples, @wolf’s collection, and other resources I could find.
The biggest thing I’m missing is a guideline for the structure (architecture) of the program and the code.
All of the examples I saw are a single long python file, which is wonderful to go over when learning a concept, but not a scalable way to write code.
I’m assuming that the main “world” class will take care of the heavy lifting: initialization, timing, events, and general orchestration, etc., but I’m not sure about the other classes.
For example, I would like to have a separate class for separate “game objects”. What’s a common way to do it? Keep them as Panda3D aware objects, and let them import panda3D packages? I rather have these classes decoupled from panda3D code, and maybe use some proxies to connect them to the world. Somehow I have a feeling that it should be a common practice, but maybe it’s just something that’s already been tested but discarded.
In short, the question is: While Panda3D is the engine of the whole game, is there a good guideline on how to create a good clean architecture that decouples the game logic from it?
I would love to hear your thoughts or look at (preferably recent) code samples that do it.