Re: [pygame] PATCH: rect.c and test cases

2009-04-12 Thread Sean Berry
Ah, thanks. I saw that 'rect-like' but dismissed it. Next time I
should do more due-diligence.

On 4/12/09, René Dudfield  wrote:
> awesome!  Just in time too, since we need complete tests for the py3k work
> happening now.
>
> Committed revision 2009.
>
>
> One thing I noticed is that the collidedict moved from checking the key of
> the rect, to checking the value of the dict.  The docs didn't specify if the
> key or the value was used.
>
> This makes sense since, rects can not be keys.  However keys can be
> rect-like objects - tuples etc.  I found only some code which used
> this(using google codesearch) - so we should still keep it using the keys
> for backwards compatibility.
>
> I added an argument to collidedict(adict, values=0) .  So you can use the
> values, or the keys of a dict.  It defaults to keys for backwards
> compatibility.
>
> What I didn't do yet, was change the src/rect.doc to add new argument to
> collidedict(adict, values=0)  /collidedictall arguments.  Will also need to
> clear up what they do with the keys/values - since currently the docs don't
> address that at all.
>
> Once the docs are changed you run the makeref.py script to update the docs.
>
>
> cheers,
>
>
>
>
>
>
>
> On Mon, Apr 13, 2009 at 6:19 AM, Sean Berry  wrote:
>
> > Hey,
> >
> > I finished up the 'todo' test cases for Rect.
> >
> > When doing them, I found a bug for rect.collidedict and
> > rect.collidedictall, it was checking the keys instead of the value, so
> > I did that quick fix.
> >
> > I did a svn diff > rect.patch (attached)
> >
> > Let me know if this is how one contributes, this is my first time and
> > I feel kind of awkward.
> >
> > -Sean
> >
>
>


Re: [pygame] PATCH: rect.c and test cases

2009-04-12 Thread René Dudfield
awesome!  Just in time too, since we need complete tests for the py3k work
happening now.

Committed revision 2009.


One thing I noticed is that the collidedict moved from checking the key of
the rect, to checking the value of the dict.  The docs didn't specify if the
key or the value was used.

This makes sense since, rects can not be keys.  However keys can be
rect-like objects - tuples etc.  I found only some code which used
this(using google codesearch) - so we should still keep it using the keys
for backwards compatibility.

I added an argument to collidedict(adict, values=0) .  So you can use the
values, or the keys of a dict.  It defaults to keys for backwards
compatibility.

What I didn't do yet, was change the src/rect.doc to add new argument to
collidedict(adict, values=0)  /collidedictall arguments.  Will also need to
clear up what they do with the keys/values - since currently the docs don't
address that at all.

Once the docs are changed you run the makeref.py script to update the docs.


cheers,






On Mon, Apr 13, 2009 at 6:19 AM, Sean Berry  wrote:

> Hey,
>
> I finished up the 'todo' test cases for Rect.
>
> When doing them, I found a bug for rect.collidedict and
> rect.collidedictall, it was checking the keys instead of the value, so
> I did that quick fix.
>
> I did a svn diff > rect.patch (attached)
>
> Let me know if this is how one contributes, this is my first time and
> I feel kind of awkward.
>
> -Sean
>


[pygame] PATCH: rect.c and test cases

2009-04-12 Thread Sean Berry
Hey,

I finished up the 'todo' test cases for Rect.

When doing them, I found a bug for rect.collidedict and
rect.collidedictall, it was checking the keys instead of the value, so
I did that quick fix.

I did a svn diff > rect.patch (attached)

Let me know if this is how one contributes, this is my first time and
I feel kind of awkward.

-Sean


rect.patch
Description: Binary data


Re: [pygame] XBattleAI clone?

2009-04-12 Thread Knapp
On Sun, Apr 12, 2009 at 9:31 PM, Jake b  wrote:
> There was an old game that was fun, XBattle and XBattleAI , but I'm unable
> to run it on my machine anymore.
> Do you know of any port, ( possibly pygame)  or similar game that would run
> on ubuntu or windows?
>
> --
> Jake

