Home Page
Archive > Updates > 2008 > September
Archive > Updates > 2008 > September

Warning: you do not have javascript enabled. This WILL cause layout glitches.


I’ve finally gotten around to getting my Fractal Landscape program up with information, yay.

I am currently releasing two “versions”:
  1. The first “version” (which I will henceforth call OrgVer) is the original version I made that was specifically put together for a portfolio I was assembling when looking for a job at game companies in 2003.
    • I threw OrgVer together as quick as I could as I was eager to start looking for a job at the time and needed some good working examples. Because of this, I didn’t concentrate on making the code pretty or maintainable like I do with most other code, as I never planned on releasing the source code for it. However, since it is a legacy version and I decided to continue with the project later on, I don’t mind releasing this original version’s source code now.
    • I have made slight modifications to OrgVer as following so it can more easily be compiled and such:
      • This was originally compiled for a specific version of DirectX 8, and has been updated for DirectX 9. This entailed changing a few function call names and their parameters.
      • There were originally 2 separate versions included with OrgVer. One was the normal code base, and the other had just a few modifications to include graphics card occlusion culling. I have haphazardly combined the two files through macros found in the “#if UseOcclusion==1” section (UO, NUO, OrOp).
      • Executable version information (which always includes the Hyrulean Productions Icon) has been added.
    • The original compile (fully working with the fractal generation, lighting, and some other stuff), which I did not keep, was made in 2 to 3 days in, I estimate, 25 to 30 hours (including research on how to generate fractals and such). I worked on it for 2 or 3 more weeks after that though and finished OrgVer with about 1,411 lines of code.
    • It only has a DirectX Engine (no OpenGL version in this one).
    • Controls are as follows: (For more detailed information on the controls, see the corresponding keys in the “Controls” section)
      • Mouse Movement - Rotates the camera.
      • =\+” - Increase the fractal level by 1.
      • -” - Decreases the fractal level by 1.
      • R” - Re-randomize the current fractal level.
      • enter - Re-randomizes all levels back to a level 5.
      • W/A/S/D” - Forward, left, back, right (in order) keys
      • L” - Toggle lighting/sun
      • M” - Re-centers the mouse cursor. Only available in non-FullCPU mode.
      • E” - Example fractal
      • F” - Toggle full screen
      • J/K” - Revolve sun counter-clockwise and clockwise
      • C” - Toggle clouds
      • O” - Toggle wireframe
      • esc - Exit the program
    • Source Code Definitions (See the “Source Code Definitions” section). The differences are as follows:
      • FullCpu: This toggles FullCpu mode for the executable.
        • When in FullCpu mode (1), which is the default:
          • DirectX handles keyboard and mouse input events.
          • Program receives all keyboard/mouse input even if window does not have focus.
          • The mouse cursor is locked to the window when it has focus.
          • Frames are redrawn consistently, immediately after each other.
        • When not in FullCpu mode (0), which is event driven:
          • The Windows’ event message system is used to handle keyboard/mouse input
          • Frames are only drawn when an update to the screen has occurred via a keyboard/mouse action.
          • This mode is less resource intensive.
      • UseOcclusion: Turn on hardware occlusion culling
      • WinStyle: This is not found in OrgVer
    • Downloads:
      • v0.5 Binaries - There are 3 executables of OrgVer found in this archive that only differ from toggled “Source Code Definitions”:
      • v0.5 Source - Important Note: Source code has not been cleaned up and was originally never intended for release. See above information in this update for more details.
  2. The second “version” I am releasing was finished, I believe, within one to two months after OrgVer, when I decided to pick the project back up for fun and make it more organized, optimized, user friendly, and add some more bells and whistles :-). I completely rewrote the engine infrastructure to use a complex object oriented approach in c++ with polymorphism, multiple inheritance, virtual classes, and such.
    • The source code and files of this version have not really been modified since I finished them in 2003, except, as always, for adding in executable version information.
    • Downloads: v1.0 Binary

There are also 2 other source trees I made of the project that I need to see to and possibly release. They are DirectX and OpenGL versions that use experimental ray-tracing techniques to speed up height-map rendering, which I wrote a paper about (Aug 2003) and will release it later too under this project after checking over it.

I redid all the screenshots for the project page and added lots of information including: The (formatted and updated) original readme, important notes, features, technical details, controls, and source code options.

[Fixed in v1.05] Regrettably, when I seem to run the engine through the DirectX implementation, there are a lot of bugs on newer graphics cards. The OpenGL implementation seems to still work on all new graphics cards though :-). I am including a list of bugs here that I need to look into that didn’t exist on any of the graphics cards I tried this on when I originally made it, and will see to fixing them later. [Most or all of] these bugs apply to both versions released in this update.

DirectX Bugs: [Fixed in v1.05]
  • The water sometimes overlaps solid objects where it shouldn’t. This is due to some alpha blending setting conflicting with the z-buffer.
  • The clouds do not show up at most viewing angles when fogging is turned on.
  • When leaving full screen mode the window’s title bar is sometimes pushed off the screen.
  • If fogging is turned on while a “Special Effect” is also on, all landscape surfaces show as pure white.

