position, velocity and acceleration, why are they tuples ?

28 views
Skip to first unread message

Nitneroc

unread,
Apr 13, 2012, 3:02:02 PM4/13/12
to cocos-...@googlegroups.com
Hi, i'm a newbie in cocos2d and I don't know that much about python.

I was wondering lately why cocos2d use tuples for sprites' position, velocity and acceleration attributes (which are used by sprite.do(Move())), and not Vector2d.
Vector2d support convenient operations, and I think it would make my code prettier, but since I'm a newb, I guess there is probably a good reason i'm not aware of.

Thanks

claudio canepa

unread,
Apr 13, 2012, 3:28:06 PM4/13/12
to cocos-...@googlegroups.com
I think (but may be wrong) that no explicit design decision was taken: python don't have a standard vector 2d class, so probably the initial code  used tuples just for this.
After that, probably nobody has seen the need / desire-to-redesign-and-convert-the-codebase




Nitneroc

unread,
Apr 14, 2012, 9:48:52 AM4/14/12
to cocos-...@googlegroups.com
ok, thank you !
Is it true that cocos2d doesn't have a real maintainer at the moment ? I am really impressed with cocos2d and pyglet, and I don't really understand why they are both uncontinued when pygame still has so much success...

Le vendredi 13 avril 2012 21:28:06 UTC+2, Claudio Canepa a écrit :

claudio canepa

unread,
Apr 17, 2012, 12:26:00 AM4/17/12
to cocos-...@googlegroups.com
On Sat, Apr 14, 2012 at 10:48 AM, Nitneroc <corent...@gmail.com> wrote:
ok, thank you !
Is it true that cocos2d doesn't have a real maintainer at the moment ?

For the last two years cocos got one release per year, the issue tracker shows issues fixed and other work in progress, a release for this year is planned, so it is not orphaned.

claudio

-- 

Reply all
Reply to author
Forward
0 new messages