Tutorial 2 has a bug. The output is:
> Traceback (most recent call last):
> File "tutorial2.py", line 155, in <module>
> simulate(world, body1, body2)
> File "tutorial2.py", line 141, in simulate
> pygame.draw.circle(srf, (55,0,200), coord(x1,y1), 20, 0)
> TypeError: integer argument expected, got float
An easy fix is to replace the "coord" function content with this:
return int(320+170*x), int(400-170*y)
that is, convert to int the values to be returned.
I used the 2010.10.13 snapshot, and I'm running Ubuntu 11.04 32 bits.
> I thought that's a warning, not an error?
No, it is an error. Maybe in previous python versions (I'm running 2.7.1 on
linux) it was just a warning. I think many of them are now errors, to take
care of possible bugs.