Other options I may add in the future:
  • Infinite fractal range (this one would take a major rewrite). This would also allow better Level of Detail (LOD) optimizations.
  • Running the engine in Windows’ event mode. This is currently available in the OrgVer “first version” available in this update. See “FullCpu” (the turned off version) in Source Code Definitions in this update.
  • Re-mappable keyboard shortcuts
  • Make “Special effects” available in OpenGL. Unfortunately, when I programmed this, the shaders I wanted weren’t really properly supported in OpenGL.
  • Integrate the “ray-tracing” modes
  • Dialog box keyboard shortcuts, including enter and escape
  • Option to have the engine pause when window loses focus
  • Make sure user doesn’t start under water [Added in v1.05]
  • Real shadows based upon the height-map (Not likely that I’m going to worry about this)
  • Lens flair when looking at the sun. I tried this at one point and failed pretty miserably, heh. Couldn’t get it to look right! This kind of thing is so pas sé/old school though ^_^;.
Download Content
Section: Website > Projects

Two updates have been made in the project page’s layouts. First, thumbnails are now shown in individual project pages. Second, a feature has been added to inform of projects that have multiple downloads, as opposed to just a single binary and/or source file. The two projects this currently affects are Other Web Scripts and Websites.

Section: Website > Projects

The following projects have had thumbnails added to them: College Crap, Freedrive URL cracker, Highschool C++ Class, HTTP Zip, Small, Other Web Scripts.

The Eyes project thumbnail has been updated to have a transparent background to better represent it.

The following scripts have been added to the “Other Web Scripts” project:
NameThis was done sometime in/between...
2002 and 2004
late 2006
2003 and 2004
2003 and 2004
2002 and 2004
2002 and 2003
The following fixes have been applied to Directory Manager v1.1:
  • Base URLs “<base href="...">” are now supported (they no longer break links)
    • Type: Feature (Base URLs are common for complex layouts)
    • How: All links in the script are now absolute from the base domain instead of relative to the current directory.
  • Confirmation is now requested through JavaScript before a file is deleted
    • Type: Feature
    • Why: Because there should always be confirmation before deleting data.
  • User authentication can now be applied only to the script instead of the whole directory
    • Type: Feature
    • Variable Name: OnlyProtectIndexFile
    • Why: Sometimes the user might want to only protect the ability to manipulate the directory, but not the files in it.
    • How: This adds a “<files>” directive to the “.htaccess” file around the user authentication section.
  • Header and Footer sections have been added to the top of the file right below the user variables section for easier manipulation of the page layout
    • Type: Feature
    • How: The user can now add layout header and footer information to the “HeaderSection” and “FooterSection” functions.
  • Script now only shows normal files (not directories) in its file list
    • Type: Bug Fix
    • How: The “is_file” function is now used on entries returned from the “read_dir” function before they are added to the list.
    • Side Effects: “.” and “..” were removed from the DoNotShowList variable.
  • Fixed all improper static strings of “index.php” to properly point to the current file (MyFileName variable)
    • Type: Bug Fix
  • The following user variables have been removed: MyFileName, RootDirectory
    • Type: Simplification & Bug Fix
    • Why: There was no need for the user to define these variables when the script can extract them. This also fixes a bug that occurs when a parent directory is symbolic linked.
    • How: Instead of using the “getcwd” function and subtracting that from the provided RootDirectory variable, directory and script name variables can be extract from the $_SERVER['SCRIPT_NAME'] variable.
  • Additional comments have been added in the file for code clarification
    • Type: Other

Other Information:
  • The Directory Manager information has been updated to reflect the above updates.
  • The “file by file protection” [possible] future update was also added to the information.
  • PHP scripts that now only have 1 file to them are available for download as plaintext files with the extension “phpcode” that just need to be renamed to “php”; instead of zipping them.
Download Content

The description, “how to use”, technical info, and an example have been added to the Image Zoom Effect in Other Web Scripts.


One of the most common requests I get from customers is the ability for their clients to upload files through a web page (HTTP) to the server; so I threw together from scratch[All of the script was written from scratch execept the HumanReadableSize function] a secure and robust script for this in about 6 hours which clocks in at about 360 lines. The single file works on just the directory it resides it, so the file can be uploaded to any directory you want it to work on with no extra hassle.

I know there are a lot of large applications out there for managed file uploading through a web interface, but I decided to make this anyway as it is kind of specific in its goals, being relatively lightweight and working on just a single directory at a time. Also since I made it myself, it’s easier to modify and update for specific clients needs, like direct integration into their website design.

Its main features are:
  • Sorted file listing within the directory
  • Upload files of allowed type (invalid extensions are renamed)
  • Delete and rename files
  • Create and delete user logins
  • Logged in users can change their password
  • All features are toggleable in three tiers:
    • No user file found (Directory access is currently unrestricted)
    • Normal user
    • Admin user
  • Easy basic configuration through a short variable list at the top of the file. Once it is configured the first time for a website, it is unlikely the configuration would need to be changed when copying (or symbolic linking) the file to other directories.
Download Content

Finally got my laptop hard drive reencrypted with TrueCrypt 6.0 and got the hibernation and wakeup results in. The result lines for “Laptop** w/ no encryption” and “Laptop** w/ TrueCrypt 6.0 full drive encryption” have been filled in.


I added a subsection to the Projects list that just shows Games and Graphics projects. I’ll be concentrating on getting all of these project’s contents sections flushed out as soon as possible, as well as getting their downloads up where applicable.