Using NumPy arrays as 2D mathematical vectors?

Posted by CorundumGames on Game Development See other posts from Game Development or by CorundumGames
Published on 2012-11-23T20:53:55Z Indexed on 2012/11/23 23:22 UTC
Read the original article Hit count: 252

Filed under:
|
|
|
|

Right now I'm using lists as position, velocity, and acceleration vectors in my game. Is that a better option than using NumPy's arrays (not the standard library's) as vectors (with float data types)? I'm frequently adding vectors and changing their values directly, then placing the values in these vectors into a Pygame Rect. The vector is used for position (because Rects can't hold floats, so we can't go "between" pixels), and the Rect is used for rendering (because Pygame will only take in Rects for rendering positions).

© Game Development or respective owner

Related posts about math

Related posts about vector