Showing posts from March, 2008

hi, what is it? oh pygame 1.8 is released.

Dear you,

I was walking down the street the other day and pygame 1.8 was
accidentally released.


Well anyway. Have a nice day.

* pygame.mask for pixel perfect collision detection
* pygame.scrap for clipboard support
* new and improved sprite groups, including layers, automatically
selecting fastest update mode(full screen or dirty rect updates), and blend modes...
* blending support for filling and blitting surfaces. ADD, SUB, MULT, DIV etc.
* saving surfaces as jpeg and png
* buffer access for Surface and Sound objects
* numpy, and numeric support for pygame.surfarray and pygame.pixelarray
* PixelArray, which can be used instead of numpy - without the dependency.
* smooth scale function written in mmx assembly with C fallback.
* More functions release the GIL for multithreaded use.
* lots of speed ups to many functions via better python wrapping.
* color thresholding, bounding box finding for images, and surface averaging.
* massive do…

py3k Decimal?

From the Cobra language, comes the idea of using Decimal numbers as the default. It's 2008, so let's use decimals by default!

This is an error that python has... Add 0.1 together ten times, and you do not get 1.0.

>>> 1.0 == 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1 + 0.1

Maybe py3k should use Decimals by default instead? Or is this planned already?

Python float performance is really bad anyway, so we might as well make it a little more accurate right?

Floats are such a cause of errors in code, it'd be nice if math was more accurate by default :) It requires a fair bit of knowledge to understand all the quirks of floats, but less to understand the quirks of decimals.