Re: [pygame] Working on Retro 80s Game SDK, Looking for general support

2009-01-07 Thread Patrick Mullen
On Tue, Jan 6, 2009 at 10:59 PM, Jake b  wrote:
> @OP: for file saving, have you messed with pickle?
>
> On Tue, Jan 6, 2009 at 6:10 PM, Patrick Mullen  wrote:
>>
>> Also, automated testing is really important when building a framework.
>>  I had to throw
>> out my own framework and start over because the code was bad enough it
>> would
>> have taken too much time to fix all of the problems, and I had no
>> tests to verify
>> that my changes weren't breaking things.  Every fix I did broke
>> something else that I
>> didn't know about.  Now that I have a huge test suite, I am more
>> flexible in adding
>> new features or subtly changing the code.
>
>
> Do you mean using: doctests and Unittests ? [
> http://docs.python.org/library/doctest.html,
> http://docs.python.org/library/unittest.html ]
>
> Or do you do more? I'd like to know more information.
>
> --
> Jake
>
Yeah, I'm talking about unit tests basically.

Well, I use my own testing suite I wrote, because I didn't feel like learning
the others.  It somewhat resembles unittest though, and that's probably
a good thing to learn.  Doc tests might be worth looking into as well.
I actually wrote the tests first.  For instance, one of my tests
creates an animation
object, with a "play_3_times" behavior.  Then, I continually call
next_frame() on the
animation, to tell it to go to the next frame.  After what should have
been 3 times
through, I use the "assert" statement to make sure that the frame counter is no
longer progressing.  Later, if I change some of the animation code
somewhere that
might mess up the play_3_times behavior, when i run the tests that
test will error,
and I'll know I broke something.

Much more could be said about tests, look for test-first development,
which is basically
what I am experimenting with.  After a history of numerous codebases
that are very
difficult for me to work on due to not knowing what might break if I
change or add
anything, I decided to try something different.  It's difficult to
know what to test and how
to test, but I think it pays off.

Oh, one thing that was VERY difficult was how to test any of the
drawing code.  I found
a program called "perceptualdiff" which can compare images even if the
colors or filetypes
or bytes differ, but from a human perspective they look the same.  So
I have a reference
image and the test produces a secondary image to compare with the
reference.  It's
far from ideal, but it's the best I could find.  My engine supports
software or opengl
backends, so checking the drawing was a pretty high priority.  Doing
ad-hoc tests (where
you run some toy program and fiddle with it to check that its working,
like I used to do) was
a nightmare because I always forgot to go back and check the other display mode.

TheMusicGuy wrote:
> Generally, though, I am trying to make sure that the engine works in a
> way that will allow XML to work. With that much settled, the editors
> shouldn't be too difficult. As soon as I finish the menu module I can
> begin work on the image/animation editor, then I'll be able to make
> better judgments.

Sounds like you are thinking about these issues, so that's good.  I was thinking
more of the logic editor than the image editor, but maybe you are not that
ambitious for that :)

> Well...three things:

The problem with draw speed comes more from the fact that software drawing is
slow at higher resolutions.  Since you are focusing on 8/16bit, this
isn't so bad,
but if you want anything better than that, you really want to talk to
the graphics
card's powerful rendering hardware.  Most of which is not used in 2d drawing.
If graphics are a bottleneck, and with the exception of collision
detection usually
are the primary bottleneck, switching to opengl is a much greater gain than
converting code to C.  Since you have already abstracted away surfaces, you can
add in an opengl draw model at a later time if it is needed, so that's
good.  I have
had good results doing a similar thing in my engine.

You may not need it though.  Don't rewrite anything in C unless you know where
the slowdown is coming from :)

Event manager - doubtful to need any optimization
Physics - yeah, this probably needs it, depending on how complex it
is.  Might be
better, since there are so many of them out there, to find an existing
one.  Last Summer
of Code a pygame physics engine was started, I don't know if it was
completed.  This
adds a dependancy, but better than trying to tackle such a difficult
subject when you
have so many other things.

> Thanks. I was afraid people were going to tell me not to bother with
> something like this since there are already several projects that
> resemble this one. I just hope I can take it to the next level before
> school starts up again--only two short weeks left!

As many frameworks as we can get in my opinion!  Plus, if it's
fun/educational for you, why not.


Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread evil monkey
OK, it works for me, but only with SDL_VIDEODRIVER=fbcon (aalib and directfb 
will just hang up). It's rather slow, but i can run pygame-games from the 
terminal without having X running. Note that you have to build your sdl-lib 
with fbcon support enabled.


