Latest Blogs

Bash Script Expo #1

Print out all the processes with a certain file open.

Bash Script Expo #1 Screenshot

#!/bin/sh
for pid in `ps -eo pid=`; do
if `ls -l /proc/$pid/fd 2>-| awk '{print $10}' | grep -q "$@"`; then
ps -p $pid -o comm= -o pid=
fi
done


ps -eo pid= prints out all the process IDs. /proc/PID/fd contains the file descriptors of all the files opened by that process ID. ps -p $pid -o comm= -o pid= then prints out the process name and PID of that process. Simple as pie!

Viper Woes

I have a small blog post for ya, but it's mostly for my sake. I made some very stupid mistakes over the past week with Viper, and I wish to share them with you (and archive the solutions for when I inevitably make them again).

First off, I had this code to create ConCommands:

pCmd = new ConCommand(new_name, CommandCallback, new_help, flags);

It took me around three or four days to realize I wasn't registering pCmd. I slipped in META_REGCVAR(pCmd), and it works beautifully :D

Secondly, and lastly, I had consistency issues with paths. Windows is very annoying because it uses backslashes instead of forward slashes. This means that I have to escape every directory in a path. Thankfully, Python accepts both forward and back slashes in paths. However, a trie a does not. I had a lot of trouble determining why Viper couldn't recognize which plug-in called Register (that function finds the path of the script which called it, looks it up in the trie, then updates the plug-in's info). After a lot of searching, it finally dawned on me that the path entered into the trie and the path from Register were different. You can thank my shotty eyesight; I had printed out the two paths into the console and still couldn't see any differences for the longest time :P

Team Fortress 2

Lately, I've been playing Team Fortress 2 as if it were full of sexy women. There's many great things about it, but they land into 3 main categories: Visual elements, Gameplay elements, and Team elements.

The initial burst of excitement that came when I first got the beta of the game was the visual aspect of it. It looked very comical, making it feel less realistic. Some would argue that being realistic boosts the interest for the game, but this is the opposite. Because it doesn't adhere to the rules of realism, it can focus more on the gameplay, which brings me to the next point.

The point of the game is to win, as is the point in most games. To win in TF2, though, you either have to control all points or capture the flag a set amount of times. There are many mutations of these elements on each map, but the simplicity of the objectives makes the game easy to play for any newcomer, but can be complex enough for a veteran (Oh, there will be...)

None of the default maps handed out with the server are geared towards any one side, so it's up to the players on each team to make the difference. The catch is that in order to be constantly successfully, you need to be just as diverse in class selection. A heavy can take out many players, but is pretty much as useless as a pyro in water without a medic. But medics are worth nothing without another player there to heal and offer defense. A demoman needs another player with a long range weapon, because he'd bit shit out of luck with an enemy sniper. You get the point...

Anyways, all that just proves that teamwork is a critical part of succeeding. I'm a very teamwork-oriented person (Especially in the sack. Rawr!), which is just another way of saying I suck ass. Despite that, this game allows me to excel and actually help the other players by just being the background guy who thinks ahead. I tend to pick the engineer class and build up at the points next in line to be attacked. (Check out my stats here)

In order to conclude this piece of crap article, I'll say that TF2 is perfect for the thinking group of gamers, but still allows for the lone wolves. Thanks for reading; see you next time!

Call of Duty 4

CoD4 Logo
I got Call of Duty 4 (CoD4) the day it came out, and when I started playing it, I was amazed at how realistic it looked and felt. I have a PS3, so I was a bit disappointed that there weren't any Sixaxis features for it.

They introduced me ('Soap' MacTavish) to the controls of the game at a range on a USMC base. Picking up a clearly marked carbine from the table, I was instructed to look down the range. After being taught the basics of CoD4 aiming (I could generalize it as all CoD games...Yes, even CoD2 *gasp*), I got a secondary firearm -- An M9 Beretta. So I shot some targets, yada yada yada, shanked a watermelon, yada yada...

