Author Archives: Snake

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

Half-Life:Source

I’d been interested in trying out Half-Life: Source ever since I first heard about it. But I kept hearing that the changes were so minimal that it wasn’t worth it. Well, I recently got it anyways and decided I would clear up all the changes that it does and doesn’t make. Most of them are inherent to the engine as you will see.

news226

Water

Water
You can’t deny that the new water looks fabulous compared to the original’s.

news227

Reflections and Lights

Reflections and Lights
Pools of water look nicer thanks to some cubemap reflections. The lighting is also crisper and more realistic, casting shadows from objects.

news228

Fire and Smoke

Fire and Smoke
These effects are volumetric and thus more realistic looking than the sprite ones from Half-Life. Also notice that small fires are appearing on the tentacles; although not common, objects can burn now.

news229

Physics (Buoyancy)

Physics (Buoyancy)
Valve just couldn’t stand it. They couldn’t let this scripted buoyancy puzzle from the original game alone and replaced it with the familiar HL2 cage with blue barrels one.

news230

Physics (Non-Rigid Chains)

Physics (Non-Rigid Chains)
All the game’s ropes are replaced with non-rigid ones that twist and sway realistically.

news231

Ragdolls and Blood Decals

Ragdolls and Blood Decals
All models will ragdoll when dead. When shot, they place high-resolution blood spatter decals on the walls. Notice here that the scientist on the left was placed dead into the game, but the other was killed during play, ragdolling and creating hi-res blood spatter. Hi-res bullet hole decals can also be seen.

news232

Model Blood Decals

Model Blood Decals
When shot, models get blood decals placed on them–something not even possible in the original game’s engine.

news233Even with all these engine changes, the fact remains that all the textures and models are the same lo-res, lo-poly versions from the original game. It would have been really nice to see some crisp, high-resolution textures made. It’d only take a small group of artists less than a year. They wouldn’t even have to change the map’s geometry and it would have looked so much better. However, there have been some attempts are upping the quality of HL:S textures and models. One in particular called High Definition Source stands out. All of the weapons, most of the character models, and many textures have been redone, making it slightly more visually appealing than before. I tried putting Half-Life 2 models into HL:S, but they don’t work right, of course. The animations are missing, so they just kind of stand around and look pretty (see the screenshot at right).

There are also changes that you can’t see–changes to the audio system. Half-Life used a fairly early implementation of surround sound APIs in the form of Aureal3D or EAX. And while they sounded pretty awesome back in the day, now they’re noticeably flawed mainly because of their use of preset audio zones. You’d walk into a new zone, and instantly, the sound is transformed differently. In HL:S, the reverberations are smooth and not overdone. The surround sound is also smoother; sounds don’t jump from one speaker to the next. Like the game’s textures, the majority of sounds were not improved. Although, some were actually replaced, such as physics and door sounds. The music was converted to 128kbps MP3, which sounds very good, but will stop playing upon the frequent level loads.

I’d recommend Half-Life:Source if you were a big fan of Half-Life or have never played it. Otherwise, it is rather underwhelming. I still enjoyed it, though, and am now looking forward to how it should have been done with the community mod Black Mesa.

Posted in Gaming | Tagged | Leave a comment

Snake fixes his video card.

Recently, I’ve been noticing increased GPU temperatures on my Radeon 9600 XT courtesy of ATITool and MBM. At idle, the GPU was already up to 140°F. At first, I just shook it off as a fluke or an overcompensation as I wasn’t seeing any real issues or graphical corruption. Looking back, I realize that the reason I hadn’t been seeing any problems was the games I (and Kaylen) had been playing: GTA3 (6 year old game), Alice (7 year old game), and Project64 (based off of 11 year old technology). None of these games even take advantage of some of the three year old technologies on my video card; so it wasn’t being stressed enough to fail.

Then I decided to play Dark Messiah since it’d been out long enough to get passed its initial release stability problems; I never had any problems with the demo version either. But once I got through the training mission, my system just locked up completely. I restarted and checked the BIOS hardware monitors and everything looked acceptable. Suspecting something else, I started playing again with the MBM dashboard open on the secondary monitor. When the system locked again almost immediately, I looked at the dashboard to see an insane 240°F (115°C) for the GPU core temperature–well beyond the boiling point for water. I was surprised to see it get that high before failing.

