On Mar 3, 1:12 am, Cory <[email protected]> wrote:
> Whats a good source for information on Game programming with pyglet? I
> try googling it, but I get very little search results. Mostly just
> random blogs of really simple games.
Whatever you read generally about game programming pretty much applies
to programming games in python with pyglet too.

> It seems my game flickers more than it should. When I incorporate
> movement and sprites move across the screen its as if they are not
> very fluid.
I usually pick a pyglet.clock.schedule_interval(0.03, simulate) for
animating stuff.
When you do movement etc. you have to incorporate the factor of time,
or it will look jerky (due to the fact that intervals aren't called
precisely every 0.03 seconds)
see for instance: 
http://hg.codeflow.org/spacegame/file/fc8ad22a34a0/spacegame/util.py#l100

> Also I change the animation of the sprite using sprite.image =
> new_animation
> I'm not sure if theres a better or more proper way of doing this.
You should be using image sequences/grids for that
http://pyglet.org/doc/programming_guide/image_sequences_and_atlases.html
.
see for instance 
http://hg.codeflow.org/spacegame/file/fc8ad22a34a0/spacegame/objects.py#l147

> Also I would like more information of what uses the even dispatchers
> ect. can provide as I'm not exactly sure how I would use them but I
> see them all over the API so im sure I should know how to use them.
Event dispatching is useful and well described in the documentation
http://pyglet.org/doc/programming_guide/the_pyglet_event_framework.html
For more examples see http://hg.codeflow.org/spacegame
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to