开发者

Pyglet: equivalent of pygame.Rect

开发者 https://www.devze.com 2023-04-06 21:53 出处:网络
I am contemplating migrating from pygame to pyglet (main reason: move from Python to Pypy). However, I found no rectangle collision tools in the pyglet doc, while I use pygame.Rect quite often.

I am contemplating migrating from pygame to pyglet (main reason: move from Python to Pypy). However, I found no rectangle collision tools in the pyglet doc, while I use pygame.Rect quite often.

Do you know how pyglet deals with rectangle collision (maybe with OpenGl fu开发者_高级运维ncs, but I do not know them) ?

Thanks


Pyglet doesn't not have this system. You will have to implement it on your own. You could possibly import just pygame's rect and use it within pyglet.

Pyglet is only an opengl interface, not a game toolkit.

(this was a hurdle for me way back when, but you'll get over it. stick with it, pyglet is the right direction to go from pygame)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号