Re: [pygame] test email

2009-01-07 Thread Luke Paireepinart
it doesn't show up on your end - you already have a copy in your
"sent", it'd be a waste of the intertubes if it bounced it back to you
too.
If you reply to someone's message and add their address, and they're
subscribed to the list, they won't get two messages either.  The
mailing list software is smart about things like that.

On Tue, Jan 6, 2009 at 9:32 PM, Jake b  wrote:
> Did the mailing list receive my email about the .Text class to manage .Font
> ?
>
> I thought it's supposed to show up on my end too, but it isn't.
>
> --
> Jake
>


Re: contribute to pygame... Some fun projects to do for pygame 1.9. was Re: [pygame] Bundling Pygame documents

2009-01-07 Thread pymike
I dig the rewriting pygame site in python part. It'd also need a new fresh
theme (that green... arg! my eyes!). Would it be written in Django? I've
been fiddling around with CherryPy (cherrypy.org), and it's quite awesome.
(See pymike.pynguins.com) If you wrote it in CherryPy, I'm pretty sure I
could help some.

Cheers!

On Tue, Jan 6, 2009 at 2:22 AM, René Dudfield  wrote:

> Hello!
>
> there's a bunch of projects to work on here for pygame 1.9.
>
> http://www.pygame.org/wiki/todo
>
>
> Email back here if you feel like working on any of these things, or
> something else for pygame 1.9 release.
>
> cu,
>
>
> - pygame.Camera - Video for windows version of
> - Remove pyobjc dependency on macosx
> - OSX Scrap clipboard
> - pygame.Camera with quicktime on macosx
> - fix up for py3k
> - fastevent as default event module
> - Keyword method signatures
> - pygame.tests and pygame.examples
> - Complete tests for all untested things.
> - pygame.midi - include portmidi bindings
> - Mark Numeric as depreciated, even more explicitly.
> - New SDL 1.2.x release.
> - pygame reloaded
>
>
>
>
> On Sun, Jan 4, 2009 at 11:12 AM, Lenard Lindstrom  wrote:
> > Hi,
> >
> > If the Pygame documents are to be included as part of the Pygame
> > installation is there any reason to continue producing document bundles?
> And
> > who is taking responsibility for modifying setup.py to add the documents
> and
> > examples? If it is not on anyone's schedule the I will have a look at it.
> >
> > Lenard
> >
> > --
> > Lenard Lindstrom
> > 
> >
> >
>



-- 
- pymike
"Python eggs me on."


Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread Scott Sumner
OK, I've never built SDL-Lib from source, can someone give me a hint as to
where to start with this?

Scott


On Wed, Jan 7, 2009 at 9:59 AM, evil monkey <
there-is...@evil-monkey-in-my-closet.com> wrote:

> OK, it works for me, but only with SDL_VIDEODRIVER=fbcon (aalib and
> directfb will just hang up). It's rather slow, but i can run pygame-games
> from the terminal without having X running. Note that you have to build your
> sdl-lib with fbcon support enabled.
>


Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread René Dudfield
hi,

Download the various tar.gzs... then use:

./configure --help

However... it might be best to try and use the debian packages... they
should work for you.


cu!




On Thu, Jan 8, 2009 at 6:00 AM, Scott Sumner  wrote:
> OK, I've never built SDL-Lib from source, can someone give me a hint as to
> where to start with this?
>
> Scott
>
>
> On Wed, Jan 7, 2009 at 9:59 AM, evil monkey
>  wrote:
>>
>> OK, it works for me, but only with SDL_VIDEODRIVER=fbcon (aalib and
>> directfb will just hang up). It's rather slow, but i can run pygame-games
>> from the terminal without having X running. Note that you have to build your
>> sdl-lib with fbcon support enabled.
>
>


Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread Yanom Mobis

Not sure how it's done, but you could bundle Xwindows with your program.
--- On Wed, 1/7/09, René Dudfield  wrote:

From: René Dudfield 
Subject: Re: [pygame] Pygame in Linux without X Windows
To: pygame-users@seul.org
Date: Wednesday, January 7, 2009, 4:27 PM


-Inline Attachment Follows-

hi,

Download the various tar.gzs... then use:

../configure --help

However... it might be best to try and use the debian packages... they
should work for you.


cu!