At this point, I acknowledged that the excessive temperatures reported indicated some cooling problems with the video card. I removed the card from the system so that I could get at the cooling apparatus better; and sure enough, there were some large chunks of dust clogging up several of the fins on the sides. I felt that the amount of dust was even capable of slowing the fan down enough for failure. After cleaning and replacing the card into the motherboard, I booted up and checked the temperatures–still ~140°F at idle. To see if there was any sort of improvement, I tried the “fuzzy spinning cube” stress test of ATITool. It got up to and then leveled out at 219°F, locking after a few minutes. There was still something wrong; however, cleaning the dust chunks out of the heatsink did seem to alleviate some of the heat stagnation.

news218

Testing the fan with a battery after oiling.

I let the system POST and then went into the BIOS so I could poke around in the computer case while it was on. I positioned a mirror and flashlight so I could see the GPU HSF, and as I had expected, the fan was not spinning at all. I took the card out again and moved it to the kitchen table so I could work on it. I removed the HSF from the GPU and then slid the wires out of the fan power connector. I was going to test the fan with some battery power; however I didn’t know what voltage the fan normally took. But I figured 9V was probably a safe bet and easiest to test with. I laid the exposed fan wires on the battery terminals and nothing happened. It was looking like the fan might just be burnt out and I would need to order a replacement, but I had one more trick up my sleeve.

news219

Curiously enough, the chip appears to say Radeon 9570 XT instead of 9600 XT.

As Kaylen looked on in amazement, I removed the sticker on top of the fan to reveal the mechanical access hole. As you may know, a couple drops of household oil into a ball-bearing fan can bring it back to top speed or even quiet it down. So, that’s what I did, followed by manually spinning the blades until the motion felt smooth. As you can probably guess, the fan buzzed right up. While I was at it (and because I had made a mess of what was already there), I replaced the questionable thermal compound that was used previously between the core and the HSF. It was a silver material, but not necessarily comparable to the quality of the Arctic Silver I replaced it with. Kaylen had fun snapping pictures while I did this. You can see them below.

And after I put everything back together, I did get to play Dark Messiah for five hours without any problems. It’s actually a lot better game than some of the reviews made it out to be. It reminds me of a cross between Enclave and Thief 3–the former for the combat style and the latter for the atmosphere. However, I will admit that the overabundance of convenient environmental traps to kick or cut detracts from the realism. But at the same time…fuck it, the game is still fun.

Posted in Gaming, Hardware, Troubleshooting | Tagged | Leave a comment

GTA3 Modding and Stuff

The day after my last post on Stalker, I finally realized that Stalker sucks. It has a good design but was poorly executed. I came to that conclusion upon getting to the final “level” (should be called an area, but their shoddy translation rears its head again) in which you have to rush through the outer perimeter of the Chernobyl Power Plant in about six minutes before the reactor has a blowout. I wasn’t even told that I had to do everything before the blowout, so my play style dictated that I creep around and then hunker down until the blowout was over; but here’s the thing: it never ends. When I looked it up on the forums and saw that was the case, I just threw in the towel. I had enough of this game and its half-assed gameplay. I only wanted to play it because people related it to Deus Ex repeatedly. But no, it isn’t like Deus Ex; it wishes it was like Deus Ex.

So I was trying to decide what game I would partake in next, and as you could guess from this post’s title, I chose Grand Theft Auto 3. I had only played this game through once before back in 2003. But when I remembered how irritating the gangs were in that game, I grew more uneasy about playing it again. I recalled quite specifically a quote from my (late) blog on January 1, 2003:

… Then I played GTA3 for the rest of the day…or..er..night and early morning. I have 58 of the 100 secret packages, and that armor at my hideout for getting package 50 is going to help a whole lot. I finally did beat the Turismo mission, although I had to cheat to win after about 40 more attempts to win. I had to use the time slow cheat so I could see dangers and react more quickly. The problem wasn’t speed, because I had a Stinger from Staunton Island, but the fucking car blowing up. Once, I was so fucking close to winning, I was on the home stretch with nothing in front of me and could see the final waypoint. Then, because I was in Chinatown, a Triad member shot my car and it was enough to set it over the edge and start burning. I kept going but it blew up within feet of the win. I streamed obscenities for about five minutes and woke up the parents. Usually, though, it was a shotgun-wielding Mafia member that set my car ablaze. When I slowed it down, I made sure to run them over or block their view with another car. It’s too bad I had to cheat, but it wasn’t anything too drastic, only a speed change, so I could react in time. It’s impossible to complete missions in Portland now, though, because all the gangs hate me. I only go back for secret package hunts, now.

