platipy / spyral

http://platipy.org
Other
49 stars 12 forks source link

How to integrate with other pygame resources? #67

Open icarito opened 10 years ago

icarito commented 10 years ago

For instance, I'd like to somehow integrate gummworld2 tmx map rendering: http://pygame.org/project-Gummworld2-1733-4718.html

I can think maybe I should use an Actor clas for implementing the equivalent of a main loop?

Would be nice to get your advice on the topic.

acbart commented 9 years ago

I think the experience will vary a lot depending on what you're integrating. In theory, you can always import pygame and treat it as usual - in practice, Spyral is doing a lot to Pygame that can go against your expectations (I'm not sure what would happen if you started flipping the display manually, for instance). In this system's example, I think you would need to work at a pretty deep level in Spyral to do the integration, since these are both frameworks on top of pygame.

In the case of this renderer, we should figure out what their approach is in general, and then we can probably mimic it. I don't know how much code would be directly usable, but I'm 51% confident that we couldn't just use the library directly.