On Thu, Jan 8, 2009 at 6:00 AM, Scott Sumner  wrote:
> OK, I've never built SDL-Lib from source, can someone give me a hint as to
> where to start with this?
>
> Scott
>
>
> On Wed, Jan 7, 2009 at 9:59 AM, evil monkey
>  wrote:
>>
>> OK, it works for me, but only with SDL_VIDEODRIVER=fbcon (aalib and
>> directfb will just hang up). It's rather slow, but i can run pygame-games
>> from the terminal without having X running. Note that you have to build your
>> sdl-lib with fbcon support enabled.
>
>



  

Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread Casey Duncan

Muhahahaha!

Good one! Might be easier just o bundle Linux with it though... ;^)

-Casey

On Jan 7, 2009, at 4:21 PM, Yanom Mobis wrote:



Not sure how it's done, but you could bundle Xwindows with your  
program.

--- On Wed, 1/7/09, René Dudfield  wrote:

From: René Dudfield 
Subject: Re: [pygame] Pygame in Linux without X Windows
To: pygame-users@seul.org
Date: Wednesday, January 7, 2009, 4:27 PM


-Inline Attachment Follows-

hi,

Download the various tar.gzs... then use:

./configure --help

However... it might be best to try and use the debian packages... they
should work for you.


cu!




On Thu, Jan 8, 2009 at 6:00 AM, Scott Sumner > wrote:
> OK, I've never built SDL-Lib from source, can someone give me a  
hint as to

> where to start with this?
>
> Scott
>
>
> On Wed, Jan 7, 2009 at 9:59 AM, evil monkey
>  wrote:
>>
>> OK, it works for me, but only with SDL_VIDEODRIVER=fbcon (aalib and
>> directfb will just hang up). It's rather slow, but i can run  
pygame-games
>> from the terminal without having X running. Note that you have to  
build your

>> sdl-lib with fbcon support enabled.
>
>





Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread James Paige
Not sure how it's done, but you could attach an AtlasV  rocket booster 
to your bicycle. ;)

---
James

On Wed, Jan 07, 2009 at 03:21:19PM -0800, Yanom Mobis wrote:
>Not sure how it's done, but you could bundle Xwindows with your program.   
>--- On Wed, 1/7/09, Rene Dudfield  wrote:
>   
>  From: Rene Dudfield
>  Subject: Re: [pygame] Pygame in Linux without X Windows  
>  To: pygame-users@seul.org
>  Date: Wednesday, January 7, 2009, 4:27 PM
>   
>  -Inline Attachment Follows-  
>   
>  hi,  
>   
>  Download the various tar.gzs... then use:
>   
>  ./configure --help   
>   
>  However... it might be best to try and use the debian packages... they   
>  should work for you. 
>   
>  cu!  
>   
>  On Thu, Jan 8, 2009 at 6:00 AM, Scott Sumner  
>  wrote:   
>  > OK, I've never built SDL-Lib from source, can someone give me a hint   
>  as to
>  > where to start with this?  
>  >
>  > Scott  
>  >
>  >
>  > On Wed, Jan 7, 2009 at 9:59 AM, evil monkey
>  >  wrote:  
>  >>   
>  >> OK, it works for me, but only with SDL_VIDEODRIVER=fbcon (aalib and   
>  >> directfb will just hang up). It's rather slow, but i can run  
>  pygame-games 
>  >> from the terminal without having X running. Note that you have to 
>  build your   
>  >> sdl-lib with fbcon support enabled.   
>  >
>  >


Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread James Mills
On Thu, Jan 8, 2009 at 9:21 AM, Yanom Mobis  wrote:
>
> Not sure how it's done, but you could bundle Xwindows with your program.
No. This is _not_ a good idea!

cheers
James


Re: [pygame] Text() class, a pygame.font.Font() helper classes

2009-01-07 Thread René Dudfield
yeah, for sure.  Including titles for project pages is on the todo list.

cu,

On Wed, Jan 7, 2009 at 5:48 PM, Jake b  wrote:
> thanks, will have to check those projects out.
>
> side note; is it possible to modify the pygame.org site to show unique page
> titles? ( couldn't find web admin email, and, I saw website updates here, so
> thought it might be appropriate.  )
>


Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread Ian Mallett
On Wed, Jan 7, 2009 at 3:34 PM, James Paige  wrote:

> Not sure how it's done, but you could attach an AtlasV  rocket booster
> to your bicycle. ;)

Which, taken literally, is an idea worthy of recognition in the great "hall
of pragmatism".
Sorry.
Ian


Re: [pygame] Working on Retro 80s Game SDK, Looking for general support

