[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [pygame] ANNOUNCE: new 2d primitives library for pygame/SDL





> From: owner-pygame-users@seul.org [mailto:owner-pygame-users@seul.org]On
> Behalf Of Pete Shinners
> Sent: Saturday, April 07, 2001 2:03 PM
> To: pygame-users@seul.org
> Subject: Re: [pygame] ANNOUNCE: new 2d primitives library for pygame/SDL
>
>
> > I've been using pygame for a week or two, and am very
> impressed.  One thing
> > that seemed to be missing was a graphics primitives library.
> >
> > I've started one, called the HeidiGFX library, and have created a
> > sourceforge project.
...
> hello scott, i just looked into the library. definitely a full
> start for a graphics library. i'm not sure if you know, but
> there is already a Heidi Graphics :]. it is kind of a simpler

Unfortunately, no I didn't.  I suppose a simple web search would
have turned it up.  Well, until too many people seem confused, I
get sued, I merge with another project, or my wife changes her name,
I think I'll stick with what I've got - special spousal request. :)

...

> here is the information i currently know about drawing primitives and sdl.
>
> currently, the two libraries Powerpak and SGE are what everyone
> has been basing there code on, but rarely does anyone actually
> use these libraries (too much 'other stuff' i think).
>
> there is another early drawing primitives library that is
> surprisingly full featured. (antialiased lines, drawing with alpha, etc)
> this one is named SDL_gfxPrimitves, and you can find it here.
> ftp://esc2.zkm.de/pub/SDL_gfxPrimitives/
> (currently only has an ftp site)

You see? I started this project because I couldn't find anyone doing one
like
gfxPrimitives.  I was actually going to name it primitivegfx until my wife
mentioned I'd never named a project after her. :)

It's strange that SDL_gfxprimitives isn't mentioned on the sdl page - but
I suppose HeidiGFX isn't either.

I'll dig in, and I hope it's helpful, but I still think what I want to
do is different enough that it's worthwhile to maintain a seperate
project - I'm hoping on eventually being able instantiate a rectangle
object, and be able to script motion, size, background image
(frame-animated)
and collision-detect it with other primitives.

> the SGE library has one other thing that i haven't seen anywhere
> else, and that is drawing gouroud shaded triangles. neat
>

Maybe I'll swipe those, too - Do you know if SGE is LGPL?  If not,
there are enough general-purpose gourard algorithms out there anyway...

> also, pygame has the groundwork for a decent drawing library.
> the draw module currently only provides line drawing, but i
> want to expand it to include the things you have in your library.
> i don't really see the need for pygame's draw library to be as
> full featured as the gfxPrimitives one.
>
> btw, toot my own horn time. gfxPrimitive was using the line drawing
> routine found in SGE (same as in powerpak and yours). in version 1.1 he
> switched the line drawing routine to the one found in pygame.draw. it
> was over 50x faster (woop!)

50% or 50x? 50x is a BIG improvement (so is 50% :) ). I'll definitely take
a look. Line speed is one of my biggest performance hurdles right now.

You know, until you mentioned it, I didn't even know there *was* a draw
module in
pygame.  Good thing it's sparse right now, or I'd feel pretty silly posting
that
announcement!

> here's some options. right now i'd really like to add some functionality
> to the pygame.draw module. the functions you have now in heidigfx are
> pretty much what i want. if you could get a chance to take my draw.c and
> add your functions in, that would be awesome. just the basics are good
> for the pygame.draw module. any advanced drawing i'll leave for the 3rd
> party extensions.

Not a problem - I'll swipe your line code, and I'll give you my primitive
code.
For now, I'll just stick it in, and going into the future, I'll keep my code
ready to be slapped in when you like what I've got.  Do I mail you diffs,
mail
you fixed files, or is there some other process you guys follow?

If I can get pygame to compile (don't see why I couldn't) I'll forward you
an
msvc project file, too - for those of us who are on build-tool challenged
platforms.

> you might want to get in touch with the gfxPrimitives guy. i've met
> him a couple times on IRC, and we've swapped code a bit. it might be
> nicer all around to just have one really good SDL drawing primitives
> library. you could do the library in all C, and we could maintain
> the python wrapper as an optional module included in pygame.

I definitely agree. A consistent, solid, no strings primitives library
would give SDL a real boost - along with everyone else who's along for
the ride (including pygame).

> i was able to make a few small changes and your package compiled with
> the distutils stuff included. eventually you'll probably want to get
> it set up right, since then it can compile on all platforms.

What platform?  Mind sending me your changes?

> before the pygame-1.0 release i was digging through distutils a lot, and i
> know i can make a cleaner setup.py script for any 3rd party modules. i'll
> try to work on this soon.

Keep us posted!  BTW, what other 3rd parties are out there?

  - Scott


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org