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

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



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.