2009-01-07 Thread Jake b
On Wed, Jan 7, 2009 at 2:00 AM, Patrick Mullen  wrote:

> On Tue, Jan 6, 2009 at 10:59 PM, Jake b  wrote:
> through, I use the "assert" statement to make sure that the frame counter
> is no
> longer progressing.  Later, if I change some of the animation code
> somewhere that
> might mess up the play_3_times behavior, when i run the tests that
> test will error,
> and I'll know I broke something.
>

Do you use the assert statement, or do you have a function like this?

def _assert(exp, msg=""):
"""An assert() function.
source: http://www.gamedev.net/community/forums/topic.asp?topic_id=496793""";
if __debug__ and not exp:
import pdb
print "\n_assert failed:\n\t%s\n" % msg # or: simple: print "_assert failed:
", msg
pdb.set_trace()

-- 
Jake


Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread Yanom Mobis
why not?


--- On Wed, 1/7/09, James Mills  wrote:

From: James Mills 
Subject: Re: [pygame] Pygame in Linux without X Windows
To: pygame-users@seul.org
Date: Wednesday, January 7, 2009, 5:38 PM


-Inline Attachment Follows-

On Thu, Jan 8, 2009 at 9:21 AM, Yanom Mobis  wrote:
>
> Not sure how it's done, but you could bundle Xwindows with your program.
No. This is _not_ a good idea!

cheers
James



  

Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread Yanom Mobis
it would be more like attaching your bike to the rocket. Have you seen the size 
of those things? :)

--- On Wed, 1/7/09, James Paige  wrote:

From: James Paige 
Subject: Re: [pygame] Pygame in Linux without X Windows
To: pygame-users@seul.org
Date: Wednesday, January 7, 2009, 5:34 PM


-Inline Attachment Follows-

Not sure how it's done, but you could attach an AtlasV  rocket booster 
to your bicycle. ;)

---
James

On Wed, Jan 07, 2009 at 03:21:19PM -0800, Yanom Mobis wrote:
>    Not sure how it's done, but you could bundle Xwindows with your program.   
>    --- On Wed, 1/7/09, Rene Dudfield  wrote:                
>                                                                               
>      From: Rene Dudfield                                    
>      Subject: Re: [pygame] Pygame in Linux without X Windows                  
>      To: pygame-us...@seul.org                                                
>      Date: Wednesday, January 7, 2009, 4:27 PM                                
>                                                                               
>      -Inline Attachment Follows-                                      
>                                                                               
>      hi,                                                                      
>                                                                               
>      Download the various tar.gzs... then use:                                
>                                                                               
>      ./configure --help                                                       
>                                                                               
>      However... it might be best to try and use the debian packages 
>they   
>      should work for you.                                                     
>                                                                               
>      cu!                                                                      
>                                                                               
>      On Thu, Jan 8, 2009 at 6:00 AM, Scott Sumner  
>      wrote:                                                                   
>      > OK, I've never built SDL-Lib from source, can someone give me a hint   
>      as to                                                                    
>      > where to start with this?                                              
>      >                                                                        
>      > Scott                                                                  
>      >                                                                        
>      >                                                                        
>      > On Wed, Jan 7, 2009 at 9:59 AM, evil monkey                            
>      >  wrote:                      
>      >>                                                                       
>      >> OK, it works for me, but only with SDL_VIDEODRIVER=fbcon (aalib and   
>      >> directfb will just hang up). It's rather slow, but i can run          
>      pygame-games                                                             
>      >> from the terminal without having X running. Note that you have to     
>      build your                                                               
>      >> sdl-lib with fbcon support enabled.                                   
>      >                                                                        
>      >                                                                        



  

Re: [pygame] Pygame in Linux without X Windows

2009-01-07 Thread James Mills
On Thu, Jan 8, 2009 at 10:41 AM, Yanom Mobis  wrote:
> why not?

Don't waste my time :)


[pygame] Rocket + Bike = Physics

2009-01-07 Thread Ian Mallett
Hello,

A little bit ago a idea of attaching a rocket to bike came up (Thank you JP)
The pygame community is a fun-loving group, so in the interest of fun, let's
talk about the implications of it in a TOTALLY off-topic thread.  :D  I
encourage responses, as I think they will be to the amusement of all
concerned.

