it supports flipping, rotating and tinting (with alpha) individual
tiles and I get about 600fps while scrolling under Linux (8600 GT
video).
The source code is available at:
http://www.koltois.com/2011/12/09/tilemap-test-source-code/
My requirements included unlimited map size, animated tiles, on-the-
fly tinting, etc. and I couldn't get it to work at a decent speed with
Python or even Cython. The rest of the project I am working on is all
Python with Pyglet.
The way it's done also easily supports animated tiles (change the
tileMap ID in the array), but the above code does not implement it.
This code was hacked out of a larger project and is a bit messy and
probably not optimal, but I'm definitely open to suggestions for
improvements.
It will be useful as an drop-in speedup extensions for pyglet. I don't know if it will require inventing a new API in pyglet, though.
tileC.c:4:31: fatal error: numpy/arrayobject.h: No such file or
directory
compilation terminated
I do have numpy on my system, so I other than that I dunno what I'm
doing wrong; maybe the wrong command in setup tools?
On 12 dic, 07:12, Gary Daniels <wif...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.
In setup.py, try `import numpy` and use
library_dirs = ['/usr/local/lib', numpy.get_include()],
Using Visual C compiler, the OpenGL library is 'opengl32' and
'windows.h' needs to be included before 'GL/gl.h' (in tileC.c). MSVC
doesn't know `0b00000001` constants; change them to decimal values.
Christoph
--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users+unsubscribe@googlegroups.com.
On Dec 14, 4:46 pm, Gary Daniels <wif...@gmail.com> wrote:
> Did you get it to compile and work under Windows with vc?
>
> I tried to build it with vc but get error messages about files missing and
> I ran out of patience tracking them down.
>
> It works fine for me using MinGW and gcc.
>
> On Mon, Dec 12, 2011 at 11:18 AM, Christoph Gohlke <cjgoh...@gmail.com>wrote:
>
>
>
>
>
>
>
> > On 12/12/2011 7:35 AM, Alejandro Castellanos wrote:
>
> >> I keep trying to build tileC with setup tools but it gives me an
> >> error:
>
> >> tileC.c:4:31: fatal error: numpy/arrayobject.h: No such file or
> >> directory
> >> compilation terminated
>
> >> I do have numpy on my system, so I other than that I dunno what I'm
> >> doing wrong; maybe the wrong command in setup tools?
>
> >> On 12 dic, 07:12, Gary Daniels<wif...@gmail.com> wrote:
>
> >>> On Mon, Dec 12, 2011 at 3:56 AM, anatoly techtonik<techto...@gmail.com>*
> >>> *wrote:
>
> >>> It will be useful as an drop-in speedup extensions for pyglet. I don't
> >>>> know if it will require inventing a new API in pyglet, though.
>
> >>> I haven't really tested it enough to submit it for anything official. I
> >>> posted it mainly as a working starting point for those who might need
> >>> fast
> >>> scrolling. As a complete OpenGL newb, I had considerable trouble piecing
> >>> together the theories and suggestions on the mailing list and from Google
> >>> searches to get working code.
>
> > In setup.py, try `import numpy` and use
>
> > library_dirs = ['/usr/local/lib', numpy.get_include()],
>
> > Using Visual C compiler, the OpenGL library is 'opengl32' and 'windows.h'
> > needs to be included before 'GL/gl.h' (in tileC.c). MSVC doesn't know
> > `0b00000001` constants; change them to decimal values.
>
> > Christoph
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "pyglet-users" group.
> > To post to this group, send email to pyglet...@googlegroups.com.
> > To unsubscribe from this group, send email to pyglet-users+unsubscribe@**
> > googlegroups.com <pyglet-users%2Bunsu...@googlegroups.com>.
> > For more options, visit this group athttp://groups.google.com/**
> > group/pyglet-users?hl=en<http://groups.google.com/group/pyglet-users?hl=en>
> > .
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.