Googled

By Shamus Posted Tuesday Feb 28, 2006

Filed under: Pictures 4 comments

A while back I talked about how, even when google selects the “wrong” result, you can still usually find what you’re looking for when you get there. Here is a pretty ironic counter-example:

The top result for “Twenty Sided” is this site. Still, if the searcher has the wit to add “dice” to their query, they should be taken to where they want to go. Which is probably not here. :)

 


 

cAPS lOCK kEY

By Shamus Posted Monday Feb 27, 2006

Filed under: Rants 41 comments

Steven Den Beste (who, really, really needs to get some permalinks, seriously man) makes the following gentle suggestion:

i HATE THE CAPS LOCK KEY. iN THE 35 YEARS i’VE BEEN USING COMPUTERS i HAVE NEVER ACTUALLY NEEDED THE cAPS lOCK kEY A SINGLE TIME, BUT IT’S BEEN CAUSING ME GRIEF EVER SINCE WHEN i HAVE HIT IT ACCIDENTALLY. tHERE HAS TO BE A WAY TO DISABLE THAT [annoying item]!

While it is true that the CAPS LOCK is certainly an optional key, I do find uses for it. For example, when writing code, it is an almost universal convention to give constants names in all uppercase, as in:


#define BASE_RUNNING_SPEED
#define TURN_SPEED
#define ROCKET_DAMAGE
#define ROCKET_BLAST_RADIUS
#define ROCKET_MAX_RANGE


16.32
22.5
90
12.5
256

So, if you have to type a lot of these at once (which is rare, usually lines of code like this are added as needed) then it might make sense in some cases to use the caps lock. Let’s face it, typing ROCKET_MAX_RANGE while holding down a shift key is akward. (try it!) So, there are certain rare exceptions where I do put this key to use. I suggest that this happens no more than once a year. If my keyboard did not have this key, it would have no impact on my productivity, except perhaps a small improvement gained from avoiding iNVERSED cAPS tYPING that SDB demonstrates above, and which, I assure you, happens a lot more often than once a year.

But no, by far the most useless key on the keyboard is of course:


This one.

I have never pushed it on purpose. I have pushed it by accident many, many times, and such mishaps usually end in confusion or disaster. It opens the start menu, and if you don’t stop typing you will end up launching a random application. So here we have the most annoying and useless key on the keyboard, tucked between two of the most commonly used and indispensible. Press this one when you’re playing a game, and the OS thoughtfully yanks you out of it (often leading to a crash) to present this menu to you. The left ALT and CTRL are two important buttons for most gamers. They get used for stuff like jumping and ducking. So, gamers get the thrill of hammering away on these two buttons, knowing that a misplaced finger in a moment of panic will bring the whole show crashing down.

What amazes me is this: Ever try to buy a keyboard without a windows key? They are rare and expensive. There are high end “gaming” keyboards (a friend showed me one last night) that allow you to disable the key, but nobody has the nerve to just leave the stupid, useless, annoying little bugger off the keyboard entirely. The fact that the key needs to be disabled should be a dead giveaway that it shouldn’t be there in the first place. I keep waiting for Winkey-free keyboards to catch on, but year after year we see the same stupid keyboard.

I’m telling you: For a clever person out there someplace, there is a fortune to be made on this problem. Make a (cheap!!) keyboard without the Windows key, without that also-useless “clipboard” key, without the CAPs lOCK, and of course without the shopping keys and “internet” buttons that appear on some big-name branded keyboards. Make a trimmed-down version of the standard keyboard, and geeks will buy them faster than you can make them.

 


 

SpiderMug

By Shamus Posted Monday Feb 27, 2006

Filed under: Pictures 4 comments

Some mornings pose an extra challenge. Every once in a while, I have one of those mornings where I feel like I’m just not up to the task of being awake and walking upright. The day is too daunting. At those exceptional times, I have to call on the help of…

SpiderMug

…my Spider-Man mug. I fill spidey here with a heaping helping of thick black coffee and stare into space, in much the same way Spidey might stare at New York after getting beaten up by Rihno and then reading another vitriolic Op-Ed in the Daily Bugle calling for his capture and arrest. Sort of a, “This sucks. So remind me again why I’m doing it?”

I like the Spider-Proverb, “With great power comes great responsibility.” I like this because it leads naturally to Shamus’ corollary, “If you’re powerless then you probably don’t have much in the way of responsibilities.” So, I sit at my computer slack-jawed while taking comfort in the fact that for the next hour or so nobody is going to expect much out of me.

Spider-Man and me, we’re like kindred spirits.

 


 

Deploy Airbag

By Shamus Posted Sunday Feb 26, 2006

Filed under: Notices 1 comments

I’m upgrading WordPress, the blog software that makes this site do its thing. The site may get scrambled, vanish, explode, or otherwise fail to do what you want until I get the new version running again.