http://www.lysator.liu.se/~mbrx/XBattleAI/
You are a programmer, right? The guy is giving out the source code.
Get it and fix it or else port it. Sounds like a fun project to me.
His site also gives links to something called Europa.

Maybe you could write a networked version of this. I could give you a
server client setup, if you want to do it 3d with panda3d or you can
get some nice network stuff to use with pygame too!

-- 
Douglas E Knapp

Why do we live?


[pygame] XBattleAI clone?

2009-04-12 Thread Jake b
There was an old game that was fun, XBattle and XBattleAI , but I'm unable
to run it on my machine anymore.Do you know of any port, ( possibly pygame)
 or similar game that would run on ubuntu or windows?

-- 
Jake


Re: [pygame] pygame for portable python

2009-04-12 Thread Lenard Lindstrom
Hello,

Great. I will have to fix some Pygame api issues with base.c - I shouldn't have
made PyErc_SDLError local - and will see about a better approach to module state
in Python 3. As for Surface, I think bufferproxies should be disabled for Python
3 for now to avoid the changed buffer interface issue. I will look at it next.

Lenard

Quoting René Dudfield :

> hi,
> 
> fixed constants.c to compile and import and also did some work getting the
> testing framework, and makeref.py to work.
> 
> cu,
> 
> 
> 
> On Sun, Apr 12, 2009 at 10:31 PM, René Dudfield  wrote:
> 
> > Cool.  I got config_unix.py working on ubuntu with that branch.
> >
> > Also base.c compiles and imports here too.
> >
> >
> >
> > On Sun, Apr 12, 2009 at 8:31 PM, Lenard Lindstrom  wrote:
> >
> >> Hi,
> >>
> >> The branch is svn://seul.org/svn/pygame/branches/python3 . I have
> >> config.py,
> >> config_win.py and setup.py working with Python 3.0.1. I also updated
> >> base.c and
> >> __init__.py. I was able to build pygame.base with Python 3 and call
> >> pygame.base.init() and pygame.base.quit() and
> >> pygame.base.get_sdl_version().
> >>
> >> Also, I built it with Python 2.6 to confirm backwards compatibility.
> >>
> >> This confirms that Python 3.0 can use the Python 2.6 prebuilts for
> >> Windows:
> >>
> >> http://www3.telus.net/len_l/pygame/prebuilt-pygame1.9.0-msvcr90-win32.zip
> >>
> >> I will port the config.py stuff back into the main branch soon.
> >>
> >> Lenard
> >>
> >>
> >> Quoting René Dudfield :
> >>
> >> > cool.  I'll grab your branch and try to get it working on ubuntu.
> >> >
> >> > cu,
> >> >
> >> > On Sun, Apr 12, 2009 at 10:24 AM, Lenard Lindstrom 
> >> wrote:
> >> >
> >> > > Quoting Marcus von Appen :
> >> > >
> >> > > > On, Sat Apr 11, 2009, Rene Dudfield wrote:
> >> > > >
> >> > > > > Yeah cool.
> >> > > > >
> >> > > > > I think it will give me a good push to finish off more tests as
> we
> >> > > change
> >> > > > > towards py3k.
> >> > > > >
> >> > > > > The sprite module is missing tests for a lot of the older sprite
> >> > > > > functionality.  So that's the major one of the .py files I think.
> >>  Our
> >> > > > build
> >> > > > > scripts, and tests are the other major .py files.
> >> > > > >
> >> > > > > If we start back porting some of the pgreloaded py3k stuff, then
> I
> >> > > think
> >> > > > we
> >> > > > > can have a pygame 1.9 prerelease for py3k within 4 weeks time(in
> >> time
> >> > > for
> >> > > > > the course).  Remember, it only took Marcus a few days to port
> >> > > pgreloaded.
> >> > > >
> >> > > > It has a less messy internal API, though :-).
> >> > > >
> >> > > I think we could get a minimal Pygame ready: base, surface, mixer,
> >> image,
> >> > > gfxdraw. I have access to an XP box for the next few days so will
> fork
> >> off
> >> > > a
> >> > > python3 branch and see if I can get something to work for Windows.
> But
> >> > > don't let
> >> > > that stop anyone else from adapting Pygame to Python 3. We can merge
> >> > things
> >> > > back
> >> > > later.
> >> > >
> >> > > Lenard
> >> > >
> >> > >
> >> > > --
> >> > > Lenard Lindstrom
> >> > > 
> >> > >
> >> > >
> >> >
> >>
> >>
> >> --
> >> Lenard Lindstrom
> >> 
> >>
> >>
> >
> 


