integration with rabbyt

162 views
Skip to first unread message

Amy

unread,
Jun 29, 2012, 8:04:44 AM6/29/12
to pyglet-users
Hi again,

I'd like to use rabbyt with pyglet.

I've been looking over the rabbyt documentation and browsing through
the rabbyt Google groups. I'm still a little confused about how it
interacts with pyglet - especially in regards to it's Scheduler class
and handling of time. I know (from what I've read and tried) that the
Sprite class is not a drop in replacement for pyglet's sprite class
and I'm on with re-working that for the added speed.

I'm really looking for some best practices with using both pyglet and
rabbyt. Is anyone currently using both that can share some insight? I
thought I'd post this here because I'm approaching this from a pyglet
only perspective - I'd like to allow pyglet to keep doing the things
that it does very well and only hand off the minimum to rabbyt for
sprite speed up and collision support.

Thanks so much!

Amy

Joseph Marlin

unread,
Jul 2, 2012, 12:17:37 PM7/2/12
to pyglet...@googlegroups.com
If you are only looking for spritework and collision stuff, you might want to look into cocos2d (http://cocos2d.org/) It is built on pyglet, so integration is super easy.

Mikhail Sidorov

unread,
Jul 2, 2012, 12:38:44 PM7/2/12
to pyglet...@googlegroups.com
You can check out the source code of Gondola — a game by the creator of Rabbyt: http://arcticpaint.com/projects/gondola/

2012/6/29 Amy <amydur...@hotmail.com>

Amy

--
You received this message because you are subscribed to the Google Groups "pyglet-users" group.
To post to this group, send email to pyglet...@googlegroups.com.
To unsubscribe from this group, send email to pyglet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en.


Matthew Marshall

unread,
Jul 3, 2012, 9:11:22 PM7/3/12
to pyglet...@googlegroups.com
There aren't too many interaction points:

The Sprite.texture attribute knows how to use pyglet texture objects. Also, if pyglet has been imported the rabbyt will automatically use pyglet for image loading if you provide a string for a texture.

Rabbyt's animations use whatever time you give it with rabbyt.set_time/rabbyt.add_time, so do something like "pyglet.clock.schedule(rabbyt.add_time)" to hook it up with pyglet's default clock.

If you're using pyglet you can just ignore rabbyt's Scheduler class. None of the rest of the library depends on it. (It probably should have been included in the library.)

Hope that helps :-)

MWM
Reply all
Reply to author
Forward
0 new messages