I'll start.
Yanom points out that the size of these things is pretty big and hence a
rocket bike would really be "more like attaching your bike to the rocket."
Because of the bike part, I'm assuming all propulsion is lateral.  Let's
likewise assume that a) the rocket can support *itself *horizontally this
way, and b) the bike can hold the whole thing up as well on it's small two
wheels.  We're not working against gravity here, so acceleration is going to
be considerably higher.  The Atlas V, the rocket mentioned, masses
546,700kg.  A bike masses < about 20kg.  The total mass of the apparatus =
546,720kg.  The first stage of the rocket exerts 4,152,000N of force over a
253 second burn time.  Let's assume friction is negligible--(and duh, we're
going to ignite it).

F = MA says that we'll accelerate at approximately 0.77 G (darn was hoping
for something more) But:
After 253 seconds, we'll be traveling at about 1.9 kilometers/second = 5.6
mach, or fast enough to cross the continental US in about 35 minutes.

BUT...the fuel burned lightens the payload (more specifically, "thrown" out
the back, thereby pushing the rocket forward (Newton's Third Law)) so we
actually go *faster*.
This kicks us up to over 2.7 km/second = 8 mach, or fast enough to cross the
continental US is about 24 minutes.
At the highest acceleration, we get a more severe, but certainly tolerable
1.6 Gs.
See attachment for the program I used to derive this.  I didn't bother to do
calculus--a second by second approximation is good enough.

I actually thought of putting four rockets on this guy so it's balanced--a
bike with a rocket on one side would be lopsided, duh.  Again, for all you
practical people, shut up :-)  Turns out though that the acceleration
remains nearly the same, which I should have known if I'd thought about it.
Oh well.

Now, how fast are the bike wheels spinning?  At 2.7 km/second, and a wheel
diameter of 559mm (this is a mountain bike) each wheel will spin at 165,540
RPM, which would probably cause a violation of the wheel's structural
integrity and a catastrophic failure, i.e., the wheel would explode.

All this is interesting, but boring, if you know what I mean--so let's
calculate what happens when our contraption (let's use the four rocket
variety) crashes headlong into an invincible wall traveling at 2.7
km/second.  The total mass just before impact is approximately 1,053,841kg,
and it's traveling at a good 2.708km/sec.  This means that at impact, we
have a kinetic energy of 3,864,047,133,512j or about 3.8 terajoules.  Now
we're getting somewhere fun!  This collision is comparable in scale to a
small atomic bomb.  Now, as far as acceleration goes, a bike is pretty
short, say 2.5m.  When you sit on it, you're probably not longer than 1m
yourself, meaning you'll come to a full stop in about 0.369 milliseconds,
equaling a brain-splattering 748,852Gs, which would *very *probably kill
you.  Moral: don't ride bikes with big rockets into immovable objects.

Which is not to say it isn't done--at least attaching rockets to bikes.
Actually, the smaller rockets probably work better for pure acceleration.
This video  uses several small
rockets and accelerates to 163 m/s in about 5 seconds.  French people on
rocket bikes  is always fun.
Then there's completely random stuff getting shoved by rockets, like
buses(rocket
only helps here),
skateboards , small
cars  and real
cars.  This German rocket
caris a
fizzle.  An unmanned
rocket car  is
launched peculiarly here.  Water rocket
carsstill
go fast, and for our grand finale, in '76 someone tried to jump
the St. Lawrence River with a rocket powered Lincoln
Continental(skip to 2:55),
which pretty much disintegrated in midair.

Ian
#Atlas V Rocket + Bike = Rocket Bike
Thrust = 4152000.0

BikeMass = 20
PersonMass = 64.9 #This is my actual mass, by the way.  Substitute yours as you see fit.
DuctTapeMass = 1 #We gotta hold this thing on, right?
BodyMass = 262250
FuelMass = 284450.0

Time = 253.0

Speed = 0.0

MassLoss = FuelMass/Time

for second in xrange(int(Time)):
#F = MA (Newton's Second Law)
#Thrust = Mass*A (Mass changes based on time).
TotalMass = BikeMass + PersonMass + DuctTapeMass

Re: [pygame] Rocket + Bike = Physics

2009-01-07 Thread René Dudfield
Would you need rockets pointing left and right too?  Then your rocket
bike can go around corners at rocket speed too.

Fuck tron... rocket bikes for the win!



On Thu, Jan 8, 2009 at 2:53 PM, Ian Mallett  wrote:
> Hello,
>
> A little bit ago a idea of attaching a rocket to bike came up (Thank you JP)
> The pygame community is a fun-loving group, so in the interest of fun, let's
> talk about the implications of it in a TOTALLY off-topic thread.  :D  I
> encourage responses, as I think they will be to the amusement of all
> concerned.
>
> I'll start.
> Yanom points out that the size of these things is pretty big and hence a
> rocket bike would really be "more like attaching your bike to the rocket."
> Because of the bike part, I'm assuming all propulsion is lateral.  Let's
> likewise assume that a) the rocket can support itself horizontally this way,
> and b) the bike can hold the whole thing up as well on it's small two
> wheels.  We're not working against gravity here, so acceleration is going to
> be considerably higher.  The Atlas V, the rocket mentioned, masses
> 546,700kg.  A bike masses < about 20kg.  The total mass of the apparatus =
> 546,720kg.  The first stage of the rocket exerts 4,152,000N of force over a
> 253 second burn time.  Let's assume friction is negligible--(and duh, we're
> going to ignite it).
>
> F = MA says that we'll accelerate at approximately 0.77 G (darn was hoping
> for something more) But:
> After 253 seconds, we'll be traveling at about 1.9 kilometers/second = 5.6
> mach, or fast enough to cross the continental US in about 35 minutes.
>
> BUT...the fuel burned lightens the payload (more specifically, "thrown" out
> the back, thereby pushing the rocket forward (Newton's Third Law)) so we
> actually go faster.
> This kicks us up to over 2.7 km/second = 8 mach, or fast enough to cross the
> continental US is about 24 minutes.
> At the highest acceleration, we get a more severe, but certainly tolerable
> 1.6 Gs.
> See attachment for the program I used to derive this.  I didn't bother to do
> calculus--a second by second approximation is good enough.
>
> I actually thought of putting four rockets on this guy so it's balanced--a
> bike with a rocket on one side would be lopsided, duh.  Again, for all you
> practical people, shut up :-)  Turns out though that the acceleration
> remains nearly the same, which I should have known if I'd thought about it.
> Oh well.
>
> Now, how fast are the bike wheels spinning?  At 2.7 km/second, and a wheel
> diameter of 559mm (this is a mountain bike) each wheel will spin at 165,540
> RPM, which would probably cause a violation of the wheel's structural
> integrity and a catastrophic failure, i.e., the wheel would explode.
>
> All this is interesting, but boring, if you know what I mean--so let's
> calculate what happens when our contraption (let's use the four rocket
> variety) crashes headlong into an invincible wall traveling at 2.7
> km/second.  The total mass just before impact is approximately 1,053,841kg,
> and it's traveling at a good 2.708km/sec.  This means that at impact, we
> have a kinetic energy of 3,864,047,133,512j or about 3.8 terajoules.  Now
> we're getting somewhere fun!  This collision is comparable in scale to a
> small atomic bomb.  Now, as far as acceleration goes, a bike is pretty
> short, say 2.5m.  When you sit on it, you're probably not longer than 1m
> yourself, meaning you'll come to a full stop in about 0.369 milliseconds,
> equaling a brain-splattering 748,852Gs, which would very probably kill you.
> Moral: don't ride bikes with big rockets into immovable objects.
>
> Which is not to say it isn't done--at least attaching rockets to bikes.
> Actually, the smaller rockets probably work better for pure acceleration.
> This video uses several small rockets and accelerates to 163 m/s in about 5
> seconds.  French people on rocket bikes is always fun.  Then there's
> completely random stuff getting shoved by rockets, like buses (rocket only
> helps here), skateboards, small cars and real cars.  This German rocket car
> is a fizzle.  An unmanned rocket car is launched peculiarly here.  Water
> rocket cars still go fast, and for our grand finale, in '76 someone tried to
> jump the St. Lawrence River with a rocket powered Lincoln Continental (skip
> to 2:55), which pretty much disintegrated in midair.
>
> Ian
>


Re: [pygame] Rocket + Bike = Physics

2009-01-07 Thread Nirav Patel
I'm picturing a bicycle duct taped to the side of a Saturn V here...

This also reminds me of the Top Gear where they convert a Reliant into
a Space Shuttle. http://www.youtube.com/watch?v=_b4WzWFKQ20

Nirav

On Wed, Jan 7, 2009 at 10:58 PM, René Dudfield  wrote:
> Would you need rockets pointing left and right too?  Then your rocket
> bike can go around corners at rocket speed too.
>
> Fuck tron... rocket bikes for the win!
>
>
>
> On Thu, Jan 8, 2009 at 2:53 PM, Ian Mallett  wrote:
>> Hello,
>>
>> A little bit ago a idea of attaching a rocket to bike came up (Thank you JP)
>> The pygame community is a fun-loving group, so in the interest of fun, let's
>> talk about the implications of it in a TOTALLY off-topic thread.  :D  I
>> encourage responses, as I think they will be to the amusement of all
>> concerned.
>>
>> I'll start.
>> Yanom points out that the size of these things is pretty big and hence a
>> rocket bike would really be "more like attaching your bike to the rocket."
>> Because of the bike part, I'm assuming all propulsion is lateral.  Let's
>> likewise assume that a) the rocket can support itself horizontally this way,
>> and b) the bike can hold the whole thing up as well on it's small two
>> wheels.  We're not working against gravity here, so acceleration is going to
>> be considerably higher.  The Atlas V, the rocket mentioned, masses
>> 546,700kg.  A bike masses < about 20kg.  The total mass of the apparatus =
>> 546,720kg.  The first stage of the rocket exerts 4,152,000N of force over a
>> 253 second burn time.  Let's assume friction is negligible--(and duh, we're
>> going to ignite it).
>>
>> F = MA says that we'll accelerate at approximately 0.77 G (darn was hoping
>> for something more) But:
>> After 253 seconds, we'll be traveling at about 1.9 kilometers/second = 5.6
>> mach, or fast enough to cross the continental US in about 35 minutes.
>>
>> BUT...the fuel burned lightens the payload (more specifically, "thrown" out
>> the back, thereby pushing the rocket forward (Newton's Third Law)) so we
>> actually go faster.
>> This kicks us up to over 2.7 km/second = 8 mach, or fast enough to cross the
>> continental US is about 24 minutes.
>> At the highest acceleration, we get a more severe, but certainly tolerable
>> 1.6 Gs.
>> See attachment for the program I used to derive this.  I didn't bother to do
>> calculus--a second by second approximation is good enough.
>>
>> I actually thought of putting four rockets on this guy so it's balanced--a
>> bike with a rocket on one side would be lopsided, duh.  Again, for all you
>> practical people, shut up :-)  Turns out though that the acceleration
>> remains nearly the same, which I should have known if I'd thought about it.
>> Oh well.
>>
>> Now, how fast are the bike wheels spinning?  At 2.7 km/second, and a wheel
>> diameter of 559mm (this is a mountain bike) each wheel will spin at 165,540
>> RPM, which would probably cause a violation of the wheel's structural
>> integrity and a catastrophic failure, i.e., the wheel would explode.
>>
>> All this is interesting, but boring, if you know what I mean--so let's
>> calculate what happens when our contraption (let's use the four rocket
>> variety) crashes headlong into an invincible wall traveling at 2.7
>> km/second.  The total mass just before impact is approximately 1,053,841kg,
>> and it's traveling at a good 2.708km/sec.  This means that at impact, we
>> have a kinetic energy of 3,864,047,133,512j or about 3.8 terajoules.  Now
>> we're getting somewhere fun!  This collision is comparable in scale to a
>> small atomic bomb.  Now, as far as acceleration goes, a bike is pretty
>> short, say 2.5m.  When you sit on it, you're probably not longer than 1m
>> yourself, meaning you'll come to a full stop in about 0.369 milliseconds,
>> equaling a brain-splattering 748,852Gs, which would very probably kill you.
>> Moral: don't ride bikes with big rockets into immovable objects.
>>
>> Which is not to say it isn't done--at least attaching rockets to bikes.
>> Actually, the smaller rockets probably work better for pure acceleration.
>> This video uses several small rockets and accelerates to 163 m/s in about 5
>> seconds.  French people on rocket bikes is always fun.  Then there's
>> completely random stuff getting shoved by rockets, like buses (rocket only
>> helps here), skateboards, small cars and real cars.  This German rocket car
>> is a fizzle.  An unmanned rocket car is launched peculiarly here.  Water
>> rocket cars still go fast, and for our grand finale, in '76 someone tried to
>> jump the St. Lawrence River with a rocket powered Lincoln Continental (skip
>> to 2:55), which pretty much disintegrated in midair.
>>
>> Ian
>>
>


Re: [pygame] Rocket + Bike = Physics

2009-01-07 Thread Jake b
I was expecting a game prototype :(

Oh, did you play rocketjocky? ( No bike, you ride a rocket like a very, fast
bike ]

-- 
Jake


Re: [pygame] Rocket + Bike = Physics

2009-01-07 Thread Jake b
On Wed, Jan 7, 2009 at 9:58 PM, René Dudfield  wrote:

> Would you need rockets pointing left and right too?  Then your rocket
> bike can go around corners at rocket speed too.

In rocket jockey you had cables that would shoot out left or right ( or both
), attach to poles(or even other jockies) to spin, and detach at will.

Me thinks little rockets on front wold would make you rotate, but you'd be
mostly going foreward. ( depending on their angle and force)
-- 
Jake


Re: [pygame] Rocket + Bike = Physics

2009-01-07 Thread Ian Mallett
"This also reminds me of the Top Gear where they convert a Reliant into
a Space Shuttle. http://www.youtube.com/watch?v=_b4WzWFKQ20";

This is amazing.

On Wed, Jan 7, 2009 at 8:14 PM, Jake b  wrote:

> I was expecting a game prototype :(

I might make one sometime :)

> Oh, did you play rocketjocky?

Nope.

Ian


[pygame] Lepton particle engine 0.8a released

2009-01-07 Thread Casey Duncan
I'm pleased to announce the 0.8 alpha release of Lepton, a high- 
performance, pluggable particle engine and API for Python. It is  
designed for creating graphical special effects for games or other  
visual applications. The engine is designed to be very flexible and  
does not rely on any other libraries directly. You can use it either  
with OpenGL (via pyglet, PyOpenGL, wxPython, etc), or with pygame by  
selecting the appropriate renderer. Examples are provided using pyglet  
and pygame. Although this is an alpha release, I think it is stable  
enough to use, and I encourage you to give it a try.


The project page is here:

http://code.google.com/p/py-lepton/

You can also get it via pypi here:

http://pypi.python.org/pypi/lepton/

This release contains no new major functionality, but it has some  
important bug fixes and performance optimizations. I thought I would  
release these enhancements now rather than delay them by unrelated  
feature work.


Changes in 0.8a include:

- Fixed accuracy of bounce controller so that particles are much less  
likely
  to escape from a container domain. (Thanks to dugres for reporting  
the bug)
- Fixed bug in Sphere.intersect() where it would return bogus vectors  
such
  as (nan,nan,nan) for stationary particles in some instances. This  
allowed
  an improvement to the bouncy example to further prevent errant  
particles.

- Collector controller ported to C
- Bounce controller ported to C
- Add 2D splode example to demonstrate how to use lepton with the  
default

  pyglet OpenGL projection.
- Allow basic attribute access for the C controllers from Python
  (More work is needed here for more complex attributes, like vectors)

If you have questions or comments or would like to contribute, you can  
join the google group at:


http://groups.google.com/group/py-lepton-users

Enjoy.

-Casey


Re: [pygame] Lepton particle engine 0.8a released

2009-01-07 Thread Clinton Lee Taylor
Semi Off Topic, but related, could this not be used to give funky effects to
one of the many Linux Windows Managers?

2009/1/8 Casey Duncan 

> I'm pleased to announce the 0.8 alpha release of Lepton, a
> high-performance, pluggable particle engine and API for Python. It is
> designed for creating graphical special effects for games or other visual
> applications. The engine is designed to be very flexible and does not rely
> on any other libraries directly. You can use it either with OpenGL (via
> pyglet, PyOpenGL, wxPython, etc), or with pygame by selecting the
> appropriate renderer. Examples are provided using pyglet and pygame.
> Although this is an alpha release, I think it is stable enough to use, and I
> encourage you to give it a try.


Mailed
LeeT


Re: [pygame] Lepton particle engine 0.8a released

2009-01-07 Thread Casey Duncan
Probably possible, but it would likely require coding a new renderer  
that draws via the X windows api. If someone coded something like that  
up, I'd gladly include it.


-Casey

On Jan 7, 2009, at 10:23 PM, Clinton Lee Taylor wrote:

Semi Off Topic, but related, could this not be used to give funky  
effects to one of the many Linux Windows Managers?


2009/1/8 Casey Duncan 
I'm pleased to announce the 0.8 alpha release of Lepton, a high- 
performance, pluggable particle engine and API for Python. It is  
designed for creating graphical special effects for games or other  
visual applications. The engine is designed to be very flexible and  
does not rely on any other libraries directly. You can use it either  
with OpenGL (via pyglet, PyOpenGL, wxPython, etc), or with pygame by  
selecting the appropriate renderer. Examples are provided using  
pyglet and pygame. Although this is an alpha release, I think it is  
stable enough to use, and I encourage you to give it a try.


Mailed
LeeT