-- 
Lenard Lindstrom




Re: [pygame] pygame for portable python

2009-04-12 Thread René Dudfield
hi,

fixed constants.c to compile and import and also did some work getting the
testing framework, and makeref.py to work.

cu,



On Sun, Apr 12, 2009 at 10:31 PM, René Dudfield  wrote:

> Cool.  I got config_unix.py working on ubuntu with that branch.
>
> Also base.c compiles and imports here too.
>
>
>
> On Sun, Apr 12, 2009 at 8:31 PM, Lenard Lindstrom  wrote:
>
>> Hi,
>>
>> The branch is svn://seul.org/svn/pygame/branches/python3 . I have
>> config.py,
>> config_win.py and setup.py working with Python 3.0.1. I also updated
>> base.c and
>> __init__.py. I was able to build pygame.base with Python 3 and call
>> pygame.base.init() and pygame.base.quit() and
>> pygame.base.get_sdl_version().
>>
>> Also, I built it with Python 2.6 to confirm backwards compatibility.
>>
>> This confirms that Python 3.0 can use the Python 2.6 prebuilts for
>> Windows:
>>
>> http://www3.telus.net/len_l/pygame/prebuilt-pygame1.9.0-msvcr90-win32.zip
>>
>> I will port the config.py stuff back into the main branch soon.
>>
>> Lenard
>>
>>
>> Quoting René Dudfield :
>>
>> > cool.  I'll grab your branch and try to get it working on ubuntu.
>> >
>> > cu,
>> >
>> > On Sun, Apr 12, 2009 at 10:24 AM, Lenard Lindstrom 
>> wrote:
>> >
>> > > Quoting Marcus von Appen :
>> > >
>> > > > On, Sat Apr 11, 2009, Rene Dudfield wrote:
>> > > >
>> > > > > Yeah cool.
>> > > > >
>> > > > > I think it will give me a good push to finish off more tests as we
>> > > change
>> > > > > towards py3k.
>> > > > >
>> > > > > The sprite module is missing tests for a lot of the older sprite
>> > > > > functionality.  So that's the major one of the .py files I think.
>>  Our
>> > > > build
>> > > > > scripts, and tests are the other major .py files.
>> > > > >
>> > > > > If we start back porting some of the pgreloaded py3k stuff, then I
>> > > think
>> > > > we
>> > > > > can have a pygame 1.9 prerelease for py3k within 4 weeks time(in
>> time
>> > > for
>> > > > > the course).  Remember, it only took Marcus a few days to port
>> > > pgreloaded.
>> > > >
>> > > > It has a less messy internal API, though :-).
>> > > >
>> > > I think we could get a minimal Pygame ready: base, surface, mixer,
>> image,
>> > > gfxdraw. I have access to an XP box for the next few days so will fork
>> off
>> > > a
>> > > python3 branch and see if I can get something to work for Windows. But
>> > > don't let
>> > > that stop anyone else from adapting Pygame to Python 3. We can merge
>> > things
>> > > back
>> > > later.
>> > >
>> > > Lenard
>> > >
>> > >
>> > > --
>> > > Lenard Lindstrom
>> > > 
>> > >
>> > >
>> >
>>
>>
>> --
>> Lenard Lindstrom
>> 
>>
>>
>


