Ludum Dare 18 Timelapse Video

August 25th, 2010


See Youtube page for a larger video.

This time-lapse video of my attempt at Ludum Dare 18 covers 32 hours worth of work. The theme of the competition was Enemies as Weapons. I made great progress over these three days, but the scope of this game was a little too ambitious for one weekend. Since most of hardest parts of making this game are already completed I plan to continue working on this.

The music in the video are:
1. The level music I composed for the competition.
2. The Earth tune I composed for the competition.
3. The Wind tune I composed for the competition.
4. The Fire tune I composed for the competition.
5. The Water tune I composed for the competition.
6. Legend of Zelda: Link’s Awakening Mountain of Dreams OC ReMix by William Harby (Willrock)
7. Super Mario Bros. Bros with Dix OC ReMix by Joshu Skowronek (Nase)

Simple Recursive Maze

July 26th, 2010

Here is a simple recursive maze generator I wrote to help a friend learn a little more about how recursion works. I figured I’d post it here as well.

#! /usr/bin/env python

import random

# Width and height of maze needs to be an even number because of walls
WIDTH = 60
HEIGHT = 20

# The change in x and y for all four directions
UP = (0, -1)
DOWN = (0, 1)
LEFT = (-1, 0)
RIGHT = (1, 0)

def recursive_maze(maze, x=0, y=0, dirx=0, diry=0):
	# Check if current position is inside maze boundry
    if 0 <= y < len(maze):
        if 0 <= x < len(maze[0]):
			# Check if this position can have a new hallway going to it
            if maze[y][x] == "#":
				# Make this position into a hallway
                maze[y][x] = " "

                # Connect this position with previous position
                maze[y-diry][x-dirx] = " "

                # Create direction list and randomize it's order
                directions = [UP, DOWN, LEFT, RIGHT]
                random.shuffle(directions)

                # Follows each direction when the callstack returns here
                for dx, dy in directions:
					# Go down this current direction
                    recursive_maze(maze, x + dx*2, y + dy*2, dx, dy)

def draw_maze(maze):
	# Draw top wall
    print "#" * (len(maze[0])+1)
    # Draw each line with left wall added in
    for line in maze:
        print "#" + "".join(line)

# Initialize the maze as am array of arrays filled with wall spaces
maze = [["#" for j in xrange(WIDTH)] for i in xrange(HEIGHT)]

# Start making the maze
recursive_maze(maze)

# Finally, draw it
draw_maze(maze)

The output of this program will look similar to this:

#############################################################
# #       #     #           #           #               #   #
# ##### # # ### # ######### ####### ### # ########### # # ###
#   #   # #   # #   #     #   #   # # # # #           # #   #
### # ### ### # ### ### # ### # # # # # ### ########### ### #
#   #   #     #   # #   # #   # #   # #   # #     #   # #   #
# ##### ######### # # ### # ### ##### ### # # ### # # # # ###
# #     # #     #   #   # # #   #     #   #     # # # # #   #
# # ##### # # ######### ### # ### ### # ######### # ### ### #
# # #       #         #   #   #     # #         # # #   #   #
# # ### ########### # ### ######### ########### # # # ### ###
# #   #   #       # #     #         #           # # # #     #
# # # ### # ####### ####### ### ### # ########### # # # ### #
# # # # #   #       #     #   #   # # #           # # # #   #
# # # # # ### ##### # ### ### ### ### ########### # # ### # #
# # # #   #   #     # # #     #   #   #         # #   #   # #
# ### # ### ##### ### # ####### ### ### ####### # # ### ### #
# #   # # # #   # #   #       #     #   #     #   #     #   #
# # ### # # # # ### ####### # ######### # ### ########### ###
#   #     #   #             #           #   #               #
#############################################################