Legend of Tux

From LD Smith Games Workshop
Jump to navigation Jump to search

Legend of Tux


I'm still here, but I haven't gotten around to doing much development lately. I've been playing too many RPGs on the XBox 360. The latest changes are still in the Subversion repository (conversion to OpenGL, rewritten font code, etc).

Legend of Tux version 0.8 released on February 6, 2010! Download it at SourceForge

Added Legend of Tux to SourceForge: http://sourceforge.net/projects/legendoftux/

Domain name expired, so please see this page ( http://levidsmith.com/wiki/index.php?title=Legend_of_Tux ) for all Legend of Tux information!

Linux: Make sure you are using the latest version of SDL_image to compile (SDL_image-1.2.10). I received compilation errors (IMG_INIT_PNG undefined) using the version in Ubuntu's Synaptic package manager.


I started development on the Legend of Tux in August 2009. I wanted to create a game that combined the gameplay of a Mega Man game and the original Legend of Zelda. I had developed a Zelda clone using updated graphics in 2003, using ClanLib libraries. In 2006 I created an engine for a tux Zelda style game using SDL, but it wasn't very good. I didn't have much time to devote to it, since I was working on a master's degree in industrial engineering outside of my full time job.

The controls are simple. Use the arrow keys (or a,s,d,w) to move and spacebar to attack. Press f to throw your hat boomerang, which will stun enemies. Hold spacebar to charge your sword to shoot it. Collect a power orb to get a 3x attack power boost against enemies of that color. Defeat all enemies in a room to move to the next room. Clear all 16 rooms to complete a level. Finish all eight levels to win the game.

Gameplay is completely linear. Move one room to the next until you reach the boss room and defeat the boss. The one aspect that I hate the most about Zelda style games is trying to determine where to go next.

The Legend of Tux is free software. The source code is available on SourceForge. I am attempting to document the entire software development process.


Click image to enlarge

Lotux controls.png Gamepad.png


Screenshots of stable release, version 0.4

Ubuntu Linux 9.04 compilation

Running under Ubuntu Linux 9.04 Live

Lotux ubuntu001.jpg Lotux ubuntu002.jpg Lotux ubuntu003.jpg Lotux ubuntu004.jpg

Running under Mandriva 2010 Live

Lotux mandriva 01.png Lotux mandriva 02.png

Windows compilation

Running under Windows Vista

Lotux win 01.jpg Lotux win 02.jpg

Archived Screenshots

Patch Notes

Version 0.9 Patch Notes (In Development)

  • Making an attempt to use OpenGL through SDL for drawing, which will hopefully take advantage of hardware graphics acceleration (cards/chips), so that I can try to get 60 FPS running at 1024x768 resolution; I tried making a 640x480 low resolution version, but it just didn't look very good at all
    • See my progress with the OpenGL conversion here: OpenGL
  • After converting to OpenGL, the room scroll code no longer works, since it relied upon a new SDL_Surface to be blitted to the screen
  • Added new font code, so it now uses a PNG image for the fonts instead of the SDL_ttf libraries (which required another library, which I can't think of the name right now). This should make things simpler, however I will probably need to write a another program to generate the PNG image with the font letters placed correctly.
    • Wrote a simple Java program to display all the characters for a font in the format that my font.c code expects it. I still have to take a window screenshot of the font, then crop out the font, place it correctly, and then save it as a PNG file
  • Tested the game on my laptop a few weeks ago. There was a very noticeable problem with most of the images. I determined that the problem was due to the images not being sized by a power of 2, because the images that were 32x64 and 32x32 would still display correctly.
  • Note: A quick way to get all the SDL libraries needed for Legend of Tux in Ubuntu Linux (tested on 10.04), is to download Frozen Bubble using Synaptic Package Manager and get all the dependencies. This will download all the libraries needed for Legend of Tux

Version 0.8 Patch Notes (Stable Release)

  • Gamepad and joystick now supported in addition to the keyboard
  • Added license documentation for all the sound effects and music on the Adding Music page; I also updated the three sound effects using files from a creative commons library site; The old sound effects were also free and redistributable, but I can't remember exactly where I got them
  • Added new sound effects
    • Menu select
    • Level select
    • Sword charge
    • Player Hit
    • Player Dies
  • Attempt made to reduce CPU usage
  • Fixed issues when scrolling to the next room
  • Now using the SDL_Image library to load images
  • Replaced all BMPs with PNGs (a lot of effort was put into this, with only a smaller distribution package to show for it)
    • Added transperancy to PNGs that had the magenta color for transperancy, and cleared the magenta color so it is now transperant; Using "SetColorKey" on a PNG made the program crash, so the magenta color was no longer an option.
    • The size of the images on disk is now somewhat smaller, however the program still uses about the same amount of RAM; Plus, the framerate for some levels (Astro) has dropped (below 30 FPS)
  • The sword projectile path now varies depending on the sword charge level; splits into 2 for a level 2 charge; splits into 4 for a level 3 charge
  • Fixed sword display issues and increased the length of the sword
  • Added unique enemies for each level, but I haven't done the "attacked" animations yet
  • Pasted eyeballs on each of the attacked sprites

Version 0.6 Patch Notes (Stable Release)

  • Added ability to save which levels have been completed by pressing "v" from the title menu; Pressing "l" on the title menu will load the saved game; Additional menu options will need to be added
  • Added "Loading" message on startup; On slower systems, it may take around 30 seconds to load all of the image files
  • The player can no longer move while swinging the sword
  • Fixed collision detection problem of player being able to walk horizontally through an enemy without getting hit
  • Got SDL_ttf working, and I wrote my own custom methods to display text to the screen
  • Added level play time and FPS for debugging display at the top of the screen
  • Added unique music for each stage
  • Added boss music for the last room in each level
  • Added Sound Effects
    • Sword swing
    • Enemy Defeated
    • Orb Pickup
  • Added charge meter at the top of the screen that fills up as the sword is charged; Once the meter is full, the charge level increases; There is a current maximum of 3 levels, but currently the charge levels do not produce any different effects

Archived Patch Notes


Eight levels must be completed to win the game.

Astro Land

Bolt Land

Desert Land

Flame Land

Frost Land

Jungle Land

Stone Land

Mech Land


  • If the boomerang hasn't returned to the player when the player moves to another room, then the boomerang will be at the same location in the next room and return to the player
  • The player can repeatedly press "F" to shoot the boomerang over again
  • Need pause or inventory select screen
  • After installing on a new system, it can take 15 to 30 seconds to load the title screen. Need to add a "loading" screen
    • Loading message added, but a progress bar is also needed
  • Need better enemy AI, and differing AI for different types of enemies
    • Move 2 or 3 tiles, and then change in random direction (Octorok)
    • Wake up and chase when enemy is near (WoW mob/Metal Gear)
    • Chase player when player has back turned to enemy (ex SMB "Boo Buddy")
    • Jumping Enemy (Tektike)
  • Need options screen to change sound/music volume, change control options, etc
  • Need ability to save and continue
    • Preliminary save/load code added, but a screen is needed to manage saving and loading files... or implement an autosave feature
  • Add additional powerups; These should be temporary powerups
    • Increase attack power
    • Invincibility
    • Speed Increase
  • Add boss enemies
    • Boss enemies should be graphically larger than regular enemies
    • Boss enemies should have more strategy to defeat then a regular enemy
    • Boos enemy should be the last enemy of the stage, and the stage is completed once the boss enemy is defeated
  • New enemy killed animation
    • Replace the hand drawn cloud when an enemy is defeated with something that looks better... maybe a rendered skull that expands
  • Make better level complete screen
  • Add two rows of blocks to the tops of all rooms, so that the player won't overlap with the status bar

  • Anyone know how to roll debs? I could use a tutorial so that I can build a package for Ubuntu
  • Make the sword appear to be in Tux's hand, instead of floating in front of him; The length of the sword will probably need to be increased
  • A sword really doesn't suit Tux... I think I'm going to have him throw snowflakes or snowballs instead; Maybe a candycane striped pole
  • Have a meter gauge at the top that fills as the player charges the weapon
    • Added in version 0.6

  • Is the "arial.ttf" file in the Linux /usr/local/share/fonts directory redistributable?
  • Diagram of the projectile motion I plan on using for the three charge levels (made with Inkscape)

Charge levels.png

  • Thinking about having the special items as pickups throughout the level... similar to Ninja Gaiden; That way the player doesn't have to beat the entire level to get a weapon, plus it gives more options for making puzzles
  • Add ability to move to rooms from top/bottom of the screen
  • Game load screen, and add a saving interface
  • Add more items; bombs will probably be next, with the ability to destroy certain walls like Bomberman
  • Improve enemy AI; look at AI algorithms/engines
  • Not a huge issue, but I've noticed that I can get up to 400 FPS when using OpenGL on some systems, but I get a constant 60 FPS on other (higher powered) systems (without adding SDL_Delays). Do certain versions of SDL or certain versions of the opengl32.a library automatically delay after 60 FPS is reached (without explicitly adding SDL_Delay statements)?

Resolved Issues

Software Docs

Setting up the Development Environment


Requirements Definition

Level Design

Finding Memory Leaks

Adding Music (View credits for music and sound effects here)

Installing on Linux

Saving and Loading

Collision Detection

Setting up SDL_ttf, SDL_Image


My Zelda Implementation in ClanLib from 2003: Zelda Alpha



Levi D Smith - Sole designer and developer of Legend of Tux, including level design, object rendering, graphics, and testing