Category Archives: Website

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

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

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

Links and Alarm

Links

First of all, you may notice that there is actually a link for the “Links” item in the nav. Over the past few days, I’ve been designing, coding, and adding the links themselves for this new links system. The building process was pretty similar to all the systems I’ve done so far, especially the Photo Album. I design the page in HTML first, so I can preview how tables and such will look and debug browser compatibility locally. Then I take this HTML page and convert it to server-side form, quantifying item HTML blocks with PHP loops and adding the necessary SQL queries. Somewhere in there, I create the database tables and start adding in records. This is pretty much how every system was built.

The links system is seemingly the most simple system I’ve built so far, but it’s actually a bit more complex. For one, the category (directory) hierarchy is not linked through paths like the Photo Album, but is linked by item IDs and parent category IDs (a tree). This makes sense because the category hierarchy is logical here, instead of being based on physical paths with the Photo Album. The advantage of this method is that items (links and categories alike) are not dependent on a whole chain of parent categories but merely the parent ID. This makes moving items, renaming items, and the MySQL queries easier. The disadvantage being that mapping the category paths is a recursive nightmare.

Another complex part of the links system is the feature that checks link status–whether or not the URL of the link is working. I’ve set it up so that every Friday morning (or when I run it manually), a script will request every link URL in the database. It then takes the HTTP response code from the requests and puts them into the database (this will appear as a popup tip for the link status), decrypting them into a brief OK, MOVED, or BROKEN status that appears for each link on the page. This seems to be working quite bitchin so far, except that FilePlanet always returns 403 Forbidden. I suspect that they filter out non-supported browsers through their default index this way.

Except for any bug-fixes that may pop up, the new links system is done. I’d recommend you comb through the more than fifty links already there; you may find something useful.

Snake’s Alarm

I put some more work into my alarm program before getting involved with the links business. Mainly, I’ve been working on improving the stability of the sound system. Luckily, FMOD handles all of the low-level loading, decoding, and outputting stuff for me, but I still have to implement when, what, and how it does its job. My original implementation of FMOD would crash whenever you tried to play two sounds at once. Because I didn’t want FMOD to hold onto some sound resources when alarms aren’t being played, it didn’t initialize until an alarm went off. Thus if two alarms happen to overlap, the second will indeed try to reinitialize the system, crashing it in the process.

I solved this problem by making a simple sound system stack. When the first sound is pushed onto the stack, the system initializes. When the last sound is popped, it closes. This fixes the problem with multiple sounds playing, but now I’m working on a problem when sounds end. I’ve traced this back to the fact that each sound alarm gets its own thread. My next big challenge will be bringing the different alarm threads together into one big sound system thread (with the stack). Easier said than done, but I will prevail!

I was also going to talk about my current gaming trends in this post, but I’ll save that for another time. In the meantime, here’s a rare picture of Kaylen and I out in the sun. Oh noes!

Kaylen and I catching some much-needed rays on the beach at Kiptopeke State Park.

Posted in Programming, Website | Tagged | Leave a comment

Stalker and Alarm Progress

A couple weeks ago, I started playing Stalker again to see if I could get into it. It’s a bit more palatable with the right assortment of mods but still buggy and not realizing its full potential. Although I’m not experiencing as many locks and crashes during play (since cleaning the computer out), I still get some crashes when loading games or exiting. I also started getting weird input hangs similar to the ones Titan Quest had. Fortunately, the fix was the same; just set the game to below normal priority in Task Manager. I think the problem is caused by a combination of my system and current game technologies and practices, as not all games have the same troubles.

But as I just mentioned, I had to use mods to plug up some of the gameplay holes in Stalker. Actually, I even did a small mod of my own. I found the hunger and starvation aspect of the game to be made an annoyance by the too-frequent need of opening your inventory and double-clicking some food. This gave me an excuse to write a program that can change the necessary hunger variables of an oft-modded game file without overwriting any previous modifications. Probably overkill for such a simple thing, but it’s still a lot more convenient. You can download it from here or a really awesome site for Stalker mods, FileFront. Additionally, I compiled a list earlier of all the game aspects that I thought needed improvement and have mods available to fix them:

  • lowered respawn-makes things repopulate the world less quickly (but apparently some areas continually respawn specific stalkers/creatures, like the industrial region on the way to Yantar). i haven’t actually found a mod to do this one yet, but information on how to can be found at this thread.
  • A-Life-allows the stalkers to move around more, improving the atmosphere by creating unique encounters
  • weather overhaul-you shouldn’t be able to not distinguish between night and day
  • remove annoying sounds like the nightvision loop or the npcs that repeat one phrase over and over
  • non-degrading armor-because it sucks having to throw away good armor that got trashed, unless you have…
  • repair mod-allowing you to keep your weapons (and armor) from getting worn out and jamming
  • detectors-locates anomalies and marks them on your minimap, so you don’t have to spend so much time later in the game watching for anomally effects
  • more realistic location damage-because a headshot should always drop um
  • extended loot mod-puts a wider range of goodies on bodies
  • increased weight limit-because it sucks only carrying around a couple large guns (albeit more realistic). i prefer a 150/200kg limit.
  • increased or no time limit on quests-it’s too difficult getting back in the same day to complete quests. i’d rather just wander around freely and choose when i want to do a quest.
  • increased flash light range-the original flashlight feels unrealistically short-range
  • real-world weapon names-i’m tired of games pussing out and making up weapon names (like CS does and then you have to mod every time an update comes out).
  • mp5/sawed-off/aksmu fitting in the pistol weapon slot-it’s pretty useless only having weak pistols in that slot all the time.
  • decreased stalker vision and perception-too much terminator vision going on here, and it’s hard to sneak up on them.
news216

June 2007 build

But I haven’t just been loafing around playing games all month. I’ve also made a lot of progress on my alarm program (cleverly named “Snake’s Alarm”), and a closed beta is in sight. I’m fairly certain that I’ve located the reliability bug that existed in earlier beta versions and have thus fixed it. There have been numerous other bug-fixes and changes, but also a lot of additions, such as: handling standby to either wake up the computer for an alarm or keep it awake for alarms; program settings are finally available with about ten useful user preferences; systray popups and message box actions available; multiple sound files for sound alarms; and integrated help documentation.

I just remembered that I also added a new feature to the image viewer pages here. It’s another little icon next to the “Break out of frames” one that will toggle between original image size and a size that will fit in the window. PHP finds a ratio of width to height for the image and then Javascript is used to find the window dimension and size the image according to the ratio. And because it’s just a ratio, you can resize the window to any dimension and it still works. Very nifty.

I also did a little work on a mod of Baryonyx’s Extended World CTW mod for Rise of Nations to make it an “Imperial” CTW. That is, only Gunpowder and Enlightenment age are available. I redid a few scenario scripts and was working on a new field battle scenario with large numbers of troops, moving in groups so they attack in lines. I’m not sure when I’ll finish this–maybe after I’m done with Stalker. Or the next time I spend a week at Kaylen‘s place with only my laptop.

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