[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Re : [pygame] raycasting engine performances (numpy array)





On 29 April 2012 20:48, Ian Mallett <geometrian@xxxxxxxxx> wrote:
As with others, absolutely: raycasting is going to be slow. ÂIt's slow even in C, and that's kinda the reason GPUs were invented. ÂAs far as optimization, often people set up 2D arrays laid out in memory with x as the second variable. ÂSo, although this might not be possible with NumPy, if you can order your array accesses as arr[y][x], you might get better cache coherency.

On Fri, Apr 27, 2012 at 2:41 AM, nathan.open@xxxxxxxxx <nathan.open@xxxxxxxxx> wrote:
So now my question is, can i write the game logic entirely in python and write the rendering part in C with OpenGL calls?
Yes.
Â
Though using pyopengl or some other existing binding might be easier, or at least be useful reference to save you some of the integration effort.

Russell