September 2007 challenge: “Twisted”

555-BOOM! - HELP - pygame.mixer bug?

Posted by gcewing on 2007/09/06 10:58

I'm having trouble playing a particular sound. It works fine the first time, but if I try to play it again there's a good chance of it getting stuck looping over a small segment.

I'm using MacOSX 10.4, python 2.3, pygame 1.7.1, SDL_mixer 1.2.8.

I've tried saving the sound in .ogg and .wav formats, and with different sample rates, but it makes no difference.

Anyone else encountered something like this? Is it a known bug in pygame.mixer or SDL_mixer?

1 comment

Batwima Islands - thoughts for day 5...

Posted by Trobadour on 2007/09/06 10:03

So, i have not that much time to spare as i thought but it's going forward. I realized that i have to cut out many features for the pyweek version like better graphics (you cannot really call it graphics in the current version ;) ) and sound, menus and so on. But i think that i can implement the basic game mechanism. So there wil be something that looks nasty, sounds nothing but is hopefully fun to play!

Add a comment

Deathworks - About Legacies

Posted by Deathworks on 2007/09/06 09:10

Hi!

(I know I should go home to do the final stretch of programming, but before that, allow me that last question)

How many people are planning to continue working on their projects after PyWeek? As I said before, I am planning to expand my project and turn it into the game I always dreamed of making. There are others who have great game concepts and who are forced to drop some features; for instance, I just read Hectigo's diary entry about his strategy game. I wouldn't be surprised if he continued working on it and making a deluxe version after the contest - it sure sounds as if it was worth it.

So, I wanted to know what participants think about their games - complete at the deadline of PyWeek or part of a continuing development? (Both views are equally good or bad, there is no 'good' or 'bad' answer to this, so please feel free to state your honest thoughts.)

Deathworks

8 comments

Army of Aerojockey IV - DNA Replicator is official

Posted by aerojockey on 2007/09/06 09:06

And with 2 and a half days to spare.

I added a tutorial level, based on advice from alex. I did not add any music or sound effects. Think about it: do you hear any sound from microscopic things? I don't think so! Plus I'm an audiophobe.

I also varied the victory messages to give the gamer a little bit better of a payoff for doing well, and made a few minor interface improvements. Otherwise, it's pretty much the same game as it was two days ago.

Barring any bug reports, it won't change any more.

BONUS TIP: If you want to see the pretty animation without the hassle of hitting the vi keys, find the line "autotap=False" in main.py, and set autotap to the percent of automatic hits you want. For example, "autotap=0.75" will automatically hit 75% of nucleotides. "autotap=1.0" will hit all of them.

5 comments

Deathworks - Okay, a few hours left and no game yet

Posted by Deathworks on 2007/09/06 08:59

Hi!

Well, I am definitely too slow for this kind of thing.

