Author Archives: Snake

File Lister and Company of Heroes

A new version of File Lister is in beta now. I’ve been repeatedly finding it useful both at home and at work, so I figured it was the most deserving of an update. Besides a few bug fixes, there are also performance improvements, some more regex matching options, and the addition of counters and regex capturing groups in the output format. I’m hoping to release a final version within the next month. And this next release may not even be the end of the updates to File Lister as I’m also looking at adding features like command line modes in the future.

news301

Hurtgen Forest at night

I’m also trying my hardest to get my Company of Heroes map finally done (damn me and my perfectionism!), even if there’s no one around to play it anymore. It’s just too good and too close to completion to let it go unfinished. There’s just 1/8th of the playable area left to create and some of the out-of-bounds yet to be filled with trees–it really shouldn’t take but another concerted effort of a weekend.

And I’ve finally decided on a name for the map: “Hurtgen Forest“. Since my map is pretty much a fictional setting, I didn’t want to be too specific with the location. Though, I had always considered that it would probably be named after some area in Belgium or northwest Germany.

Posted in Miscellaneous | Tagged , , , | Leave a comment

Using Cursor Lock with Steam Games

See updated instructions for 2021.

I often notice people coming to my site from search queries asking how to use my program Cursor Lock. Of course, Cursor Lock comes with plenty of documentation for most users’ needs. I think most of those people are either noobs that can’t find the documentation, or they want Cursor Lock to do something it doesn’t actually do.

Anyways, there is one circumstance where I haven’t documented how to use Cursor Lock, mostly because I only just realized it myself. However, it can be rather tricky, so here’s how to lock games that must be launched with Steam. These instruction will work for the new version that just came out on April 26 and the previous version.

  1. Open Steam and go to your list of games.
  2. Right-click on the game in question and select “Create Desktop Shortcut”.
  3. Find the shortcut on the desktop and right-click to examine its “Properties”.
  4. For the new version of Steam, look at the “Web Document” tab and then the “URL” box. For the old version, look at the “Shortcut” tab and then the “Target” box. Copy the 5 digit number you see there.
  5. Open Cursor Lock Setup.
  6. Select “Open Program” and then find the path to the Steam executable, usually it will be something like C:\Program Files\Valve\Steam\Steam.exe
  7. Select “Open Program Args” and put in -applaunch xxxxx where xxxxx is the 5-digit number you copied earlier.
  8. Select “Lock Program” and then find the path to the game’s main executable–this would be what one would usually set as the “Open Program” when Steam isn’t involved. If you don’t know where it is, you should start looking under C:\Program Files\Valve\Steam\SteamApps\. You can also use Task Manager to help you find the executable name when the game is running.
  9. You’re done! Hit the “Create Shortcut” button to create a permanent shortcut to the game with Cursor Lock.
news300

Using Cursor Lock with Steam Games

Posted in Gaming | Tagged , | 51 Comments

Gaming Habits

Going to try to do a less epic blog post today. Realizing more and more that I just don’t have it in me to work on the site much anymore–stupid day job.

I just updated my mods for Diablo 2 to support patch 1.13. Really there wasn’t much difference between 1.12 and 1.13 as far as the modded files were concerned, but I diligently checked all the files regardless. Only the Balance Better Drops Mod needs to be updated to work with 1.13, although I’m betting it’ll probably work fine regardless as the changes were so slight. Find the mods here.

Also on game mods, I did a small mod (more of a hack really) for Tropico 3 a couple months ago that lets you put your own music into the game. The hardest bit was decompiling the compiled LUA code that controlled what music files could be played (a playlist), which I did by hand since no existing decompilers worked. Then I wrote my own LUA script to load whatever music I wanted and modded the LUA compiler to make Tropico-compatible compiled LUA files. You can find all the hot details of the efforts on this thread of the official Tropico 3 forum, and a guide written by another member that sums up my process on this thread.

news299

Lego Batman Complete

While I’m on gaming, I’ll just go through what I’ve been playing recently. Obviously, the girlfriend and I are playing Diablo 2 coop again. In between that, I’m back to trying to beat The Witcher (Enhanced Edition this time). I also replayed Halo (action is still good, but shorter and uglier than I remembered), Titan Quest with Kaylen, and Startopia. Fallout 3 ruled December, except for the part of winter break where Kaylen and I got 100% on Lego Batman (screenshot at right).

Posted in Gaming, Modding | Tagged | Leave a comment

Work Grinder

Obviously, I haven’t blogged in a while. It’s been so much longer than my usual lapse that one may have even feared the worst. Well, it’s close enough–I became employed. Indeed, forty hours a week (plus twenty more in support of it), I work at my alma mater’s library handling anything decidedly too technical for my 25 coworkers. I enjoy the tasks of my job; they stay pretty varied, so I never get bored. I’ve been working with WordPress, PHP, streaming video (both Flash and Apple’s Darwin streaming servers), Apache, JavaScript and HTML DOM, plenty of graphics editing, and of course the usual HTML editing. Sometimes, I even have fun doing work. The people are all rather nice, too, albeit I have a difficult time connecting to most of them personally (considering the demographics of your typical librarian).

However, I resent all the hours that I have to put into my job and how it drains me physically and mentally such that I have no time for personal projects (i.e. everything on this site). On some weekdays, I’m too tired to even enjoy video gaming. And on the weekends, playing video games is all I can seem to do. Clearly, anyone counting on me to work on any of my mods or programs, should lose most of their hope now. Though, whenever I get contacted by users, it is enough to motivate some work. My only solace is that I don’t have to stay with this job forever.

