
A hint for optimization:
I found that (on my PC, with PB 4.51; it may differ with other configs...) lists embedded in structure are slower than other solutions.
I have tested 3 solutions :
- embedded list: structure xxx:... List pointmass.pointmass_struct() ... endstructure
- embedded array: structure xxx:... pointmass.pointmass_struct[maxNbPoints] ... endstructure
- pointer to a memory zone where you store the objects' pointers: structure xxx:... *ptrPointList ... endstructure
=> with drawing disabled and the "F9" scenario, the latter is faster (but harder to implement/read) with 207 FPS, the second isn't far behind with 196 FPS, and the first (even if it's more elegant and easier to read) is significatively slower with 123 FPS.
That's why I originally used the pointers in my code, despite the fact they are a little harder to manipulate.