Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 28th, 2005, 2:16 PM   #11
iignotus
Professional Programmer
 
iignotus's Avatar
 
Join Date: Apr 2005
Location: Nowhere Special
Posts: 466
Rep Power: 4 iignotus is on a distinguished road
Send a message via AIM to iignotus
Looks very good, Sane. It seems like it's a little slow, but I'm sure that's my machine. I also think it would be a great effect to have the snow pile up at the bottom.

You're making me very interested in pygame Good work.
Quote:
When i tried to run the module, it said "error, need module." i dont know if thats my problem? or an error in your code.
It works fine on my machine, I believe the problem is that you are missing PyGame. http://pygame.org/
__________________
% rc4 hexkey < input > output
#define S ,t=s[i],s[i]=s[j],s[j]=t /* rc4 hexkey <file */
unsigned char k[256],s[256],i,j,t;main(c,v,e)char**v;{++v;while(++i)s[ 
i]=i;for(c=0;*(*v)++;k[c++]=e)sscanf((*v)++-1,"%2x",&e);while(j+=s[i]
+k[i%c]S,++i);for(j=0;c=~getchar();putchar(~c^s[t+=s[i]]))j+=s[++i]S;}
iignotus is offline   Reply With Quote
Old Oct 28th, 2005, 5:51 PM   #12
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,079
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
The code is slow because it's poorly written with little knowledge of Python. I recently wrote a newer one that's much smoother. But when I'm bored I'm going to redo it using triginometry to make the snow follow in an arc shape as it floats to the ground.
Sane is offline   Reply With Quote
Old Oct 28th, 2005, 6:56 PM   #13
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
If I recall right, Surface.blit is far faster than pygame.draw.circle. Does your new snow program use blit extensively?
Arevos is offline   Reply With Quote
Old Oct 28th, 2005, 6:57 PM   #14
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,079
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
I believe it created a surface per snowflake. And blits those surfaces, instead of individually loading and drawing circles.
Sane is offline   Reply With Quote
Old Oct 29th, 2005, 12:35 AM   #15
Nebula
Hobbyist Programmer
 
Nebula's Avatar
 
Join Date: Oct 2005
Posts: 203
Rep Power: 4 Nebula is on a distinguished road
Send a message via AIM to Nebula
Program looks great!
__________________
When will Jesus bring the porkchops?
Nebula is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:04 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC