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

Re: [pygame] Data aware jit/blit POC - drawing 1.25 to 1.45 times faster.



Nice one.

That seems like something that will work quite with with pgzero.

I guess this could be a Surface style class (OptimisingSceneGraph) which does all this scene graph change tracking business.

Another related technique this brings to mind... having command queues with events, that cached the screen at certain points (like key frames). This way it can go backwards in time and not have it take minutes to redraw everything from the start. Not really sure that's at all useful for this. It's mainly used for animations, and content creation apps.

If you saved all this drawing meta data in development, then it would be quite a speed up for playing scenes for the first time too. Of course, if they are somewhat static animations.




On Fri, Mar 31, 2017 at 11:10 PM, Daniel Pope <mauve@xxxxxxxxxxxxxx> wrote:

There's another "jit" I wrote a long time ago for my first Pygame game here: https://bitbucket.org/lordmauve/metalwork/src/b2b916858e8e8c63222ae609bcd836ab5b55f49b/robots/graphics/scenegraph.py?at=default&fileviewer=file-view-default

It calculates dirty regions by comparing the blits that occur between successive frames.


On Fri, 31 Mar 2017, 21:41 Daniel Pope, <mauve@xxxxxxxxxxxxxx> wrote:

I *think* that alien is public domain or Creative Commons. There's a whole asset pack. It doesn't come from Pygame Zero.


On Fri, 31 Mar 2017, 16:41 René Dudfield, <renesd@xxxxxxxxx> wrote:
Hello,

I made a proof of concept for the data aware drawing thing I mentioned in a previous email.

I used the alien image in the pygamezero tutorial as the example. To show that this can be applied to pygamezero. But it can be applied to any engine that draws images really.


cheers,