Main Page: Difference between revisions

From LD Smith Games Workshop
Jump to navigation Jump to search
Line 128: Line 128:
*After installing on a new system, it can take 15 to 30 seconds to load the title screen.  Need to add a "loading" 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  
**<font color="blue">Loading message added, but a progress bar is also needed</font>
**<font color="blue">Loading message added, but a progress bar is also needed</font>
*The first time after downloading the zip from the website, extracting, and running, the program exited after the title screen.  Subsequent attempts have not had the problem
**<font color="blue">Seems to have been an isolated case... I haven't seen this problem again, so it may have been related to the memory leak or other problems that I fixed</font>
*Just noticed that it is possible to walk through horizontal moving snowmen, if the snowman moves through the middle of your body.  The collision algorithm doesn't detect when a smaller object moves through a larger object, without intersecting any of the bounding box vertices.
**<font color="blue">Fixed in version 0.6</font>
*Need unique background music for each stage
**<font color="blue">Added in version 0.6</font>
*Need unique enemies for each stage
**  Astro - aliens
**  Bolt - sparks
**  Desert - Cacti
**  Flame - Devils
**  Frost - Snowmen (the current default enemy for all levels) "SNOWMOBS"
**  Jungle - Iguanas
**  Stone - Golems
**  Mech - Robots
*Need better enemy AI, and differing AI for different types of enemies
*Need better enemy AI, and differing AI for different types of enemies
** Move 2 or 3 tiles, and then change in random direction (Octorok)
** Move 2 or 3 tiles, and then change in random direction (Octorok)
Line 163: Line 148:
*Make better level complete screen
*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
*Add two rows of blocks to the tops of all rooms, so that the player won't overlap with the status bar
*Add sound effects
**Sword Swing
**Enemy killed
**Level select: selected level changed, invalid level selected
**Orb pickup
**Player hit
**Boomerang
**<font color="blue">Sword swing, orb pickup, and enemy killed sounds added in version 0.6</font>
*Tried running Legend of Tux on a Windows XP system, but the game screen ran slowly;  The Task Manager reported 98 to 99% CPU usage.  Maybe the problem is because I compiled under Vista, but my Vista is running 32 bit.  On the other hand, there was barely any loading time to get to the title screen;  On my Windows Vista machine, the CPU usage was about 50% on the title screen, and varied between 18% to 27% on the game loop screens;  Increasing the TICK_INTERVAL from 33 to 100 reduced the CPU usage on the game loop screen to between 6% and 11%, however it was only running at 10 FPS;  I also found that I was missing SDL_Delay statements in my Title screen and Level Select screen;  Adding delays in those loops seemed to bring the overall CPU usage down to the 20-30% range on the Vista machine.
<font color="blue">Removed the drawBlocks code, and reran on the Windows XP system, and it was still running at around 13 fps.  I thought that the multiple block blits may have been slowing things down, since the framerate appears to go down in rooms with many blocks</font>
<font color="blue">Adding SDL_RLEACCEL to the createImage code on SDL_SetColorKey helped reduce the CPU usage on my main development machine from 20-30% down to 5%-10%, so I'm thinking this will help resolve the frame rate issue on my Windows XP machine.  However, it causes the room to not scroll anymore when the player transitions form one room to the next... there is just a long pause, then the game speeds up for a few seconds and returns to normal</font>
<font color="blue">Tried the new build on the Windows XP machine, but it still runs around 19 FPS using 99% of the CPU.  I was a little frusterated since other SDL games run at 40+ FPS, but I learned that those games are using OpenGL to render frames, even though they are 2D based.  After some reasearch, I learned that graphics processing will only be delegated to the graphics card if the screen is rendered using OpenGL.  That could be the reason why the build runs so slowly on that machine, which has a decent graphics card (6600GT I believe), but the CPU is quite old.</font>
<font color="blue">I guess I need to make a decision whether to continue to develop using the standard SDL libraries and ignore support for older machines, or reimplement the rendering code to use OpenGL so that the program will run on older machines with graphics cards</font>
<font color="#008000">Spent a few hours still trying to improve the framerate on the Windows XP system.  I ended up basically disabling all images, fonts, event handlers, etc.  However, I couldn't get the frame rate above 24 FPS at 1024x768 resolution.  I decreased the resolution, and got the frame rate up to around 40 FPS for 800x600, and 60 FPS for 640x480.  I would really hate to have to make the program run at such a low resolution, but I've noticed other SDL applications (non-OpenGL) running at 800x600.</font>
<font color="blue">Spent some time trying out and looking at the source code for other other non-OpenGL games on SourceForge;  From the three I tried, they all ran a 640x480 resolution.  So maybe there just isn't any way to get an SDL app to run at 60 FPS at 1024x768 resolution on a 1.5 GHz (single CPU)
I guess it makes sense (assuming that I'm drawing the entire screen each frame, and not just updating "dirty" rectangles):
* 640x480 = 0.31 million pixels to draw to the screen
* 800x600 = 0.48 million pixels
* 1024x768 = 1.33 million pixels


So there is more than 4 times as many pixels that must be drawn to the screen
</font>


<font color="#008000">Working on adding a low-resolution (640x480) in addition to the standard resolution (1024x768), so that older machines can play a less CPU intensive version of the game.</font>


*Anyone know how to roll debs?  I could use a tutorial so that I can build a package for Ubuntu
*Anyone know how to roll debs?  I could use a tutorial so that I can build a package for Ubuntu
Line 207: Line 160:
**<font color="blue">Added in version 0.6</font>
**<font color="blue">Added in version 0.6</font>


*Convert BMP files to PNG and add the SDL image library code to read PNG files, so that the amount of disk space used to store images is reduced


*Is the "arial.ttf" file in the Linux /usr/local/share/fonts directory redistributable?  
*Is the "arial.ttf" file in the Linux /usr/local/share/fonts directory redistributable?  

Revision as of 02:51, 17 February 2010

Legend of Tux

News

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 registered: http://www.legendoftux.com

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.

Concept

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.

Controls

Click image to enlarge

Lotux controls.png Gamepad.png

Screenshots

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


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

Levels

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

Issues

  • 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


Resolved Issues

Software Docs

Setting up the Development Environment

Brainstorming

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

Influences

My Zelda Implementation in ClanLib from 2003: Zelda Alpha

OpenGL

Developers

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