pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
simpleParticle01

simpleParticle01 - 1.0

Eric Pavey (akeric)

Tags:

Description

I wrote this in couple afternoons. Hadn’t done any projects like this in a while, but this was a simple task I wanted to tackle: Draw particles with the mouse, when close generate an interaction, and when the interaction occurs trigger an event. In a nutshell, that’s what this does:

  • LMB draws red, unfilled particles that slowly fall down the screen.
  • When they get close together, a latticework of lines will draw between them:
  • The more lines that connect them, the more opaque they get.
  • When the lines are created, a ‘burst’ of smaller white particles will emit from the larger red particle that spawned the line.

The app was mainly just written for leisure, it’s not that speedy. But was a nice relaxing thing to do over the weekend. If you grab just the source, you'll also need a fixed-up version of the Pygame vec2d lib, which you can download from my site here:

Links

Home Page: http://www.akeric.com/blog/?page_id=1096
Source: http://www.akeric.com/python/simpleParticle01/simpleParticle01.py
Windows: http://www.akeric.com/python/simpleParticle01/simpleParticle01.zip

Screenshot


click to view original size

Releases

simpleParticle01 - 1.0 - Jun 21, 2010

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

July 4, 2010 2:34am - Eric Pavey - nickname: (akeric)
I didn't feel like in-lining the whole vec2d module in my module, but if you go to the home page link, I give you a direct download link to the fixedup version you can use.
AH, dependencies :) Glad you got it working.
June 23, 2010 8:33am - Xandar Kablandar - nickname: (eternalcheesecake)
This was neat to play with. I run Kubuntu, so with the single file source link, I found out that I needed to download the vec2d file from the wiki at http://pygame.org/wiki/2DVectorClass and then that the simpleParticle01.py file needed to have its Vec2d references changed to vec2d. So a little tinkering, not bad, but could be better for us who want to check out your code.

Anyway, thanks for sharing this, it was fun.
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Aug 22, 2014

Aug 21, 2014


Aug 19, 2014

Aug 18, 2014

Aug 2, 2014


Jul 28, 2014

Jul 22, 2014

Jul 21, 2014

Jul 20, 2014

Jul 19, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)