![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 | |
|
Professional Programmer
|
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:
__________________
% 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;} |
|
|
|
|
|
|
#12 |
|
Programming Guru
![]() ![]() |
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.
|
|
|
|
|
|
#13 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
If I recall right, Surface.blit is far faster than pygame.draw.circle. Does your new snow program use blit extensively?
|
|
|
|
|
|
#14 |
|
Programming Guru
![]() ![]() |
I believe it created a surface per snowflake. And blits those surfaces, instead of individually loading and drawing circles.
|
|
|
|
|
|
#15 |
|
Hobbyist Programmer
|
Program looks great!
__________________
When will Jesus bring the porkchops? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|