2008-09-14 Star generator

Python scripth with generating picture of points from bmp image. Colors in bmp image is like koeficent map with allow generate more random points in any place of image you want. There shown source image from what where generated points on black image.
Download
2008-09-07 Simple Fractals
Here is some Fractal examples. That is my first fractals.
Start Script
Circle Script
2009-02-12 Pygame Border Coalision
I wanted to know how many simple object can be drawn by Pygame. Red point is starting point for flying bullets. And only thing with bullets have coalision is screen border. You can shut new bullets with mouse.
Download Script
After some optimisations script works faster.
Download Script v2
Also I have implemented the same on C++.
Download Source
2009-02-14 PyGame Bullets with Boxes
You can shut your bullets and they will contact with difrent boxes with diffrent result there is boxes that speed up, freeze, slow down bullets.
Download
2009-03-18 PyGame Post
Wanted to know how will looks when mousepointer moving and all arrows shows it direction
Download
2009-04-13 Map Editor
This is simple map editor for small games. Also I think it will be useful for other people who started writing game and made first test maps.
Download
2009-04-15 PyGame Rotating Flower
Flower where all list rotating around lists.
SDownload
2009-05-07 PyGame Attractors
I have found old article about attractors that is resoult what I have done with playing with attractor values. Attractor formula is very simple but result is interesting.
2009-06-02 Voronoi distance
I where interested to see how looks visualy distance to the closest point. When I saw result i remembered that it is Voronoi diagramm.
Download
2009-08-23 Python PyGame Tutorial
Python Pygame tutorial. This tutorial goal show how to make small and simple pygame pythone script that include all that is need for bigger application. Every tutorial part add only few new lines of code.
Moving Boxes
Goal
Make featured applications with boxes that coaliding one with another.
1. [Set Display]
2. [Event Sytem]
3. [Image loading]
4. [Box object]
5. [Box move]
6. [Boxes move]
7. [Randomnes]
8. [Fullscreen]
2009-09-15 Python Pygame Tutorial Box Move
added constants that helps controlling screen size
SCREEN_X = 500 SCREEN_Y = 500 BOX_SIZE = 20 BOX_SPEED = 1box have speed by axis
self.dx = BOX_SPEED self.dy = BOX_SPEEdetecting if given rect is inside screen borders or not if not then change it direction
def move( self ): if self.rect.left+BOX_SIZE > SCREEN_X: self.dx = -BOX_SPEED if self.rect.left < 0: self.dx = BOX_SPEED if self.rect.top+BOX_SIZE > SCREEN_Y: self.dy = -BOX_SPEED if self.rect.top < 0: self.dy = BOX_SPEED self.rect.left += self.dx self.rect.top += self.dyafter few line of code where added box move inside given screen and coalide with screen borders
Tutorial Source
2009-09-23 PyGame Lorenz attractor
Here is Lorenz attractor whery popular attractor i have used basic coloring tehnique.
Script
PovRay source
2009-09-23 Python Pygame Tutorial Boxes Move
New class boxes handles many boxes. Number of boxes depends on cpnstant MAX_BOXES.
MAX_BOXES = 100and all class Boxes methods is the same only diference is that it handles many boxes.
Tutorial Source
2009-09-23 Python Pygame Tutorial Randomnes
All boxes moving with same speed in same directions and all boxes have same size and color
Make changes step by step to see result
self.dx = randint(1,BOX_SPEED) self.dy = randint(1,BOX_SPEED)and boxes now moving all seperatly at diferent directions.
self.boxes.append( Box( i*2 , i*2 , randint(BOX_MIN_SIZE,BOX_MAX_SIZE) , (i,0,0) )now boxes have diferent sizes
Tutorial source
2009-11-12 Python PyGame Tutorial Fullscreen
fullscreen = Falseif event.type == pygame.KEYDOWN:
if event.key == pygame.K_m: if not fullscreen: screen = pygame.display.set_mode( (SCREEN_X,SCREEN_Y) , pygame.FULLSCREEN ) fullscreen = True else: screen = pygame.display.set_mode( (SCREEN_X,SCREEN_Y) ) fullscreen = False