You wouldn't have to rewrite the entire thing, per se, but you would definitely have to refactor most of it. Pyglet is an event-based paradigm (tell me what to do when X happens, where X is input, time, etc.), whereas Pygame is loop-based (go examine everything every time you loop).
It's very doable, though. I refactored an entire checkers demo app I had made from pygame into plain pyglet. It took me several hours, after having already gotten well acquainted with pyglet. ~ Nathan On Fri, Jun 7, 2013 at 9:04 PM, Richard Kwok <[email protected]> wrote: > Hello > > I've recently invested quite a bit of time into a 2D game with pygame, > leaning heavily on its 'Rect' type as well as the multiple 'Surface' > layers. I want to utilize the GPU to increase performance, and I've read > that Pyglet can allow me to do this. Would I have to start over and rewrite > the whole game from scratch with Pyglet? Or could I use Pyglet just for > drawing to the screen, and keep all the object-tracking and calculations > built around Pygame? > > Thanks in advance! > > -- > 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 http://groups.google.com/group/pyglet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- 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 http://groups.google.com/group/pyglet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
