Hello all, I've been working to create a 2d game on pyglet. The project started small but has ended up using a lot of file resources (mostly images) including effects for backgrounds, items, map objects, players, monsters, abilities. However, I am having minor problems where the application can stutter due to the blocking nature of I/O when loading lots of these files. Right now, I just load them as they come, however, there are obvious hiccups in gameplay when the image files are loaded, especially when loading a map (can take several seconds and for even bigger maps, can cause the window to act as unresponsive).
I was thinking of creating sprites with a blank texture and then use a thread to load the file. Then when the file has been loaded, to create the texture and replace the sprite texture with the new one. However, I know OpenGL has problems with threads so this doesn't seem like a proper solution. Is there anyway I can reduce the impact of this problem so at least the window doesn't go unresponsive or to solve this issue? Any help is appreciated. Thanks. -- 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 https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
