My other favorite programming language is FreePascal. I also understand this language and it is lightning fast just like C++.
As soon as I tried out the astroid demo using python, firing a lot of shots and see how my FPS drops from 100 to 25 and that turned me off.
Would this be possible to have a wrapper for FreePascal/Delphi?
Keep in mind that the asteroid demo is just that, a demo, and is not an intended to be an illustration of particularly efficient programming practices. It is possible to write slow, inefficient code in any language.
It is also possible to write fast applications in Python. Typically, the biggest part of a 3-D application is the 3-D rendering, which is all handled by Panda3D; the application itself, if well-designed, doesn’t need to be expensive.
One useful exercise might be to study the asteroid demo and find how it can be improved to make it more efficient. It wouldn’t be hard to do this.
But, it is possible to make a wrapper for FreePascal, or any language you like. However, it will be a fair amount of work to make this wrapper, and you will have to be the one to make it. To be successful, you will need to be quite comfortable in C++, since that is the language in which interrogate is written. Alternatively, you can investigate some other wrapper-generating program, like Boost or SWIG, to see if it might support FreePascal already; then, it will be a matter of making this other tool work with Panda. Hugh Perkins has already done some work towards making SWIG worth with Panda; you can search the forums for his work.
I’ll echo the point about the asteriod tutorial collision code not being efficient. In fact it is about as slow as it can be (O(N^2)). The reason is that it is a tutorial about tasks, not collision detection. Therefore I decided to keep the code as short as possible, even if it isn’t efficient. I think it would be a good excercise to make it faster. A good start would be to sort asteriods and bullets by position so that you don’t need to check every bullet against every asteriod ever frame.