RABiD BUNNY FEVER
K.T.K
Warning: you do not have javascript enabled. This WILL cause layout glitches.
|
Welcome to my domain. This is an open space where I am keeping a compendium of my projects, thoughts, news, and miscellaneous ideas. I am a self taught programmer/computer nerd that works in C++ by choice, and too many other languages due to the facts of life. I have been programming virtually my whole life and working with computers since before I can remember. They are my passion, hobby, job, first love, and have served me well, though, been a constant pain in the anatomy. I hope you can find something of interest or use here, as that is the reason I spend my time creating and organizing this content. Enjoy. ^_^
Dakusan~ ๑۩۞۩๑
|
| | | | |
| | | I finally got around to touching up the paper I wrote in 2003 on how I made the Fractal Landscape, which also includes some theories and stuff. The overview states “The purpose of this paper is to report my discoveries over the last few months from working on my fractal landscape program.”.
I don’t even want to try and relate here how much of a bitch it was converting it from the shit that Microsoft Word outputs into a clean and W3C compliant HTML. But then again, that’s always a problem with Word output, which is why I try to not deal with it often, or convert it to plain text first when possible.
A PDF copy is also available. |  | | | | | The following updates have been made to the Fractal Landscape project, v 1.05:
- DirectX Bug (reported in last update): The water sometimes overlaps solid objects where it shouldn’t. This is due to some alpha blending setting conflicting with the z-buffer.
- Cause: The problem was my graphics card doesn’t seem to like 16 bit depth buffers much (in this case, the w-buffer, which is mostly the same thing as a z-buffer). Oddly, this wasn’t a problem with any older graphics cards I had tested it on, and OpenGL seems to have no problem with a 16 bit depth buffer.
- Solution: The code now has the graphics cards choose the highest available depth buffer solution for DirectX using “CheckDepthStencilMatch” (32bit, 24DX8 (24bit), or 16bit).
- DirectX Bug (reported in last update): The clouds do not show up at most viewing angles when fogging is turned on.
- Cause: An improper fog rendering setting
- Solution: “SetRenderState(D3DRS_FOGVERTEXMODE, D3DFOG_LINEAR);” has been changed to “SetRenderState(D3DRS_FOGTABLEMODE, D3DFOG_LINEAR);”.
- DirectX Bug (reported in last update): If fogging is turned on while a “Special Effect” is also on, all landscape surfaces show as pure white.
- Cause/Solution: Same as for the above bug (improper fog rendering setting)
- DirectX Bug (reported in last update): When leaving full screen mode the window’s title bar is sometimes pushed off the screen.
- Cause: DirectX does not keep window settings when switching to exclusive video mode.
- Solution: On resuming from full screen, “WS_BORDER” is added back to the window style.
- Code Cleanup (OpenGL): The 1bit stencil buffer has been turned off. Not sure why I even had this on in the first place.
- Code Cleanup (DirectX): Removed “D3DPRESENTFLAG_VIDEO” from the Direct3D present parameters flag and added “D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL”.
- Code Optimization: Added some floating point optimization in the height position determination when the camera position moves.
- Engine Feature/Fix: The Engine now makes sure the user does not start underwater when a new fractal is initialized.
- Solution: The engine detects if the camera starts under the water, and if so, it picks the closest height map point that is above water and sets the camera there.
- Other: I compiled this one using the normal Microsoft Visual C++ compiler instead of the Intel C++ Compiler, which has resulted in a ~40% decrease in the executable size.
|  | | | | | I’ve finally gotten around to getting my Fractal Landscape program up with information, yay.
I am currently releasing two “versions”:
- 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”:
| Name | FullCpu | UseOcclusion |
| Fractal.exe | on | off |
| Fractal_Non_FullCpu.exe | off | off |
| Fractal_Occlusion.exe | on | on |
- 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.
- 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 ^_^;.
|  | | |
|

