Hey all,

I got a first draft up that shows my idea!  

https://github.com/Permafacture/data-oriented-pyglet

Going from the very rough proof of concept (examples/third.py) to one that 
feels much more object oriented but still gives the vectorized, data 
oriented performance actually did not decrease the performance at all.  I'd 
be very happy to work with others to clean this up, generalize it, extend 
it, and otherwise make it awesome!  Data oriented programming has many 
potential benefits to game programming than just rotating vertices, and I'm 
just beginning to learn.


On Thursday, January 7, 2016 at 11:56:44 AM UTC-6, Salvakiya wrote:
>
> keep in mind... If numpy becomes apart of pyglet then pyglet will no 
> longer function out of the box with pypy. I would say a solution to your 
> problem would be to use pypy. However if your desired target is cpython 
> then numpy is the way to go.
>

I have no intention of trying to introduce numpy into pyglet.  I like 
pyglet's style, including the pure python aspect.  However, for my use 
case, I'm already using pymunk and opencv, so pypy is not a drop in 
solution.  (getting numpy to work would be the least of the trouble, 
actually).  Plus, I tried examples/first.py with pypy and got ~500fps after 
warmup, while examples/data_oriented.py was ~650 in cpython.  The data 
oriented version still gets all of the packages available in cpython, 
including potential huge benefits using numba's `vectorize` over the data 
oriented arrays.

Thanks for reading,
  Elliot

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to