Re: [pygame] pygame for portable python

2009-04-12 Thread René Dudfield
Cool.  I got config_unix.py working on ubuntu with that branch.

Also base.c compiles and imports here too.


On Sun, Apr 12, 2009 at 8:31 PM, Lenard Lindstrom  wrote:

> Hi,
>
> The branch is svn://seul.org/svn/pygame/branches/python3 . I have
> config.py,
> config_win.py and setup.py working with Python 3.0.1. I also updated base.c
> and
> __init__.py. I was able to build pygame.base with Python 3 and call
> pygame.base.init() and pygame.base.quit() and
> pygame.base.get_sdl_version().
>
> Also, I built it with Python 2.6 to confirm backwards compatibility.
>
> This confirms that Python 3.0 can use the Python 2.6 prebuilts for Windows:
>
> http://www3.telus.net/len_l/pygame/prebuilt-pygame1.9.0-msvcr90-win32.zip
>
> I will port the config.py stuff back into the main branch soon.
>
> Lenard
>
>
> Quoting René Dudfield :
>
> > cool.  I'll grab your branch and try to get it working on ubuntu.
> >
> > cu,
> >
> > On Sun, Apr 12, 2009 at 10:24 AM, Lenard Lindstrom 
> wrote:
> >
> > > Quoting Marcus von Appen :
> > >
> > > > On, Sat Apr 11, 2009, Rene Dudfield wrote:
> > > >
> > > > > Yeah cool.
> > > > >
> > > > > I think it will give me a good push to finish off more tests as we
> > > change
> > > > > towards py3k.
> > > > >
> > > > > The sprite module is missing tests for a lot of the older sprite
> > > > > functionality.  So that's the major one of the .py files I think.
>  Our
> > > > build
> > > > > scripts, and tests are the other major .py files.
> > > > >
> > > > > If we start back porting some of the pgreloaded py3k stuff, then I
> > > think
> > > > we
> > > > > can have a pygame 1.9 prerelease for py3k within 4 weeks time(in
> time
> > > for
> > > > > the course).  Remember, it only took Marcus a few days to port
> > > pgreloaded.
> > > >
> > > > It has a less messy internal API, though :-).
> > > >
> > > I think we could get a minimal Pygame ready: base, surface, mixer,
> image,
> > > gfxdraw. I have access to an XP box for the next few days so will fork
> off
> > > a
> > > python3 branch and see if I can get something to work for Windows. But
> > > don't let
> > > that stop anyone else from adapting Pygame to Python 3. We can merge
> > things
> > > back
> > > later.
> > >
> > > Lenard
> > >
> > >
> > > --
> > > Lenard Lindstrom
> > > 
> > >
> > >
> >
>
>
> --
> Lenard Lindstrom
> 
>
>


Re: [pygame] pygame for portable python

2009-04-12 Thread Lenard Lindstrom
Hi,

The branch is svn://seul.org/svn/pygame/branches/python3 . I have config.py,
config_win.py and setup.py working with Python 3.0.1. I also updated base.c and
__init__.py. I was able to build pygame.base with Python 3 and call
pygame.base.init() and pygame.base.quit() and pygame.base.get_sdl_version().

Also, I built it with Python 2.6 to confirm backwards compatibility.

This confirms that Python 3.0 can use the Python 2.6 prebuilts for Windows:

http://www3.telus.net/len_l/pygame/prebuilt-pygame1.9.0-msvcr90-win32.zip

I will port the config.py stuff back into the main branch soon.

Lenard


Quoting René Dudfield :