Next I proceeded to some warehouse/hangar thing where a group of SAS were standing, ridiculing my name :(

When I heard them bashing 'Soap', I had an urge to find out if I could hurt my own team, so I tried...I expected it, but you can't hurt a teammate when you have your crosshairs on them. Well, since I'm a crafty, person, I moved the crosshairs to the right of the soldier's body and jabbed him with my blade. I killed the bastard, but was reprimanded with a blurred screen and the message "Friendly fire will not be tolerated!"

With my glory and triumph pounded by the scolding, I trudged to a training facility some 10 feet away -- something like the MOUT Shoothouse from the America's Army training. I fast roped down, shot the plywood targets, ran down the stairs, hit another plywood mark, threw a flashbang, ran in, shot a couple more boards with faces, ran into another room, did the same, threw another flashbang, and killed the last wooden enemies. Once done -- In record speed! -- I sprinted out.

Thus marked the end of the basics. The bunch of joking bastards who had picked fun at my name brought me on a chopper to a mission on some freight ship. It was really just another ploy to teach me about the game a bit more. Some three quarters into the level, I discovered a Desert Eagle, which made everything okay. It's just too bad that I ended up only accomplishing complete inaccuracy with it...I did hit close to a terrorist's head, so I'm gonna go ahead and give myself that one :D

The game traverses through different acts and missions, in which one plays two different characters: 'Soap' MacTavish and Sgt Paul Jackson. I won't get into the specifics of it, so as not to ruin the game for you, but I'll tell you the quality of the game.

All the animations are very fluid and lifelike. To add to the realism, there are no cutscenes whatsoever! Everything is real-time, so one can feel very involved in its virtual reality. In one [real-time] scene, a Cobra Copter gets hit with an RPG. You watch this from a seated position in the back of another cargo chopper. The Cobra spins wildly around, but the animations run smoothly...Not choppy at all. It's so wonderfully put together that I rarely can sound any complaint. Well, maybe two.

The storyline is short as fuck and the online play shitting out on me. Even if the online play worked, I'd be hard pressed to find another PS3 user playing CoD4 online at the exact time. Usually, it takes 30 minutes to find a server. The game has only been out for a few days, though...I can't really complain about it not having enough people.

The single player missions have great replay value. There are always new routes to travel...You don't have to go into that house, and you don't have to use C4 to destroy the tank. You could potentially run from car to car, or use an RPG to eliminate the tank.

There are also many, many little things that add to the realism of the game. For instance, if you shoot someone in the leg, chances are they'll live through it, but won't be able to use that leg. With that in mind, the developers entered that into the game. When you hit an enemy's leg, he'll fall down, discarding his rifle for a pistol. He'll start shooting you...Which is quite a nuisance, because those prone on the floor don't contrast much to dead bodies. It becomes a search, further challenging you.

Another great thing is the knife animations. Instead of linear jabbing or slicing, CoD4 includes many different ways to shank someone. Depending on the enemy's stance, your stance, and distance from the enemy, it will do one of these options: Slice like a madman (Like a with a machete), extend the arm straight into the enemy's body, pounce forward and stab the enemy (Like a bayonet -- This usually happens when you're behind them, but can potentially occur in any position), slit their neck, et cetera...

Other than the two issues I stated, the game is absolutely, mind-bogglingly awe inspiring in the animation, gameplay, and visual categories. I'd recommend it to anyone, but especially to those on the 360, because the little time I did play online was a jolly romp. With more 360 owners, there's bound to be more online players.

It is time to retire the keyboard for some, oh, I don't know, donuts. They're better than you.
theY4Kman, out.

P.S. This post totally wasn't advertising to get the game and play online with me...
P.P.S. Buy CoD4 on the PS3 and play online. Now!

Update: As I expected, there are many, many more players online. It now takes two seconds to find a game. There are still some times when no one is on, or it takes 10 minutes to join a game...But for the most part I'd say it's a huge improvement.

Project Origin Trailer

I found, through StumbleUpon, this gameplay trailer for Project Origin, the sequel of F.E.A.R. and wanted to share it with you! It runs for eighteen minutes and demos the beginning of the game, I presume. The graphics look splendid, accenting the naturalism throughout the game. One's ability to interact with many of the world's objects creates a sense of control, which is the basis for great replay value (Well, that and lots of gore). Did I mention it has lots of gore?

Project Origin is being developed by Warner Brothers Interactive Entertainment. It's still the same people who worked on the original. WBIE purchased Monolith Productions and are now flaunting that they will be releasing the next F.E.A.R. The reason the game has been titled "Project Origin" is because Vivendi, the publisher of the original F.E.A.R., has a trademark on "F.E.A.R."

If you liked the video...don't get too excited. The game doesn't have a set release date, but it will come out in 2008.

« Previous 1 2 3 4 5 Next »