Warming up: motion demoI'm very interested in reducing load times for Pyweek games. I like to jump right into the action. So I tried an experiment. I have a 3-D model with 60 frames that takes about 20 seconds to load into pyOpenGL. So my experiment was to just load 4 frames of the animation to start with, and then add the rest as you go along. I'm guessing you shouldn't generate a GL list in one thread while rendering the scene in another, so all the loading has to take place between game frames. Each animation frame, though, takes about 300ms to generate into a GL list, and that's way too long to stick into a single game frame. But I found out that you can chain together a sequence of GL lists, and it works just as well. So each animation frame comprises 20 GL lists, and each game frame, one of these lists gets generated. I'm still not very familiar with GL optimizations, though, so this might not be the way to go.
I'm pretty satisfied with the result. The framerate and load times are about the same whether you preload it or load it during the action. It starts off pretty jittery as you'd expect, but I think it's a good tradeoff. For an actual game, it would be better, because you'll have more than one action. No need to load the shooting frames before the game begins, if you'll have plenty of time before the player even gets a gun.
Anyway, just thought I'd share. Anyone with more GL experience is welcome to give me tips! :)
(log in to comment)