[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] blitz



> you got me snooping around the blitzbasic site looking for good
> ideas for pygame! if you know of features that are extremely useful
> in blitzbasic but difficult to do in pygame, i wouldn't mind hearing
> about that either :]

bah, i worked on this one for longer than i should have :]
made my own version of the F2KWarp demo that is showcased
on the blitzbasic site. the blitz version is a couple notches
higher in speed, but i'm not really surprised looking at the
language, it's designed for small games and pretty much only small
games. looking at the language though, python is a landslide nicer.
i'm curious to look at the blitz code for one of the more full games,
i'm afraid.


blitz warper: mainloop (mercy, the pain! 4 instructions on a line?)
-------------------------------------------------------
Repeat
f=0:w=w+10:If w=360 Then w=0
For y=0 To 599 Step 15
For x = 0 To 799 Step 20
f=f+1:If f=1600 Then f=0
DrawBlock pic,(x+(Sin(w+x)*40))/1.7+80,(y+(Sin(w+y)*40))/1.7+60,f 
Next:Next:Flip:Cls
Until KeyDown(1)



pygame warper: mainloop (doh, snipped my comments out)
-------------------------------------------------------
  while not pygame.event.peek((QUIT,KEYDOWN)):
      anim += 0.6
      for x in xstep:
          for y in ystep:
              xpos = (x+(sin(anim+x*.008)*18))+20
              ypos = (y+(sin(anim+y*.008)*18))+20
              screen.blit(bitmap, (x, y), (xpos, ypos), (20, 20))
      pygame.display.flip()



i've packaged up my small demo and placed it in the public
pygame ftp directory. (that means you can drop stuff there too)
http://pygame.seul.org/ftp/contrib/liquid.zip




(tomorrow, fix the news html and find the missing surface docs!)


____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org