This is Why I Like Bazaar
Bazaar has been a great productivity booster for me lately. It enables me to work on several concurrent major refactoring tasks, and painlessly merge between them. You can imagine what it would be like to do several merges daily with SVN or (*shudder*) CVS.
The biggest new thing I'm currently working on is the Box2D integration. I'd estimate I'm about 40% done now, and the biggest obstacle has been (once again) having enough time to code, but I hope to have the main functionality + a simple demo working next weekend or next week.
6 Comments:
Great news! I really like the style and ease of use of Opioid. How is it going with the line and circle-drawing stuff? Or is already there (patch 3)? I may have missed it.
This comment has been removed by the author.
These are two functions I wrote for circles and rects (using pygame):
def getDrawRect(size = (0,0), color=(220,220,220), bgr=None, border=1, clrkey=None):
tmpSurf = pygame.Surface(size)
tmpSurf = tmpSurf.convert_alpha()
tmpSurf.fill((0,0,0,0))
if bgr:
pygame.draw.rect(tmpSurf, bgr, [0,0,size[0],size[1]], 0)
pygame.draw.rect(tmpSurf, color, [0,0,size[0],size[1]], border)
if clrkey:
tmpSurf.set_colorkey(clrkey)
return tmpSurf
def getDrawCircle(radius, color=(220,220,220), bgr=None, border=1, clrkey=(0,0,0)):
tmpSurf = pygame.Surface((radius*2, radius*2))
tmpSurf = tmpSurf.convert_alpha()
tmpSurf.fill((0,0,0,0))
tmpPos = (radius, radius)
if bgr:
pygame.draw.circle(tmpSurf, bgr, tmpPos, radius, 0)
pygame.draw.circle(tmpSurf, color, tmpPos, radius, border)
if clrkey:
tmpSurf.set_colorkey(clrkey)
return tmpSurf
You can easily change them to use the pygame.draw.aalines, or whatever.
Pass the returned surface to a Sprite object as its 'image' attribute.
hugo: The line drawing etc. stuff is on hold currently as I'm working on the physics stuff, but I'll get back to it soon.
I am trying to get started with opioid2d. Managed to get the repo and run the .sh and install. When I try to run any of the examples, it complains that it can't find _copioid2d module. Please advise...
I am new to swig. In truth, I'm new to linux, python, and bazaar as well. But I'm excited to learn and I've been a game programmer for a decade so I'm not totally inept...
I am working on a DELL Inspiron 9100 running kubuntu
How's the box2d implementation coming, shang?
Post a Comment
<< Home