> cool.  I'll grab your branch and try to get it working on ubuntu.
> 
> cu,
> 
> On Sun, Apr 12, 2009 at 10:24 AM, Lenard Lindstrom  wrote:
> 
> > Quoting Marcus von Appen :
> >
> > > On, Sat Apr 11, 2009, Rene Dudfield wrote:
> > >
> > > > Yeah cool.
> > > >
> > > > I think it will give me a good push to finish off more tests as we
> > change
> > > > towards py3k.
> > > >
> > > > The sprite module is missing tests for a lot of the older sprite
> > > > functionality.  So that's the major one of the .py files I think.  Our
> > > build
> > > > scripts, and tests are the other major .py files.
> > > >
> > > > If we start back porting some of the pgreloaded py3k stuff, then I
> > think
> > > we
> > > > can have a pygame 1.9 prerelease for py3k within 4 weeks time(in time
> > for
> > > > the course).  Remember, it only took Marcus a few days to port
> > pgreloaded.
> > >
> > > It has a less messy internal API, though :-).
> > >
> > I think we could get a minimal Pygame ready: base, surface, mixer, image,
> > gfxdraw. I have access to an XP box for the next few days so will fork off
> > a
> > python3 branch and see if I can get something to work for Windows. But
> > don't let
> > that stop anyone else from adapting Pygame to Python 3. We can merge
> things
> > back
> > later.
> >
> > Lenard
> >
> >
> > --
> > Lenard Lindstrom
> > 
> >
> >
> 


-- 
Lenard Lindstrom




Re: [pygame] pygame for portable python

2009-04-12 Thread René Dudfield
cool.  I'll grab your branch and try to get it working on ubuntu.

cu,

On Sun, Apr 12, 2009 at 10:24 AM, Lenard Lindstrom  wrote:

> Quoting Marcus von Appen :
>
> > On, Sat Apr 11, 2009, Rene Dudfield wrote:
> >
> > > Yeah cool.
> > >
> > > I think it will give me a good push to finish off more tests as we
> change
> > > towards py3k.
> > >
> > > The sprite module is missing tests for a lot of the older sprite
> > > functionality.  So that's the major one of the .py files I think.  Our
> > build
> > > scripts, and tests are the other major .py files.
> > >
> > > If we start back porting some of the pgreloaded py3k stuff, then I
> think
> > we
> > > can have a pygame 1.9 prerelease for py3k within 4 weeks time(in time
> for
> > > the course).  Remember, it only took Marcus a few days to port
> pgreloaded.
> >
> > It has a less messy internal API, though :-).
> >
> I think we could get a minimal Pygame ready: base, surface, mixer, image,
> gfxdraw. I have access to an XP box for the next few days so will fork off
> a
> python3 branch and see if I can get something to work for Windows. But
> don't let
> that stop anyone else from adapting Pygame to Python 3. We can merge things
> back
> later.
>
> Lenard
>
>
> --
> Lenard Lindstrom
> 
>
>


Re: [pygame] pygame for portable python

2009-04-12 Thread Andre Krause
Lenard Lindstrom wrote:
> Quoting Marcus von Appen :
> 
>> On, Sat Apr 11, 2009, Rene Dudfield wrote:
>>
>>> Yeah cool.
>>>
>>> I think it will give me a good push to finish off more tests as we change
>>> towards py3k.
>>>
>>> The sprite module is missing tests for a lot of the older sprite
>>> functionality.  So that's the major one of the .py files I think.  Our
>> build
>>> scripts, and tests are the other major .py files.
>>>
>>> If we start back porting some of the pgreloaded py3k stuff, then I think
>> we
>>> can have a pygame 1.9 prerelease for py3k within 4 weeks time(in time for
>>> the course).  Remember, it only took Marcus a few days to port pgreloaded.
>> It has a less messy internal API, though :-).
>>
> I think we could get a minimal Pygame ready: base, surface, mixer, image,
> gfxdraw. I have access to an XP box for the next few days so will fork off a
> python3 branch and see if I can get something to work for Windows. But don't 
> let
> that stop anyone else from adapting Pygame to Python 3. We can merge things 
> back
> later.
> 
> Lenard 
> 
> 

this would be great, because for my freshman programming course, i only need
surfaces, image loading and mouse events. thats all you need for a simple baloon
pop and arkanoid game.