news217

The code to my GTA3 mod.

Knowing the gangs would ruin my gaming experience, I looked around the GTA3\data directory for a config file that handled gang weapons. After I didn’t find anything in the plain-text config files, I suspected the main.scm file handled such attributes. Just from my observations of the file in UltraEdit, it appeared to be a structured scripting language. After a few Google queries, I came up with a very nice program called Barton Waterduck’s Mission Builder that can decompile the script file. Of course, as with any decompiler, you can only get it back into an “assembler-like” format; all control structures except jumps are lost. But I was at home with the code in only a few hours, having successfully implanted some code to change the gang weapons when in mid-game (you can see that code in the screenshot at right). Naturally, I tooled up the mod to work with the game’s story changes so I could release it to the public. Information on the final product can be found here.

Posted in Gaming, Modding | 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

Things and Stuff

This is going to be a rather random post–just a list of some of the cooler things I’ve been up to. I’ve been noticing how this feels more and more like a blog, but I do try to keep the personal details out of it. I don’t think anyone (maybe Kaylen) cares what I had for dinner last night (Pork Lo Mein), what I last watched on TV (CNN), or when I stumbled out of bed today (3PM).

Since the spring semester of college was over a couple weeks ago (one A, two B’s, and a C), Kaylen and I finally got a chance to go camping. Her school, UVA, is only 30 minutes from the lovely Shenandoah National Park, so we went there and stayed at a centrally-located campground called Lewis Mountain. It was a decent campground (well-maintained), albeit pricey (want a 10 minute shower? 2 bucks). It was surprisingly popular, too; most days there were almost no free spots by the evening. I enjoyed making fires and gathering firewood so we could cook the food, but the low abundance of good wood meant short-lived fires. The second day, we went hiking on a trail called White Oak Canyon, but alas we turned around not far from the actual falls and only saw cascades; we’ll be sure to carry trail maps in the future. I’ve uploaded most of the pictures we took (including some impressive panoramas) to the photo album in this directory.

news215

I said "Don't you like popsicles?"

When we got back home, I uncovered a set of popsicle makers in the basement. Kaylen and I had much fun trying out different frozen snacks such as Dr. Pepper, Code Red, apple juice, orange juice, pudding, and raspberry snowcone syrup. The only problem is the amount of water in the substances. Many of the drinks just have too much water; causing mostly ice crystals and little flavor. So we tried experimenting with reducing the water by heating the beverage on the stove; it works perfectly for sodas. About half syrup and half water is the best blend. Delicious.

With my new time off, I’ve been back to work on several things, of course. I dabbled with the code to my as-of-yet-unreleased alarm program some a few days ago, mainly touching on a few bugs and missing features (buttons that go to nowhere). It’s been a little hard going back to it since I haven’t really looked at the code much since last summer (it’s a shame); I’m wishing now that I had commented the code more. But with any luck, I might be able to finally get the few kinks out of it and release it publicly, maybe even to some download sites. The reason I only gave it out to a select few beta testers previously is that it was proving to be unreliable in a few rare instances, and an alarm that’s unreliable is no good.

But for the last few days, I’ve been putting together a new column on PC air cooling. I took some logs from MBM and turned the data into some pretty graphs in Excel and then analyzed the results. It’s mostly just neat to see how the temperatures interact to certain events, as my conclusions are pretty obvious for any computer professional. You can find it here.

As for entertainment, I’ve been getting back into Rise of Nations after being disappointed with Stalker’s linear, buggy gameplay. I finally finished Alexander the Great’s campaign for the first time and now I’ve moved on to a mod version of the Entire World (Baryonyx’s Extended mod). This could be good news for anyone still playing RoN as I may get into making some more scripts and improvements to my ScriptMaker, as well as finally releasing my map pack mod.

I’ve also been having some fun with the new Sam & Max season. I tried playing some adventure games before, but just couldn’t get into all the walking around and trying every combination of things to progress the story. With Sam & Max, either the puzzles are easier than they used to be or I’m just more intelligent enough to figure them out now. Either way, it’s an amusing little game that I can’t get enough of.

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