But having money is pretty cool. 😉 I’ve never had more than a few hundred dollar in my whole life before I started working. Only two months into the job, I couldn’t stand it anymore and had to buy the parts for my new computer, Serpent 3 (hopefully, more on this in a future post soon). Also, it’s even more convenient buying and downloading games on Steam than it is to pirate them from Bittorrent. And it doesn’t hurt that I can afford to buy my girlfriend nice things now. Ah, money…I love you.

Posted in Website | Tagged | Leave a comment

Putting the Half-Life 2 G-Man into Half-Life: Source

I’ve been looking for an excuse to get into some Source Engine modding ever since Half-Life 2 came out; and sure, I’ve wanted to do my own total-conversion mod (who hasn’t?) but knew I lacked the attention span to do so. So, along comes Half-Life: Source, a straight port of Half-Life content into Half-Life 2’s Source Engine. However, as I detailed in a post almost two years ago, Valve couldn’t even be bothered to do some decent textures or models for the port, despite them having most of the necessary materials already created for HL2.

This omission of graphical upgrade really irked me. At the time of the aforementioned post, I had even tried to copy the G-Man from Half-Life 2 into HL: Source, but alas the animations didn’t match up. Recently, I decided to go back through HL: Source again on a whim. Greeted with the same low-poly models and low-res textures as last time, I became more stalwart in my longing for high-quality graphics. I took another look at the G-Man to see how I might overcome his lack of vanilla Half-Life animations.

Continue reading

Posted in Gaming, Modding | Tagged | 4 Comments

We have explosive.

(i.e. Lightboxes)

I’ve been really into web development lately, especially anything requiring a lot of JavaScript control of the DOM and CSS control over layout and style. I’ve spent a solid week (at least) working on adding lightboxes to replace some of my lighter scripts: image viewing and downloads. I’ve been pretty fascinated by lightboxes ever since I saw them on addons.mozilla.org. The idea to actually employ one on this site didn’t come to me until I was doing the remake of the content system and thought it would be awesome to combine a lightbox with the ability to preview the contents of archives (rar and zip files).

Although there are tens if not hundreds of lightbox implementations, I felt like creating my own to avoid all the code bloat and because I’m that much of a control freak. The first hurdle was figuring out how the hell these other lightboxes could be triggered on the click of a link without navigating to the link URL immediately after the script finishes. Googling didn’t turn up any leads, but I eventually found out the answer by just reading the code comments of another lightbox. It’s simple and makes sense but isn’t obvious: the onclick function must return false. It kinda works like a message chain in Windows.

From there, I just kept chugging out JavaScript. On DOM readiness, the script adds onclick events to trigger the lightbox to any existing links to image or download pages. On click, the script does the appropriate HTTP request (AJAX) for the content to fill the lightbox. On request received, it puts the HTML into a lightbox container that automatically enlarges to fit content. Meanwhile, the script is fading in the obligatory black overlay; I chose to fade it in not only because it looks awesome but it also helps your eyes to adjust to change in light. It’s all a delicate ballet of scripting, but surprisingly IE performs quite well with it and only minimal hassles (e.g. filter: alpha(opacity=#); instead of opacity: #.#; for overlay opacity in CSS).

It didn’t stop with lightboxes, though. I’ve also been wanting for a while to have a display of the most recent uploaded images on the front page but was underwhelmed by the prospect of cramming only a few images on there. Then I got to thinking about how I might make a scrolling marquee for the images and realized it wasn’t too hard to code. You simply need an inner container for the images with position: relative and an outer container with overflow-x: hidden and on button script events move the inner container’s style.left property by negative the amount to scroll. Then, obviously, you have to do some code to detect the beginning and end of the marquee to keep it within bounds among other things. Quite snazzy.

I also made another slight change to front page (beyond adding the latest blogs). I was a little displeased by my method of finding the most popular content given that it merely sorts the database by the total downloads. Thus, it’s not at all responsive to changing trends. For example, if file A gets 1000 downloads over five years but not much recently, and file B has only 300 downloads over a couple months but gets several hits a day, then file B is obviously more popular than file A. The best solution to calculate what’s more popular would be to log all the hits for a day for every file and calculate popularity trends often, but that’s a logistical nightmare and too much hassle for this small site. However, I came up with a simple solution that requires only one new field in the database (last_dl_count) and a monthly cron job to do UPDATE `content` SET `last_dl_count`=`dl_count`;. Finally, I switched the front page popular query to the following:

SELECT `id`, `title`, `sshots`, `dl_count`, (`dl_count`-`last_dl_count`) as `delta_count` FROM `content` WHERE `type` = '$type' ORDER BY `delta_count` DESC, `dl_count` DESC LIMIT 2;

It works fairly well, except at the beginning of the next period after the update cron runs. Since all the deltas are 0, you get only the all-time popular again until someone downloads something.

Well, I think that’s enough web developer theory for now. However, I’d like to point out three academic columns I recently added. There’s one from Fortran Programming class with all my source code and most of my documentation. The second is on the Parallel Programming with PVM project I did last year, including a Flash slideshow (first mentioned here), presentation notes, and source code. The last is a paper I wrote on the Aspects of Overpopulation, a subject that greatly concerns me; too bad the class it was for was completely worthless.

Posted in Academics, Programming, Website | Tagged , , , | Leave a comment