"How did they..." "get here first?": first playable upload

As I said I just uploaded my first playable.  All it is is my little stickman sliding about a rather simple and short level, but I felt like putting something up, since it works except that jumping up into blocks slides you right, no matter what... could use some ideas here.

It has come to my attention that this does not work on a mac, it reads one of the data values as -1, instead of whatever it should be.  I also noticed that I forgot some os.path calls, so windows users will need to change those.  

I'll start work on sprites in the meantime.

(log in to comment)


not able to run on my mac:

Traceback (most recent call last):
  File "run_game.py", line 22, in <module>
  File "run_game.py", line 16, in main
    game = src.Game(screen)
  File "/Users/leif/Downloads/proj/src/game.py", line 11, in __init__
    self.level = level.Level("res/lev/test.level")
  File "/Users/leif/Downloads/proj/src/level.py", line 19, in __init__
    self.tempdata = [[entity.Block(dict(self.conf.items(str(x)))) for x in y] for y in self.array]
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 634, in items
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: '-1'
...hmmm I'm not able to get on a mac right now... Looks like it's misinterpreting the color values... great.  I also see that I need to add a few os.path calls in places.  I'll put a warning on it in just a second, but I can't really spend time trying to fix that atm...
It works great here (Linux, Python 2.7).
@ reidrac That's what I'm developing on, so it should work there, and windows only need to be careful about filenames as far as I know, but how it's getting -1 as one of the values... I'm not sure.  that's a surfarray.array2d that I'm using, so it should be fine... like I edited, I'll be working on sprites.
Just tried it on my Ubuntu and it works perfectly.
The scrolling looks really nice with your background behind :)
Did you beat the collision boss? ;)
You need to interleave your calls to level.get_at and checking for collisions.

        top = self.level.get_at(newpos.centerx, newpos.top)
        if top and top.solid == "true":
            newpos.top = top.rect.bottom
        bottom = self.level.get_at(newpos.centerx, newpos.bottom)
        if bottom and bottom.solid == "true":
            newpos.bottom = bottom.rect.top
        right1 = self.level.get_at(newpos.right, newpos.centery-(self.rect.height/4))
        if right1 and right1.solid == "true":
            newpos.right = right1.rect.left
        right2 = self.level.get_at(newpos.right, newpos.centery+(self.rect.height/4))
        if right2 and right2.solid == "true":
            newpos.right = right2.rect.left
        left1 = self.level.get_at(newpos.left, newpos.centery-(self.rect.height/4))
        if left1 and left1.solid == "true":
            newpos.left = left1.rect.right
        left2 = self.level.get_at(newpos.left, newpos.centery+(self.rect.height/4))
        if left2 and left2.solid == "true":
            newpos.left = left2.rect.right

Good luck!
Wait, let me try that,  Can't believe I didn't think of that, wow, thanks for the help eggfu even if it doesn't work.
Thank you so much eggfu! That is enough to get you into the special mentions on my credits!  I'll be releasing another fixed demo here shortly, after celebrating this momentous occasion by using twitter and a new diary entry, and getting projectiles working.