Beta version :D

Some menus, simple dissolve transitions, ambience music and sound effects. Yep, I'm almost there (although there's still too much to do, like creating bunchs of levels for example XD I really should create some quickly =D)
Well, I guess it was time to release something already. Although code is _really_ ugly and I don't think many peoples would like to take a look there (there's almost no comments, and usually I'm a comment freak), but well, it's sort of playable right now (though you can't clear levels yet xD)

Anyways, controls and gameplay instructions are on README.txt file. Make sure if you have xdrlib as well, I'm using it to package the map files (I'm lazy to write a xml parser, you know), it can be downloaded from python's SVN if you don't have it, but it's bundled with Python so it shouldn't be a issue (I guess).

Other than this, I hope you can enjoy the game (there's not much of it yet, I know) :D

I tested it only on Windows XP yet, but it should run on other OS as well (hopefully), anyways if you have some bug please report (all the more if it's a Mac one, as I don't have one D:)

(log in to comment)



I thought i'd place a bug report for your demo here.

My system specs are
OS: Slackware 12.2 (linux kernel 2.6)
Single core 1.7 GHz, 512 Mb
pygame 1.9 (default easy_install I didn't roll my own.)
python 1.5.4

Traceback (most recent call last):
  File "/home/jervis/pyweek9/higanbana/higanbana-0.1.1-beta/", line 6, in <module>
  File "/home/jervis/pyweek9/higanbana/higanbana-0.1.1-beta/higanbana/", line 72, in main
  File "/home/jervis/pyweek9/higanbana/higanbana-0.1.1-beta/higanbana/", line 210, in initializeFonts
    fonts = fontmgr.cFontManager(((None, 24), (None, 36), ('arial', 24)))
  File "/home/jervis/pyweek9/higanbana/higanbana-0.1.1-beta/higanbana/", line 33, in __init__
    assert fontFullFileName, 'Font: %s Size: %d is not available.' % pair
AssertionError: Font: arial Size: 24 is not available.

This occurs when I run game from source using pygame

I then removed the reference to arial font, and replaced with None.

on running again i got.

bash$ python
Traceback (most recent call last):
  File "/home/jervis/pyweek9/higanbana/higanbana-0.1.1-beta/", line 6, in <module>
  File "/home/jervis/pyweek9/higanbana/higanbana-0.1.1-beta/higanbana/", line 111, in main
  File "/home/jervis/pyweek9/higanbana/higanbana-0.1.1-beta/higanbana/", line 432, in main_menu
    core.play_music("main menu")
  File "/home/jervis/pyweek9/higanbana/higanbana-0.1.1-beta/higanbana/", line 133, in play_music
pygame.error: Module format not recognized

using pdb I found that the file was a mp3 file (import os;os.path.exists(file) == True)
and pygame's support of mp3 on some systems is limited (according to the documentation.)

I've done some googling and found that there might be a way to run it if you dont have id3 tags in your file? Sorry no time to test that theory here on my end until tonight. An alternative is to ship .ogg files in place of the .mp3


Ubuntu Linux 9.04 i386
Pentium4 monocore @2ghz
python 2.6.2
pygame 1.9

guest@p4:/mnt/sda1/trabalhos/pygame/recolhas/pyweek/09/_rascunhos/higanbana-0.1.1-beta$ python
/usr/lib/python2.6/dist-packages/pygame/ DeprecationWarning: os.popen3 is deprecated.  Use the subprocess module.
  flin, flout, flerr = os.popen3('fc-list : file family style')
Traceback (most recent call last):
  File "", line 6, in <module>
  File "/mnt/sda1/trabalhos/pygame/recolhas/pyweek/09/_rascunhos/higanbana-0.1.1-beta/higanbana/", line 111, in main
  File "/mnt/sda1/trabalhos/pygame/recolhas/pyweek/09/_rascunhos/higanbana-0.1.1-beta/higanbana/", line 249, in main_game
    load_level(level, mc)
  File "/mnt/sda1/trabalhos/pygame/recolhas/pyweek/09/_rascunhos/higanbana-0.1.1-beta/higanbana/", line 156, in load_level
    core.level.load("map/level_" + str(levelN) + ".rmap")
  File "/mnt/sda1/trabalhos/pygame/recolhas/pyweek/09/_rascunhos/higanbana-0.1.1-beta/higanbana/", line 337, in load
  File "/mnt/sda1/trabalhos/pygame/recolhas/pyweek/09/_rascunhos/higanbana-0.1.1-beta/higanbana/", line 289, in genBitmask
    bmSurf.fill((0,0,0,255), rect=(pygame.Rect(x*tw+self.x,y*th+33+self.y,tw,th)))
TypeError: fill() takes no keyword arguments
Hm, I thought I've removed references for arial fonts xD (now they're removed)

About the music files, I was going to use OGG at start, but there's some strange bug in that makes them freeze the game (at least on Windows), I've tried changing the encoding and stuff but don't seems to be a problem with the file.

I guess I'll have to use XM/IT/MID files for music .-. (and I had so many good mp3 files here)

Hm... I'm using Python 2.5, so I didn't got this error. But by reading PyGame's docs it seems that rect is a keyword argument (maybe something changed in Python 2.6 or in PyGame for Python 2.6), anyways just removing the keyword works :D

btw, are you brazilian or portuguese?
For what it's worth, I had no errors with the demo on windows 7, python2.6, pygame 1.9.  I do know I have seen mp3s not work in places though, so that comment in the docs is not unfounded.

Ogg files should not freeze, they work fine on every windows (and non-windows) system I have tested (and I have something that is fairly widely tested with no freezing reports). Also, if I convert the main menu to an ogg, it plays just fine. I wonder what is going on with your computer? Are you sure the .ogg file was a proper .ogg?
also at some point it was a problem with pygame 1.8.1 related to change-restart music.
There was a workaround for 1.8.1, was less notable in 1.7, fixed in 1.9 series, see:
Note that there the bugdemo was playing .mod files.
And in the 1.7 vs, mp3 support was flaky, much better the ogg support.

thanks, i'll see that!
about the question, besides i were born in Portugal, and lived half of my life in Brazil, i have both nationality, because i have family in both countries