Hi if you happen to know python please feel free to post a snippet of your code and let me know something interesting about it.
here's mine:
import pygame,sys
from pygame.locals import *
pygame.init()
FPS = 150
fpsClock = pygame.time.Clock()
green=(0,255,0)
red=(255,0,0)
white=(255,255,255)
yellow=(0,0,255)
step_initial_pos=1
pos=step_initial_pos
screeendisplay = pygame.display.set_mode((800,600),0,32)
pygame.display.set_caption("Yakshy's Adventure")
#screeendisplay.fill(white)
def rectstays():
pygame.draw.rect(screeendisplay,red,(30, 500, 40, 80))
#green polka dots for illusiom of motion
def step1(pos):
if pos<800:
x=30
xx=1
x=x+pos*xx
y=100
x1=20
y1=25
pygame.draw.circle(screeendisplay,green,(x, y), 5)
x+=x1
y+=y1
pygame.draw.circle(screeendisplay,green,(x,y), 5)
x-=x1
y+=y1
pygame.draw.circle(screeendisplay,green,(x,y), 5)
x+=x1
y+=y1
pygame.draw.circle(screeendisplay,green,(x,y), 5)
x-=x1
y+=y1
pygame.draw.circle(screeendisplay,green,(x,y), 5)
x+=2*x1
y-=2*y1
pygame.draw.circle(screeendisplay,green,(x,y), 5)
pos+=1
rectstays()
return(pos)
else:
pos=1
rectstays()
return(pos)
def step2(pos):
screeendisplay.fill(white)
step1(pos)
rectstays()
step=1
while True:
pos=step1(pos)
step2(pos)
for event in pygame.event.get():
if event.type==QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
fpsClock.tick(FPS)
the code renders a flock of six birds flying and red painted building with no doors.
here's mine:
import pygame,sys
from pygame.locals import *
pygame.init()
FPS = 150
fpsClock = pygame.time.Clock()
green=(0,255,0)
red=(255,0,0)
white=(255,255,255)
yellow=(0,0,255)
step_initial_pos=1
pos=step_initial_pos
screeendisplay = pygame.display.set_mode((800,600),0,32)
pygame.display.set_caption("Yakshy's Adventure")
#screeendisplay.fill(white)
def rectstays():
pygame.draw.rect(screeendisplay,red,(30, 500, 40, 80))
#green polka dots for illusiom of motion
def step1(pos):
if pos<800:
x=30
xx=1
x=x+pos*xx
y=100
x1=20
y1=25
pygame.draw.circle(screeendisplay,green,(x, y), 5)
x+=x1
y+=y1
pygame.draw.circle(screeendisplay,green,(x,y), 5)
x-=x1
y+=y1
pygame.draw.circle(screeendisplay,green,(x,y), 5)
x+=x1
y+=y1
pygame.draw.circle(screeendisplay,green,(x,y), 5)
x-=x1
y+=y1
pygame.draw.circle(screeendisplay,green,(x,y), 5)
x+=2*x1
y-=2*y1
pygame.draw.circle(screeendisplay,green,(x,y), 5)
pos+=1
rectstays()
return(pos)
else:
pos=1
rectstays()
return(pos)
def step2(pos):
screeendisplay.fill(white)
step1(pos)
rectstays()
step=1
while True:
pos=step1(pos)
step2(pos)
for event in pygame.event.get():
if event.type==QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
fpsClock.tick(FPS)
the code renders a flock of six birds flying and red painted building with no doors.