|
I don’t have any in depth information or interesting anecdotes in today’s post, but I really wanted to talk a little about MediaWiki. MediaWiki is the wiki software, written in PHP, used by Wikipedia which has also been released by the WikiMedia foundation (who runs Wikipedia and her sister projects) as free and open source software.
MediaWiki is an incredibly powerful and robust system from a programming perspective; and spectacular in writing, editing, and organizing information from an editor’s perspective. The tagging/mark-up system is very well designed, easy to use, and easy to read when properly formatted.
The part that really caught my attention, however, is the documentation. I can say that, hands down, MediaWiki has the best documentation for a software package that I have ever seen in my life. They thoroughly document (link 2) everything in the software from all needed perspectives; including using the software as a reader, writer, editor, programmer, moderator, and administrator.
I was particularly happy with the template system, all of the available extensions out there, and the functions that allow dynamic content and manipulation of the software (Tag Extensions, Parser Functions, Hooks, Special Pages, Skins, Magic Words). | I’ve apparently had an incorrect view on the exact schema and costs of how domain registration works. I had always assumed that to become a registrar (the companies that normal people register domains through) of any .COM domain, you just had to get accredited by ICANN, and then pay $0.20 per domain. However, accreditation is an expensive and tough process, including (taken verbatim from the link):
- US$2,500 non-refundable application fee, to be submitted with application.
- US$4,000 yearly accreditation fee due upon approval and each year thereafter.
- Variable fee (quarterly) billed once you begin registering domain names or the first full quarter following your accreditation approval, whichever occurs first. This fee represents a portion of ICANN’s operating costs and, because it is divided among all registrars, the amount varies from quarter to quarter. Recently this fee has ranged from US$1,200 to S$2,000 per quarter.
- Transaction-based gTLD fee (quarterly). This fee is a flat fee (currently $0.20) charged for each new registration, renewal or transfer. This fee can be billed by the registrar separately on its invoice to the registrant, but is paid by the registrar to ICANN.
- Please refer to http://www.icann.org/general/financial.html for the most recent ICANN Budget to find additional details about invoicing, including options for relief.
- Please refer to http://www.icann.org/financials/payments.htm for instructions on how to submit payments to ICANN.
So I had thought that becoming an accredited .COM registrar would pay itself off in the first year if you had ~ 1,177 domains registered...
- BASE FIRST YEAR FEE=$2500 application + $4000 yearly + ~$1500 ICANN operation fee = $8000
- PER DOMAIN DIFFERENCE= $7.00 to register a domain at a good registrar - $0.20 ICANN FEE = $6.80 savings per domain
- TO BREAK EVEN= BASE FIRST YEAR FEE / PER DOMAIN DIFFERENCE = $8000 / $6.80 = ~1,177 domains
but unfortunately, I was incorrect in that you ALSO have to pay Verisign (who owns the .COM TLD) a hefty fee per domain.
So once you become an accredited ICANN register, you have to hook your system up to Verisign, who charges an additional (to the $0.20 ICANN fee) $6.42 per domain. Even worse is that they require you to pay all of their fees up front for the number of domains you plan to register on a yearly basis!!!!
Taking into account these new findings, it would actually take ~21,053 domains (with PER DOMAIN DIFFERENCE being adjusted to $7.00-$0.20-$6.42=$0.38) to break even the first year when becoming your own registrar (as opposed to going through another registrar), YIKES!
I've always personally recommend gkg.net as a registrar, but their registration prices recently took a major hike, like most registrars, due to Verisign raising their per domain fee. I may have to reevaluate registrars at some point because of this. | I’m not going to get into politics in this post (nor will I generally ever); I just wanted to point out a few things that I saw on the Internet on election night that made me smile :-) .
Wikipedia actually errored out when I tried to get to Barack Obama soon after it was announced he won.

I was also really surprised that Fox News had up the following picture/announcement mere minutes after all the other stations reported Obama had won (when it was still only projections). I would have thought Fox News would hold out on announcing it to their viewers until it was more sure...
|
| |
|