Open diasssavio opened 4 months ago
@herodrigues this is a good issue for you start exploring, if you want. It is something I missed during development of #1, as it is very tricky to debug & trace ball and other entities movement to check instability within the physical system.
This is basically a visual debugger. Though I don't see the point of using exclusively python libraries since this will probably be integrated into the actual game with an option to toggle on/off in the developer view.
I believe this had to be in the game source code If we want to use this feature while running the game. Of course we can have this "outside" the main game source code, but it looks like it will double the work in the future.
That was the later option I gave. To go directly to a visual game engine.
However, for a quick solution, I'd prefer to have a Python solution because here we will basically plot data stored in file.
For in-game ploting and framerate update, in a pure videogame fashion, that will be done using in memory (GPU one, actually), sync'ed at games iteration. Which I believe will be an entirely different approach.
The idea here is that we will have game snapshots from regular times saved in files, that we can retrieve to memory and plot to check what is going on.
Ball, Arena & Cars
Ball
in bindings) it is enough to draw a circle with 2D coordinates and a radius. It may be interesting to have support for drawing vectors as well, such as velocity.Arena
in bindings) for now, it is a simple square with minimum and maximum coordinates. In the future, we may want to try out new and more complex shapes.Car
in bindings), they are center of gravity and simple squares with minimum/maximum coordinates and an orientation vector (represented by vector/angle or quaternion). It is also interesting to have support for vectors here.