Yesterday, another 6 hours were lost to visiting my parents (the reason I can't participate on Friday and Saturday is that I am joining them for a weekend trip - so we had to discuss some details), after which I was - again - unable to work during the night (damn, until a few weeks ago, I regularly couldn't sleep before 3:00 and actually could get things done until about 1:00, but now I get all sleepy at 22:00 (^_^;; ).

Still, with the few hours left to me, I will try to get a rudimentary event system running and try to design a few labyrinthine levels (twisted forest). I still want to provide something that can be called a game, as far as that it can entertain you for at least a few minutes.

Anyhow, regardless of how that works out, I can already say that this PyWeek was a great success for me. I have learned a lot about Python, and even more (in many ways) about wxPython. Talking with the people here has been fun.

Finally, my project for this PyWeek has quite unexpectedly turned into a real first step into the future. As I said before, originally, I had hoped to be able to recycle some of the code from my program to use in my big dream project. But now, looking at what I already have and how it works, the most reasonable thing to do is to actually make the big dream project an expansion/alteration of the current project.

Thus, my plans for the future are that, after returning from that ill-timed trip, I will start working on editors and expanding the engine of the game.

So, regardless of whether I will be able to finish a game for the deadline, I can honestly say that this PyWeek has paid off for me.

Deathworks

1 comment

Deathworks - Availability of Target Platform

Posted by Deathworks on 2007/09/06 08:48

Hi!

This is just a random thought that came to mind after seeing the result of testing.

I am wondering how many people there are who do not have the target platform available for testing/judging?

The rules say: "All entries must run in Python on the latest available libraries"

In the case of my program (not a game yet (T_T), that would be

Python 2.5.1 (?)
wxPython 2.8.4

Theoretically, I wouldn't need to worry about anything less than the target platform, but hearing that people have problems running the software because of what may be old libraries can be quite disheartening.

So, I am wondering how many people there are who are unable for any reasons to install/use the most current versions of the libraries (I suppose, most of the newbies have the latest versions, so this probably applies only for the more experienced participants).

Deathworks

4 comments

Lazers - bleh bleh

Posted by Mocker on 2007/09/06 08:36

starting to feel major burnout on this.
My teammates have been busy all week for the most part so this has definitely been slower than I wanted

Anyways, finally got the map editor "almost" completely working.
Left to add to it is:
  • Modify background image
  • Change height/width/playable height (the point at which the characters falls to his doom)
  • Foreground possibly
  • Exporting to an xml file.. a bit important lol. But it should be easy since the data is organized to be loaded from an xml file easily

Once I get the ability to easily create large levels I can make a big one for testing
After that can work on fun stuff like.. enemies and objectives

Here is a youtube video with the basic sample level and level editor
http://youtube.com/watch?v=Qmegpwp8MIk

1 comment

FamilyGuys2 - Python: Useful Utility for PGU's leveledit

Posted by jjinux on 2007/09/06 07:43

I'm using PGU. If you're not using PGU, you can skip this post.

If you're like me, you sometimes get confused about when you're editing the tiles and when you're editing the background. My buddy drew an entire level, and the tiles and background were totally messed up. Rather than redo the entire level, I wrote a little utility to force all the tiles into the background. It's quick-and-dirty, but quite useful when you need it:

#!/usr/bin/env python
#
# Copyright 2007 Adam Ulvi, Shannon Behrens
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

"""Take a TGA file, and force any tiles onto the background.

This is to make up for UI interface "difficulties" in PGU's leveledit.

"""

import os
import sys

import pygame

__docformat__ = "restructuredtext"


try:
    if (not len(sys.argv) == 3 or 
        not os.path.isfile(sys.argv[1])):
        raise ValueError
except:  # Catch all exceptions, not just ValueErrors.
    print >> sys.stderr, "usage: force_background.py INPUT.tga OUTPUT.tga"
    sys.exit(2)

in_f, out_f = sys.argv[1], sys.argv[2]
in_img = pygame.image.load(in_f)
out_img = in_img.copy()
w, h = in_img.get_width(), in_img.get_height()
for y in range(h):
    for x in range(w):
        (tile, bg, code, alpha) = in_img.get_at((x, y))
        if tile:
            bg, tile = tile, 0
        out_img.set_at((x, y), (tile, bg, code, alpha))
pygame.image.save(out_img, out_f)

Add a comment

The Olde Battleaxe 5 - The KNOB Master!!!

Posted by philhassey on 2007/09/06 07:08

Since I was working on my gui ... and wanted to make a game using it, illume suggested that the best way to do that would be to create a KNOB widget! Here it is in all its glory:

... Gee, I hope a game comes out of this at some point!

5 comments

Hole in the Head Studios - We might have lost our minds... - its alive, its...

Posted by RB[0] on 2007/09/06 06:37

you get it :P

finally a game emerges from our engine :D

the campaign loader is finished, and the cool thing is with the approach we took, you can edit almost anything in the game via events, so you could potentially completely shift the gui layout/images/fonts etc because one of your units hit the wrong tile :P(yeah, exec is really handy sometimes)

we also now have the basic gui layout of the in-game hud finished, just need to make action buttons/input_boxes.

then we actually have to add fighting/monsters/glyphs/forts/etc....

wow, so much to do still :/

1 comment