Author Archives: Snake

A Full Month of Doings

I’ve been working on so much stuff lately that it’s hard to decide what to devote each day to. Of course, practically everyone I know doesn’t give a shit about the awesome stuff I do and rather I just jump into the rat race. But anyways, here’s an overview of what I’ve been working on…

Not long after my last post, I updated my mod for the Age of Empires 3 expansion The Asian Dynasties called Gatling Guns for All!. Previously, you could only use the mod with a specific unmodified version of TAD, but I wanted the mod to be usable by all versions of both The Asian Dynasties and The Warchiefs expansions even if they’ve been previously modded. Thus, I had to create an installer (similar to the one I did for Stalker) that would modify only the aspects of the game that I changed. Originally (as I did in the Stalker mod installer), I tried to use regular expressions to find the appropriate setting to change. However, being that the game data is stored as XML, Regex had problems matching certain XML formatting quirks. So, I moved to a query language that I’d never used before called XPath, which is basically XML hierarchy-aware Regex. Though getting some of the nodes in AOE3’s settings files to match was still tricky, XPath in .Net did the job perfectly.

When I went to package the new version of the mod, I actually found out that I had incorrectly archived an essential file in the wrong path in the first versions of the mod. Thus, nobody that downloaded it would have gotten the mod to work as intended :( . And only one person called me on it, though I thought he was a noob at first. But all has been rectified now.

Next, I started working on a script for this site that would color-code programming language syntax and elements so I can attach beautified code to some columns. The script uses a PEAR PHP library called Text_Highlighter to do the color-coding on the fly. However, at the moment, my part of the script still presents certain security risks that I will have to mitigate before it goes live.

news269

Lego Indiana Jones

That project was interrupted by a visit from Kaylen that turned into non-stop gaming in the form of Lego Indiana Jones 😉 . Although the game was littered with some annoying little bugs (having just been released), we did manage to get 100% completion. As most reviews have said, it wasn’t really as fun as Lego Star Wars–how can you beat lightsabers and the force? Though bazookas and bushes you can jump into come close.

The next week, following a concern from a user, I began working on a major new feature for Cursor Lock. Though not really having anything to do with multimonitor gaming, the feature is a natural progression of the existing code. It allows the user to select whether to lock the cursor into the current screen (what it did originally), the selected window, or the selected window interior (client area). Locking the cursor into the window interior is particularly useful for playing windowed 3D games. While I was at it, I decided to completely overhaul the setup GUI to be much more intuitive, separating the selection of the different modes with pretty, graphical buttons. It’s looking rather nice already and should only take a few more days of testing and fixing bugs until public release.

Last week, I got distracted when randomly deciding to replay Deus Ex: Invisible War and then subsequently desiring to mod out some of the major flaws in the game. Only a few changes would make the game much more palatable to the PC fanbase. One of the mod ideas I had was to combine the various proximity and thrown variants of grenades (EMP, scrambler, gas, and concussion), which would return the grenades to their vanilla Deus Ex functionality and give the player a lot more inventory space. So apparently, the developer of Deus Ex, Ion Storm, only decided to release the Thief: Deadly Shadows editor and not the Invisible War one, even though the games were made concurrently on the same engine (Unreal Warfare). I tried for days to get the Thief editor to work for Invisible War, but I don’t see it ever working out easily; there are far too many hardcoded elements of the games in both the editor and the game executables. The best I could do was to get the DX2 packages to load in the Thief editor after it had loaded the core Thief packages first. Then, I could get the DX2 packages to save after some simple modifications, but that made it so there were both Thief and DX2 classes mixed together, making a good number of DX2 objects break ingame (e.g. inventory, particle emitters). In other words: Epic Fail. 😕

However, while I was poking around in Invisible War’s resources, I found the plaintext files containing the secret area’s developer quotes. I decided it’d make a good contribution to my Deus Ex column, despite not being from vanilla Deus Ex. Then, whilst I was formatting the quotes for HTML, I got the crazy notion of using the game’s font for the text. Unfortunately, the font was not in a TrueType or comparable format, but rather it was merely a texture and an accompanying text file (DX2_FONT.cel) of comma-delimited texture character widths (in pixels) that were ordered corresponding to their ASCII value. The texture character height was understood to be 23 pixels, so that a width of -1 in the text file meant to go to the next row. Using a quickly thrown together program, I turned the width values into a Paint Shop Pro script (macro) that would cut out all the characters into individual bitmaps. Finally, I manually pasted them into a font editor to complete the conversion. The font can be downloaded here, and then can be tested on the aforementioned DX2 quotes page.

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

Keeping Busy

Posts have been slow to come lately, but of course, this doesn’t mean I haven’t been working on anything. In addition, school just ended at the beginning of the month–this time for good, or so I think. I haven’t actually gotten my diploma in the mail yet. But, I’m pretty sure I graduated.

And now I’m being bombarded with queries about what, when, and where I’m going to get a job. So far, I’ve taken a passive approach to finding employment and, even with that minimal effort, have had a couple offers already. I think once I decide I’ve rested enough and start looking in earnest, I won’t have much trouble finding a great job.

Naturally, now that I’m done with school, I have a bunch of academic papers that I’m wanting to add to the site. Previously, I would just upload a Word “Web Page” version of papers, link them, write a little blurb, and that’d be it. However, I’ve grown weary of the full-frame white document backgrounds of all my uploaded papers and the disconnected feeling it brings to the site’s style. At first, I went about rectifying this with another PHP script where you pass in an ID for a particular paper listed in a database. However, I ran into a snag with this method because Word always exports Web Page image paths (and also <a name> internal links) relative to the document, and the script’s path would differ. My first fix was a client-side workaround using the <base href> tag which forces a document’s path to whatever you want. This worked decently enough, but of course, you can never be too sure of client-side support for a rather obscure tag (though FF2 and IE6 did seem to support it). My final fix was to “include” the wrapper script in the document itself (thereby eliminating the need for the aforementioned fix), obtaining the calling document using the $SCRIPT_NAME environmental variable. From there, the wrapper script reads the calling document’s title, url, body contents, and style contents, outputting them where necessary and giving the page a clean, stylized, embedded document look.

So far, I’ve only applied the wrapper script to some of the existing academic papers. This is taking longer than it sounds because I’m having to redo the Web Page export from Word. Apparently, in Word 2003, there is an option to export a “Filtered” Web Page, which removes all the Word-specific markup and reduces the file size by about 4KB + 10% of the overall size. I’m also doing more robust linking, both internal and external to the document. It should be fairly impressive once everything, previously existing and new, has been updated and linked into databases–I’ve even got some source code to put in this time around.

I’ve been working on the Company of Heroes map mentioned last time some more. I haven’t made a lot of progress, but nevertheless, I’m almost done with the playable area of the map. Beyond the playable area is the “out of bounds” (OOB) area, which is mainly just for making the map setting look realistic and “not like a table-top” so they say. It’s basically the same idea as my wrapper script, smoothing out the differences between the playable area and the surrounding environment. The OOB won’t take nearly as long to construct as the playable area has, though, because it will mostly be low-poly pine tree groves and the stream and road rolling off into the distance. Anyways, here’s a screenshot of the area I have been working on lately–a raided German AA site. It looks a bit stylized because I’ve been playing around with filters for the final version’s loading screen.

news268

In other news, I did my first No-DVD crack for a game last week. Of course, I can’t give any more information about availability of the crack or what game it was for. But still, it’s a notably L33T personal achievement and a stepping stone in my learning assembler (or disassembler rather) through practical uses. Previously, I’ve already done a bug fix for a game in assembler and a mod for a game in pseudo-assembler. Besides a thorough disassembler (like IDA), I’ve learned the best tools are NOP (No Operation) and JMP (Jump) to either “comment out operations” or make conditional statements (various forms of Jump If) always or never take the jump. Even though I love this kind of reverse engineering programming/troubleshooting, sifting through millions of lines of assembler code takes a lot out of a person, and thus I don’t expect to be doing a lot of it in the near future.

Posted in Academics, Modding, Troubleshooting, Website | Tagged , , , | Leave a comment

Killing Fields

Regretfully, it’s been more than a month since my last post. Mainly, I just haven’t found the time, which is funny considering I only have classes three days a week this semester. Some of the reason for my lessened time is that I’ve been working on a new Company of Heroes map/scenario. You may recall about this time last year, I was dabbling in making a map based on my university. That map was doomed from the start because it was too large, and the gameplay suffered as a result of building scaling issues.

Thankfully, my new map is very small, so I may actually finish it. It was inspired while I was playing through the Panzer Elite campaign of the COH expansion pack, Opposing Fronts. One map called Best (after a town in Holland) has an expansive pine forest area littered with makeshift fortifications and the occasional burning tree/scorched earth. I found it made for very intense combat weaving through the trees and defenses. Perhaps I just wanted an excuse to play around with the World Builder again, but the burning pine forest was the early inspiration.

    The main physical features of my map include:

  • A stream that divides the two players’ halves of the map
  • A road that runs perpendicular to the stream, crossing it with a simple earth and stone bridge
  • A small church with adjacent parking lot and graveyard
  • Farmland where the axis base is
  • The rest of the map is all pine forest with some clearings for the various control points and existing defenses.

Obviously, the bridge over the stream is the major chokepoint; however, the stream is shallow enough to allow crossing at any point. The resource control points are arranged so that advancement will take considerable time (i.e. there is little fuel). Unless one chooses a doctrine that has tank reinforcements, it’s unlikely the game will take long enough to see tank combat. The map focuses on infantry combat, as tanks are difficult to move through the forests and the one road is easy to defend. The choice of doctrines, units, and strategies is immensely important in this small map as the room for error is minimal.

Of course, I am equally concerned with the visual appeal of the map. For each of the 11 sectors, I have gone through the laborious task of adjusting the heightmap through coarse and fine brushes, painting the various terrain tiles, adding decorative and defensive 3D objects, laying out texture splines for paths and edging, placing splats (basically texture patches) to reduce terrain texture redundancy, and finally placing grass (where applicable). I’ve even gone through the trouble of creating time passage through environmental changes (mainly lighting, fog, and sky adjustments). I’m hoping all this work is producing a believable world for the player that is nearly on par with Relic’s (the developer) maps. I’ve noticed many COH mappers don’t even bother placing much more than roads, buildings, other 3D objects, and the necessary control points and HQ.

However, while I was mapping one day over spring break, a most unfortunate tragedy occurred. Our newest kitty addition to the family, “Crush”, was killed in the street. I had trouble not being overcome by flashbacks for a while. I had to watch helplessly as he died when only three hours prior, we had cuddled up for a nap together. A sweeter, more lovable kitty I have never known. As such, I will dedicate this map to him, and in it, I have composed a digital grave for him to cat-nap forever.

Posted in Modding | Tagged , | Leave a comment

Snake gets nostalgic with the new Blog Archive

Over the weekend, I finally got around to coding the new blog archive. As one can see, it displays a list of the most popular tags in one table and a calendar broken down into years and months in another. This is, of course, leaps and bounds better than Coranto’s single column list of months, which was getting absurdly long.

This was the first page in a while that required me to start from mostly scratch. Although the style is similar to the rest of the site, the design is different. Before I even touched the code, though, I had to make sure my design would work. One of the key features of the design is something I’ve used before and been quite pleased with: adjustable numbers of columns for different frame widths (i.e. from different resolution monitors). It uses a bit of JavaScript to calculate the optimum number of columns and then reloads the page to pass in the number; then, the page’s script adjusts the tables accordingly. The code consisted of two major tasks: loading the data into an acceptable format and then outputting with HTML formatting. Instead of doing a lot of SQL queries, I decided it was more efficient to just parse post dates and store them in a multidimensional array of years, months, and posts. Finally, outputting merely requires array traversal with some iterative control structures, printing HTML as you go. It loads surprisingly fast for the amount of data it handles.

news258Since then, I’ve been reading back over old posts to fill out the tags–understandably, the popular tags list looks more impressive when there’s something there. One side effect, though, is that it’s making me rather nostalgic. It’s actually quite interesting seeing the number of posts …my life splayed out over time; it puts things in perspective. One may notice the two large voids in posting around summer 2000 and March 03 to May 04. Although there’s not many posts to go by, these were actually the most satisfying times in my life–they were so great, I couldn’t even be bothered with posting (that and Danky broke the news system in 2003).

news256In early 2000, Loogie and I started getting into our first online gaming experience with Team Fortress Classic. We played so much that in May we started our own clan, S&L. We spent many a night honing our skills with clanmates against our arch-nemesis, the CDD clan. And although we kept playing TFC for years, nothing quite lived up to that first summer.

In March of 2003, I started dating Beckie, my first girlfriend. Things were fast and crazy around that time (graduating high school and all) and I scored. There were so many awesome and horrible feelings and situations that it was an orgy of senses and emotions. But it got boring after a while and would never again live up to the first few months.

But what I’m trying to get at here is that our first real experience with some amazing social ventures, like dating or online gaming, may just be the most gratifying times of our lives in retrospect. I’m not even sure if timing or the persons or places (games) involved make that much difference to this fact, just that it is our first time. I also don’t believe that there’s any moral to this story; I just hope that if you took the time to read this, maybe it has attuned your sensitivity to memories of such things.

Perhaps these feelings may make us slaves to the memories of our former selves, always trying to recapture our best times. While this may be true in part for me, it’s also given me a need to sample as many things as possible (within comfortable limits, of course) to find my next great first. (Maybe I won’t even know I’ve had one until I look back.) Though, I’ve always been bitter that my first relationship got in the way of my one true love: computing. I know some of this sounds bad for my current girlfriend, but I want to assure her that she’s my number two. Hmm…no, lemme try again: You’re my favorite person in the world, Kaylen.

Sorry I got all personal on this post. I’ll try not to let it happen again. 😉

Posted in Programming, Website | Tagged | Leave a comment

Fixing a Playstation 2

(This post was originally part of the previous one, but I felt that it was too long and two separate topics.)

Here’s an example of a project that I couldn’t post on until it was resolved. Over winter break, Kaylen decided to open up her Playstation 2 and blow on the DVD drive lens to fix read errors. Even though she was following an Internet guide, something happened that made the PS2 unable to power on when reassembled. So I told her not to worry because I would fix it when we were next together–even though I’d never even seen a PS2 up close before.

Initial speculation on the power problem was the awkwardly positioned power and eject buttons and cable which Kaylen had torn out from the mainboard upon first opening the case. We tried numerous ways of repositioning the cable into its connector and the red standby light would come on but not the green power light. I’m not sure if I was driven more by the need to troubleshoot the device or just take it apart, but I proceeded with further disassembly so that I could test the power supply fuse and current. Although there was a mishap with shorting some AC power, the fuse and current tested fine.

At this point, I was stumped as most of the “ultimate PS2 repair” guides dealt mostly with disc read errors and I couldn’t even get it to turn on. After hunting around on Google for a while, I came up with an awesome find, though…an official PS2 service manual complete with exploded views, detailed electrical schematics, block diagrams of the architecture, printed wiring board diagrams, parts lists, and even a disassembly guide. This thing was so detailed that it even had the functions of the individual pins on the ICs labeled; you could practically build your own PS2 with this manual in hand. (I put together a collection of all the manuals and guides I used with restrictions removed here. Hope they can help someone, but shhh…don’t tell anybody.) I used this to further test some of the possible problems such as all the fuses on the mainboard, the power supply output (the pinout is 12V, 12V, GND, GND by the way), and even the circuitry for the power button and cable–all were fine.

Defeated, I started putting the PS2 back together. Then, I noticed a small, transparent blue sheet of plastic that must have fallen out of the casing at some point during disassembly. Its width was exactly the same as the power button cable. Without a second thought, I shoved it into the connector with the cable and turned on the power supply. And wouldn’t you know it, when I hit the power button, it turned green and the console started to boot. It was this stupid piece of plastic that Kaylen must have dropped into the case all along. Oh well, at least I took the whole thing apart and didn’t break it–quite an achievement. Although, there were a couple screws left over after reassembly.

Even after it was running again, the disc read errors remained. I tried adjusting the tray alignment knob for hours, which had audio CDs and video DVDs working, but not game DVDs. Ultimately, all it took was cleaning the lens thoroughly with some rubbing alcohol and a Q-tip. Now Kaylen can get her dance dance dance on. I hear she’s “not an ordinary fella”.

And the moral of this story? Clean the fucking lens with a commercial cleaner disc first.

Posted in Troubleshooting | Tagged | Leave a comment

Okay, so it’s a blog.

It’s been difficult for me to admit that this is a “blog” instead of “news”, because I’m never one to follow the crowd. But I finally gave into the blog fad for a few reasons: I’m not a real company with formal news releases, I’m the only person that contributes to this site now, and people can identify with the term “blog” better.

And with the name change comes a new blog system powered by the usual PHP + MySQL and made by yours truly. So far I’ve converted the old delimited plaintext file from Coranto (an increasingly dead Perl CMS) to a SQL-type database and made a blog viewer script (cunningly named blog.php). The script takes in a number of parameters that allow one to view by specific post ID, month and year (used for archives), tag, or all posts, each with the typical page navigation controls. I still need to code the archive script and make a backend for myself, though. Here’s a list of the specific advantages I hope to gain by switching from Coranto to my own blog script.

  • Less code bloat from too many user options
  • Incremental integers for post IDs are more user-friendly than Coranto’s random string of 18 characters
  • Tagging offers an alternative method to categorize posts
  • Better display of monthly archive links
  • Custom backend will make it easier to integrate HTML into posts
  • Possibility for parsing posts before display
  • Included in the weekly SQL email backup
  • Better searching possible

While I’m on the subject of blogging, I figure I should go over my unique philosophy on it. As you may have noticed, I try to post at least once a month, lest I forget what’s been going on. I do a lot of projects in a month, so inevitably some of the smaller ones get lost in time and memory if I don’t post frequently. I could solve this dilemma some by just making smaller posts more often, but the problem with that is I’m picky. I like to have a topic fully fleshed out or even resolved before I post on it. Thus unless I do one big project contiguously (such as in my last post on overclocking), I will inevitably have a lot of variably-sized projects occurring intermittently.

Posted in Website | Leave a comment