A Walk in the Park
click for larger versions.
Synopsis:
A two-week game project, written in python and pygame, with the silen v0.9 engine as a base. The other two programmers in my group had never written a python program before, so the resultant project was the work of one programmer (Me).
At this point, I had become comfortable using python and pygame, and I started to branch out into the crazy visual effect realm. Given only the new blend modes in pygame 1.8.1 (which preserved the destination alpha channel), I set out to create some interesting distortion effects. The bullet has a shockwave stream that drags the background through it repeatedly (creating mirage-like effects), and the umbrella has a scaling shockwave ring.
The story takes place in Texas, where senior citizen John Gun has recently been fired from his greeter job at Walmart for "unfriendly behavior". Angry and frustrated at the changing times, he takes out his rifle and decides to clean up the riffraff in the local park. Stray dogs and digestively-challenged birds block the path forward, where a homeless bum has accumulated all the town's trash cans, giving him supernatural powers. Even John's native Texan whiskey might not be enough to get him through this.
Tech:
This game features a variety of tech, including a lot of animation work, two difficulties, background distortion, a boss sequence, and a custom-sorted sprite layer.
John Gun is composed of separated legs and torso, where the legs correspond to the direction and speed of movement, and the torso corresponds to the current action. The legs were animated twelve different ways (left, right, and center for each of: walk back, stand, forward, and forward fast) so that the player moved in relation to the moving background, and the code even accounts for the fact that the screen stops scrolling at the boss.
The difficulties change a variety of game variables, including enemy hp, whiskey recovery rate, bird poop rate, dog speed & detection range, and the bum's speed and throw speeds). Because of this, hard mode is pretty darn hard (you might need to press the [+] and [-] keys, or [Backspace] to jump forward & screw up the background temporarily...).
The background distortion took advantage of the way that pygame handles images. Because they are treated as surfaces, you can render to them, and if you use a blend mode that only affects RGB (& not alpha), you have now effectively copied a non-rectangular portion of the screen. If you draw this back into the background (using any blend mode), you can create interesting distortion effects.
The sprites were sorted by their imaginary ground points, which allowed the birds to fly above the trees. You can visualize it like a pop-up book, where the trees are pinned to the ground by their lowest point, and so on, so that everything is sorted properly in the 2d plane. The player flashes for a brief period when he takes damage so that he doesn't appear to walk through trees. I also added shadows to the bird poop so that the player could anticipate their trajectories.
The code for the entire boss sequence was completed from start to finish in a single night (as I was still waiting on art assets...), and the difficulties were added after that. He has six behaviors: jump, block, throw trash, throw trash fast, heal trashcans, and throw stray dogs. Based on the time frame, I'm really proud of the finished product.
Team:
Greg Lane (Me) - All Code, Interface Art, & Final Level/Enemy Setup
Jeff Sult - Sprite Art, Animations, & Music
Susan Jackson - Background Art & Level Design
Richard Valencia - Sound Effects
Christian Grice - Enemy Path Design (alpha)
Gameplay Video:
Requirements:
Python 2.5 (cross platform, Mac and Windows)
Pygame 1.8.1 Win Mac (distortion requires 1.8.1, untested on later versions)
Download Now







