pygame is

pygame.org is
The Feeble Diddle

# The Feeble Diddle - 0.06

### Description

I've basically had this program lying around for a long while and every so often had opened it up again to tweak it. I am a beginner programmer and am not all that good with game logic. So thence, this program is filled with bugs and inconsistencies.

### Screenshot

click to view original size

### Releases

 The Feeble Diddle - Rev 163 - May 20, 2009 The Feeble Diddle - Rev 162 - May 19, 2009 The Feeble Diddle - Rev 102 - Apr 18, 2009 The Feeble Diddle - Rev 52 - Apr 14, 2009 The Feeble Diddle - rev23 - Feb 22, 2009 The Feeble Diddle - rev8 - Feb 5, 2009 The Feeble Diddle - .062 - Feb 3, 2009 The Feeble Diddle - .061 - Jan 29, 2009 The Feeble Diddle - 0.06 - Jan 28, 2009

May 22, 2009 3:47pm - Thomas Downs - nickname: (tnelsond)
Feedback anyone??
April 16, 2009 7:25am - Thomas Downs - nickname: (tnelsond)
Ok not perfect, but glitchless.
April 16, 2009 7:24am - Thomas Downs - nickname: (tnelsond)
Wow! Thanks! I've been wondering how perfect collisions worked for months.
April 15, 2009 10:26pm - pymike - nickname: (pymike) - 3/5
You need to update the link to:

If you're having trouble with collisions, I have a tutorial on basic rect-rect collision response here: http://pymike.pynguins.com/?page=tutorials&id=1

The basic idea is to move/check 1 axis at a time. (e.g. move X axis, check for collisions, move Y axis, check for collisions)

I'm really liking this game, especially the art. Looking forward to seeing it finished!
April 14, 2009 9:14pm - Thomas Downs - nickname: (tnelsond)
I should probably try the loading into groups thing. Are groups different from lists?
February 19, 2009 12:53pm - Brian Song - nickname: (unlucky777)
for now my text files are lines of "x_coord y_coord item_ID"

when you want to access data from terrain, terrain[0] == x_coord, terrain[1] == y_coord and so on.

when you want to loop through the whole group just do

this should clean up your source code a bit
February 19, 2009 12:47pm - Brian Song - nickname: (unlucky777)
I'm still a bit new to pygames myself but heres some advice. Load your game objects in groups. Heres some of my source code for my game. It may not be the best method but it's fast and it's been working well for me.

#counts line in text file
terrain_loop = sum([1 for line in open("data/map1_terrains.txt")])

#loads raw terrain data into list... or was it an array? meh...
raw_map_terrains = [re.findall(r"\w+", line) for line in open("data/map1_terrains.txt")]

#Makes the group

#adds to the group line by line
for i in range(terrain_loop): terrain.add(Map_Objects(raw_map_terrains[i], screen))

it's an amazing tutorial with laods of examples
February 6, 2009 1:24pm - Thomas Downs - nickname: (tnelsond)
If anyone wants to contribute feel free to. Though it'd probably be a nightmare with how messy my code is.
February 5, 2009 7:37pm - pymike - nickname: (pymike)
February 5, 2009 7:13pm - Thomas Downs - nickname: (tnelsond)
Ok, I am using PySVN workbench and now have a googlecode page.
February 4, 2009 6:48pm - pymike - nickname: (pymike)

cd gamedir

or

svn commit -m "New version info"

BTW, your game is looking really cool. Keep working on it!
February 4, 2009 4:54pm - Thomas Downs - nickname: (tnelsond)
So for svn I need a server, I could probably make one, but it would probably only have a PIII processor, and 256 mb of ram, would that be sufficient? Or perhaps I could use the one that my mom hosts her website on? I can access it through ftp. I don't think that would work. Does svn seem like a little much? Or is this a bigger project than I thought? I guess I am going to need an svn if this program is going to have more than one developer. I am starting to learn svn, it seems pretty complicated.
February 3, 2009 11:48pm - Thomas Downs - nickname: (tnelsond)
Hey thanks, I think I'll try subversion.
February 3, 2009 9:40pm - patrick mullen - nickname: (saluk) - 3/5
Might I suggest using a version control system (svn being probably the easiest to learn) rather than copying the file over and over every time you change something. You can keep the log stuff in svn as well.
<br /><br />
Some of the phsyics and math etc are a bit weird, but I like where you are going with this. Keep at it!
February 2, 2009 8:31pm - Thomas Downs - nickname: (tnelsond)
Maybe I should use PGU for level editor and menus etc.?? I am going to get all my code working before rewriting it.
February 2, 2009 5:06pm - Thomas Downs - nickname: (tnelsond)
My code is just so messed up I might as well redo it in a different coding style.
January 30, 2009 6:47pm - Anonymous - nickname: (pywiz32)
your collision isn't very good. I am myself working on a platformer, and so far, here is my suggestion for collision:

if self.rect.right >= collision.rect.left and\
self.rect.right <= collision.rect.right and\
self.rect.left <= collision.rect.right:
if not self.on_ground:
self.rect.x = collision.rect.left-self.rect.width
self.canright = False
if self.rect.left <= collision.rect.right and\
self.rect.left >= collision.rect.left and\
self.rect.right >= collision.rect.right:
if not self.on_ground:
self.rect.x = collision.rect.right
self.canleft = False
if self.rect.bottom > collision.rect.top and\
self.rect.bottom < collision.rect.bottom and\
self._rect.bottom <= collision.rect.top:
self.y = collision.y-self.rect.height
self.curgravity = 0; self.on_ground = True
self.on = collision; self.dy = 0
if self.rect.top < collision.rect.bottom and\
self.rect.top > collision.rect.top and\
self._rect.top >= collision.rect.bottom:
self.dy = 0
self.y = collision.rect.bottom

note: self.x and self.y are the same as self.rect.x and self.rect.y, dx and dy are direction x and direction y. You just add dx and dy to x and y every frame.
January 29, 2009 4:08pm - Thomas Downs - nickname: (tnelsond)
Fixed the fps (I originally turned it down to take a screenshot), added readme.
January 29, 2009 11:26am - Ken Lauer - nickname: (kne)
Cute, but limiting the FPS to 2 is a, uh, bad idea. Try clock.tick(30) or something more reasonable.
January 28, 2009 11:47pm - Thomas Downs - nickname: (tnelsond)
Thanks, I'll upload the updates soon. Probably should do more code commenting.
January 28, 2009 11:30pm - Thomas Downs - nickname: (tnelsond)
Sorry, it's game9.py the others are older versions
January 28, 2009 11:26pm - Anonymous - nickname: (pywiz32)
Remember: it's commas between tags.

What do you open? Is it game.py? game2? 3? A readme would be helpful. Also, it tries to import gameEngine, which isn't in the package, so please include it so it can be played!

General help notes:

kill() removes sprites from all groups.
have a collision buffer. for example, if you are moving at five pixels per frame, remember to check for collision up to five pixels in.
spotlight

our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.

recent releases
Jun 25, 2016

Jun 19, 2016

Jun 17, 2016

Jun 12, 2016

Jun 3, 2016

Jun 1, 2016

May 27, 2016

May 21, 2016

May 18, 2016

... more!

for pygame related questions, comments, and suggestions, please see help (lists, irc)