LATER: All done. Looks like it worked. Cool.

We now return you to your regularly scheduled… um… whatever it is we do here.

 


 
 

Terrain: Source Code

By Shamus Posted Saturday Feb 25, 2006

Filed under: Programming 17 comments

For those of you who expressed interest in the source for the terrain project, I am making it available for download. Some people suggested I release it under the GPL, but I’m not going to do anything that formal. I’m releasing it under the “as is” system, where you take it, study it, use it, and see what you can do with it. I do request that if you make use of it you give credit. It’s your conscience, though.

Download Terrain Project (4.3mb)

The project is a Microsoft Visual Studio 6.0 project. I tried to keep the windows-centric code all in one place to make it easier to port to other platforms, although I’ve never tried to port anything so I don’t make any claim as to how easy it would be.

I know at the very beginning I said this was all new code from scratch, but there are actually a number of helper modules I wrote some time ago that I need to mention. The gl* files (glVector.cpp, glMatrix, glBbox, etc) has code that I use in ALL my OpenGL projects. It has stuff for calculating dot products, reflection vectors, manipulating rgba color values, adding vectors together, interpolating values, and a bunch of other stuff that you just need when working with OpenGL. I’m pretty fond of this code. In a lot of ways I think these are worth a lot more than the terrain engine itself. This stuff is just key, and every programmer should have these tools on his or her bat-belt. I could have taken all of these and moved them into a seperate static library, I suppose. That might be a good move if you plan on working with the code for any length of time.

In regards to the rest of the code, I’ve tried to add comments and explain things as well as I could. If you have questions please post them in the comments on this post so I can avoid answering the same questions multiple times.

Also, I’ve included all of the textures I used in the project, but I should warn you that I got the textures via Google Image Search, so I don’t know who owns them. I didn’t even look. You ought to replace them if you plan to release the results of your work for the world to see.

For further reading, here are several Publications by Peter Lindstrom, who (as far as I can tell) is the one who came up with the triangulation technique I allude to in Terrain Part 2 . The one I read is the third from the top, “Terrain Simplification Simplified”. If you read the article (beware, it can be a bit heavy) you’ll see a lot of it focuses on terrain which is optimized every frame. This is different from my system, where I spend many frames on a single set of terrain polygons. Both systems have their merits. Mine is easier on the CPU, but is less than ideal if you plan to jump from one area of the terrain to another very quickly. Also, here is NeHe OpenGL, which is a great site that teaches OpenGL by example, with lots of tutorials and miles of source code.

And just to show that lots of people are into this sort of thing, here are some other more ambitious terrain projects:

Chunked LOD
Virtual Terrain Project

(Hat tip: This MeFi thread)

Good luck. I hope it’s useful to you.

 


 

Technorati

By Shamus Posted Friday Feb 24, 2006

Filed under: Rants 4 comments

What the heck? Yesterday one of the “top 100” blogs linked to my terrain project series. I’ve been watching the Technorati listing of this site, curious to see what sort of effect this would have and who would blog about the terrain project. (In 24 hours my rating hasn’t changed. Strange, but whatever.) Then I see this:

So that’s the problem. I haven’t updated my blog since 1970. That explains it. Geeze, you’d think that in the last 36 years someone would have linked me.

I signed up for Technorati so I could see when people linked to me. If someone is trying to start a conversation, it’s helpful if I know about it so I can respond here or in their own comments. If someone links me, I don’t want to ignore them. So far Technorati doesn’t seem to be working as intended. Metafilter linked me yesterday and Technorati didn’t notice. Someone had to tell me in my own comments. Mefi is a big site, how could Technorati miss it? How many other sites am I missing? If they miss MeFi, then lower traffic sites like Kaedrin Weblog, Chizumatic, and Tales of the Rampant Coyote aren’t going to register at all, and they are exactly the sort of sites I’m looking for.

Something like this needs to just work, or its useless. I was really into the idea when I joined, but every time I visit TechRa it has little ads for stuff like “Who are Joe Q. Policy Wonk‘s Favorite Blogs?” There are millions of blogs in the world and the whole thing seems to go out of its way to shine the spotlight on the top couple dozen. That doesn’t do anyone any good. I’m not doing politics here, which means the blogs that interest me are WAY down the list. I need to know who’s reading my stuff, and I don’t care what the popular kids are doing.

Trackbacks are flakey and prone to spam. Technorati is a buggy popularity contest. Is there some other way to know who’s linking you? Since I have my own domain name I can use the site log files, but sites will only show up if they send a noticable ammount of traffic my way. Again, small sites will get lost in the noise, and small sites are going to be the ones that most interest me.

This doesn’t seem like it should be so hard. Is there some tool or site that I’m missing?