Lately, I've been playing a lot of poker online. Usually, I play at PokerRoom.com, but I can also be caught at UltimateBet.net. (Sorry, guys, free tables only.)
Mostly, I play to relax. I also play to practice for when we play at lunch at work. However, I've noticed a few common types of online poker players. See if you can spot yourself in this catalog...
"All-In" without a clue. These people see people go "All-In" with crap hands on TV, so in their first hands at the table, they go "All-In" with a 7-2 off-suit and lose. Generally, I find every table has anywhere from one to four of these Darwin-award winners.
"All=In" with a purpose. These people prey on the "All-In"-without-a-clue crowd. If they've got a semi-decent hand, they'll go "All-In" on the first hand to get a lot of chips. If they win, great. They can bully the rest of the table because they've doubled-up on the first hand. If they lose, meh...it's only play money.
Lights on, but nobody's home. These guys know that mathematically, they can fold every hand and end up in the top half of the table. So, they intentionally start the round and then let themselves time-out or set themselves to auto-checkfold until the round gets interesting. Some poker sites, like UltimateBet.net, have means of handling these geniuses. Others, like PokerRoom.com, do not.
Racist. It doesn't matter who you're beating, as long as you think they are from an ethnic group you don't like. I was playing a game tonight on PokerRoom.com where one player (IrishPiratex) was calling everyone "a *($ Jew" who beat them. Another player (x bacon) started retorting with anti-Irish propaganda. I was in the money, but I intentionally played to lose so I wouldn't have to put up with their bullshit anymore.
The beggars. These guys hang out in the lobbies of the pay room, begging for vouchers so they can either start or continue playing. No offense, but if you're begging for money so you can play virtual poker, perhaps you should be going to a different site.
Kids. Some, like "x bacon", readily admit they aren't old enough to be on the site. Others simply act like kids. Generally, I assume everyone's 30 and subtract two years from their age for every typo I see in their chat, and add two years for every piece of punctuation they use correctly and every capital letter. It's been amazingly accurate for me so far...
People who are actually interested in playing poker. This happens to be the smallest group, unfortunately.
Frankly, I'm sick and tired of 99% of the people I see on these sites. I'm half-tempted to throw together my own poker site with one limitation...invitation only. So, if you're reading this, what would you think of an "Invite-Only" poker site? Think "Orkut for poker..."
July 31, 2005
July 29, 2005
Testing "Source"
As is probably well-known by now, Ritual is using the "Source" engine for their next title, "SiN: Episodes."
"Source" is an amazingly flexible engine to code for, and offers tons of options for level designers. The design of the engine encourages the development of emergent gameplay. Through the creation of simple sets of behavior, and occasionally some room-specific behaviors, you create a much deeper experience.
There is one issue, however, and that is trying to properly test games written using this engine. A lot of the engine is non-deterministic. I can shoot an object in the exact same place multiple times and get slightly different physics reactions. All of the reactions are "correct," but it does make it a challenge to make sure that all of the physics puzzles work correctly. AI happens the same way. We may have five seperate AI attached to a trigger, and the order they activate off the trigger will differ every time.
While this adds rather significantly to replayability, it does make testing a much more complex issue.
I'm trying to be very intelligent about how I test "SiN: Episodes." I'm writing tools to extract out the triggers from the levels so I can check them off during my test passes. I'm checking areas in "Half-Life 2" where it is very possible to break the game (like your battle with the helicopter, or when you're playing ball with Dog) to make sure we don't have similar flaws in "S:E."
...But I can only do so much. I don't often ask for specific readers, but I figure that I'm getting to be high enough profile in my field that I can try at least.
If you or someone you know worked in test on either "Half-Life 2" or the "Source"-engine "Vampire" title, can you have them contact me? My E-mail address is at the bottom of this page. I want to see if they have any tips on ways to optimize my testing for the time I have allotted for the project.
"Source" is an amazingly flexible engine to code for, and offers tons of options for level designers. The design of the engine encourages the development of emergent gameplay. Through the creation of simple sets of behavior, and occasionally some room-specific behaviors, you create a much deeper experience.
There is one issue, however, and that is trying to properly test games written using this engine. A lot of the engine is non-deterministic. I can shoot an object in the exact same place multiple times and get slightly different physics reactions. All of the reactions are "correct," but it does make it a challenge to make sure that all of the physics puzzles work correctly. AI happens the same way. We may have five seperate AI attached to a trigger, and the order they activate off the trigger will differ every time.
While this adds rather significantly to replayability, it does make testing a much more complex issue.
I'm trying to be very intelligent about how I test "SiN: Episodes." I'm writing tools to extract out the triggers from the levels so I can check them off during my test passes. I'm checking areas in "Half-Life 2" where it is very possible to break the game (like your battle with the helicopter, or when you're playing ball with Dog) to make sure we don't have similar flaws in "S:E."
...But I can only do so much. I don't often ask for specific readers, but I figure that I'm getting to be high enough profile in my field that I can try at least.
If you or someone you know worked in test on either "Half-Life 2" or the "Source"-engine "Vampire" title, can you have them contact me? My E-mail address is at the bottom of this page. I want to see if they have any tips on ways to optimize my testing for the time I have allotted for the project.
July 24, 2005
E-mail Slash & Burn
As part of my backup and data spring-cleaning exercise, I decided to do a major purge of my E-mail at home today.
When I started, I had nearly 1,500 unread E-mails. That's an insane amount, to be dead honest with you. So, I created a couple of backup buckets on my local box, and started dumping mail.
High-traffic mailing list I read on occasion? Cut.
Any unread mail over 30 days old? Cut.
Ads that made it through the spam filter? Cut.
E-mail copies of blog feedback? Cut.
After nearly four hours of slashing and burning, I'm down to a nice, manageable 89 messages. Hopefully I can get to those tomorrow evening...
If you sent me an E-mail and require a response, please resend your E-mail to be safe. It may have accidentally been "purged."
Tomorrow, if all goes well, I'll be able to do the same thing. I'm bumping up against my mailbox size limit at work. Unfortunately, I can't be as cavalier about deleting work E-mails. As the QA Manager, I need to retain a lot of information. Guess it's time for Personal Folders...and sleep.
When I started, I had nearly 1,500 unread E-mails. That's an insane amount, to be dead honest with you. So, I created a couple of backup buckets on my local box, and started dumping mail.
High-traffic mailing list I read on occasion? Cut.
Any unread mail over 30 days old? Cut.
Ads that made it through the spam filter? Cut.
E-mail copies of blog feedback? Cut.
After nearly four hours of slashing and burning, I'm down to a nice, manageable 89 messages. Hopefully I can get to those tomorrow evening...
If you sent me an E-mail and require a response, please resend your E-mail to be safe. It may have accidentally been "purged."
Tomorrow, if all goes well, I'll be able to do the same thing. I'm bumping up against my mailbox size limit at work. Unfortunately, I can't be as cavalier about deleting work E-mails. As the QA Manager, I need to retain a lot of information. Guess it's time for Personal Folders...and sleep.
July 23, 2005
Time's Not On My Side...
You ever have a computer that you just know will have a hardware failure any day now? I've got one.
I bought this computer back when I was at Microsoft. It's an AMD Athlon 2600+, 1Gb RAM, a terabyte of HD space, and a Radeon 9200 All-In-Wonder. It's served me well, but I could feel the failure coming back when I bought my Radeon 9700 to replace a failing GeForce Ti200 and it kept causing the system to reboot. Even with a new power supply, this system could not handle that card.
Well, it's now rebooting itself at least once every three days. Given the "generic" nature of the Windows "Watson" error, I know the hardware is going to go.
So I'm currently in middle of the monotonous process of backing up mission-critical files to DVD. I've done seven DVD's today, and am midway through the eighth. What's scary is that I'm still in the same folder, and I'm only up to the P's.
Since my granddaughter is coming down for a month, I don't have the cash to replace it now. I won't be able to replace it until September.
Now it's the waiting game. Personally, I'm expecting it to fail on August 16, 2005. (Things like this are more "fun" when you draw a line in the sand.) If it does go, I'll be dark for a little while.
I bought this computer back when I was at Microsoft. It's an AMD Athlon 2600+, 1Gb RAM, a terabyte of HD space, and a Radeon 9200 All-In-Wonder. It's served me well, but I could feel the failure coming back when I bought my Radeon 9700 to replace a failing GeForce Ti200 and it kept causing the system to reboot. Even with a new power supply, this system could not handle that card.
Well, it's now rebooting itself at least once every three days. Given the "generic" nature of the Windows "Watson" error, I know the hardware is going to go.
So I'm currently in middle of the monotonous process of backing up mission-critical files to DVD. I've done seven DVD's today, and am midway through the eighth. What's scary is that I'm still in the same folder, and I'm only up to the P's.
Since my granddaughter is coming down for a month, I don't have the cash to replace it now. I won't be able to replace it until September.
Now it's the waiting game. Personally, I'm expecting it to fail on August 16, 2005. (Things like this are more "fun" when you draw a line in the sand.) If it does go, I'll be dark for a little while.
July 22, 2005
"Tray and Play" Request
One of Microsoft's upcoming initiatives in the "Windows Vista" timeframe is a program called "Tray and Play." (GameSpot article from March here)
Personally, I'm okay with it. However, there is one tool that I'd love to get to help with this initiative that I don't see coming down the pike any time soon.
If you've ever developed a title for the Xbox, you may be familiar with their DVD emulation hardware/software combination. You create a folder on your hard drive with the build, "emulate" the DVD drive, play the game for a bit, and then optimize the build based off of the order in which files are accessed on the DVD.
The biggest problem with "Tray and Play" right now is that with most of the CD and DVD mastering packages that are available, we do not have the ability to tell the package which layer to put the files on, or which order to put them in. As a result, games loading off of the CD/DVD may have to seek from one end to the other and back on a regular basis. Load time performance really suffers.
If you want "Tray and Play" to succeed, give us a tool similar to that for the PC. Have it spit out a project file and an ISO image at the end.
I know it's not the easiest thing to do, but you already have a large chunk of the work already done. (Ignore the blog spam at the bottom of that link.)
Personally, I'm okay with it. However, there is one tool that I'd love to get to help with this initiative that I don't see coming down the pike any time soon.
If you've ever developed a title for the Xbox, you may be familiar with their DVD emulation hardware/software combination. You create a folder on your hard drive with the build, "emulate" the DVD drive, play the game for a bit, and then optimize the build based off of the order in which files are accessed on the DVD.
The biggest problem with "Tray and Play" right now is that with most of the CD and DVD mastering packages that are available, we do not have the ability to tell the package which layer to put the files on, or which order to put them in. As a result, games loading off of the CD/DVD may have to seek from one end to the other and back on a regular basis. Load time performance really suffers.
If you want "Tray and Play" to succeed, give us a tool similar to that for the PC. Have it spit out a project file and an ISO image at the end.
I know it's not the easiest thing to do, but you already have a large chunk of the work already done. (Ignore the blog spam at the bottom of that link.)
July 21, 2005
My Take On "Hot Coffee," Part 2
Yesterday, I made a post about why I believed that the code and assets required for the "Hot Coffee" mod may have inadvertently made it onto the "Grand Theft Auto: San Andreas" master.
Today, I want to briefly address the ESRB, and say what I think could have stopped most of this uproar dead in its tracks...be more public.
This is not the first time that the ESRB has revoked and re-rated a title, although by looking at the news, you'd think it was. I have first-hand knowledge of a title that had their "Teen" rating revoked after a cheat code that enabled "excessive blood and gore" was found for their game.
The publisher of this title had to do many of the things that Rockstar is now claiming that they are doing voluntarily: sticker all units in the channel with the new "Mature" rating, remaster with the code removed, release a patch that removed the code, etc. The publisher also had to pay a fairly hefty fee to the ESRB. Once all that was done, however, the publisher was able to apply to have the "Teen" rating restored, and it was.
However, you most likely have never heard about this. There are many non-disclosure agreements in place in this industry, and some are designed to keep things like this that are believed to affect sales quiet. The only evidence you may find are some reviews that were published while the product was still rated "Mature."
So it's time for the veil of secrecy to end. The ESRB should publicize actions like this to show that they are being effective. If enforcement is more visible, violations are less likely to occur.
Right now, studies show that 83% of parents agree with the ESRB ratings on titles. You can't even get 83% of parents to agree on a proper means of discipline. The ESRB system works. Now it just needs to be open.
Today, I want to briefly address the ESRB, and say what I think could have stopped most of this uproar dead in its tracks...be more public.
This is not the first time that the ESRB has revoked and re-rated a title, although by looking at the news, you'd think it was. I have first-hand knowledge of a title that had their "Teen" rating revoked after a cheat code that enabled "excessive blood and gore" was found for their game.
The publisher of this title had to do many of the things that Rockstar is now claiming that they are doing voluntarily: sticker all units in the channel with the new "Mature" rating, remaster with the code removed, release a patch that removed the code, etc. The publisher also had to pay a fairly hefty fee to the ESRB. Once all that was done, however, the publisher was able to apply to have the "Teen" rating restored, and it was.
However, you most likely have never heard about this. There are many non-disclosure agreements in place in this industry, and some are designed to keep things like this that are believed to affect sales quiet. The only evidence you may find are some reviews that were published while the product was still rated "Mature."
So it's time for the veil of secrecy to end. The ESRB should publicize actions like this to show that they are being effective. If enforcement is more visible, violations are less likely to occur.
Right now, studies show that 83% of parents agree with the ESRB ratings on titles. You can't even get 83% of parents to agree on a proper means of discipline. The ESRB system works. Now it just needs to be open.
July 20, 2005
My Take On "Hot Coffee"
I've been pretty quiet about all this uproar about the "Hot Coffee" modification for "Grand Theft Auto: San Andreas" because I've got friends who work for Take Two, but now that the recall petitions are out, I figure it's time to say what I think.
Developing video games is hard. Not only do we have to make a product that works, we also have to make a product that is fun, a product that will get the appropriate rating for our target market from the ESRB, a product that is acceptable to our publishers (well, we get to bypass that with SiN: Episodes...he he he), and a product that we are proud of at the end of the day.
A large part of game development is prototyping. That's when you're tossing new things into a product in a skeletal manner to see if it will add to the final product. This process often goes up until just a few weeks before a product goes "gold".
Sometimes, the features are cut but the files and code remain in the product. Why? Because developers don't want to introduce new bugs by pruning out older stuff.
Let me give you an example. Let's say that a developer prototypes a bike-tire-pumping minigame. The developer decides it should be a rhythm game, so he develops a rhythm system in the game, adds some placeholder animations and textures, and gets the minigame approved.
At this point, a few things are going to happen. Other developers are going to look at the helper functions and systems that this developer put in to see if they can build on top of what he has. Artists are going to replace the placeholder art with real art assets. These assets may be exclusive to this minigame, or these assets could be shared with other portions of the game.
After a couple of weeks of work, the programmer's system is used by several other developer's code, and the art is used in many other areas throughout the product. Suddenly, a note comes down from the publisher asking that the bike-pumping minigame be cut. Evidently, some kid in Arkansas stuck a bike pump in his ear and pumped so hard that brains shot out the kid's nose, so the feature is being cut to be more sensitive to consumers in Arkansas.
So how do you cut this feature out? The feature is there and works, other code is reliant on it, the art is used in other sections of the game, what do you do? The safest bet is to just make it so that the minigame is never called by the main game. That way, you aren't interfering with code or art.
This is most likely what happened with "GTA:SA." Most games have hidden features in them. Admittedly, very few are sex games. Some are unfinished levels or test levels. Some are hidden characters. Some include unauthorized copies of "South Park" clips. Most of the time, only a game's die-hard fans care.
Now is the ESRB responsible for this? Nope. The feature can only be accessed by modifying a game file. Admittedly, it's only modifying a single byte, but it's still a modification. I'm sure if you modified a single byte in a couple of "The Simpson's" titles, you'd get Homer screaming, "Fuck you, Flanders!" The ESRB can only really review titles as they ship. Now, if the feature could be unlocked somehow within the game, like the "chunky" and "superchunky" codes were in Dungeon Siege, then the ESRB could easily do something. As is, we'll have to be patient to see what the ESRB does.
Update (7/20/2005, 4:59pm): An AO rating. Not surprising.
Update (7/20/2005, 10:44pm): Corrected a typo, responded to feedback in comments section.
Developing video games is hard. Not only do we have to make a product that works, we also have to make a product that is fun, a product that will get the appropriate rating for our target market from the ESRB, a product that is acceptable to our publishers (well, we get to bypass that with SiN: Episodes...he he he), and a product that we are proud of at the end of the day.
A large part of game development is prototyping. That's when you're tossing new things into a product in a skeletal manner to see if it will add to the final product. This process often goes up until just a few weeks before a product goes "gold".
Sometimes, the features are cut but the files and code remain in the product. Why? Because developers don't want to introduce new bugs by pruning out older stuff.
Let me give you an example. Let's say that a developer prototypes a bike-tire-pumping minigame. The developer decides it should be a rhythm game, so he develops a rhythm system in the game, adds some placeholder animations and textures, and gets the minigame approved.
At this point, a few things are going to happen. Other developers are going to look at the helper functions and systems that this developer put in to see if they can build on top of what he has. Artists are going to replace the placeholder art with real art assets. These assets may be exclusive to this minigame, or these assets could be shared with other portions of the game.
After a couple of weeks of work, the programmer's system is used by several other developer's code, and the art is used in many other areas throughout the product. Suddenly, a note comes down from the publisher asking that the bike-pumping minigame be cut. Evidently, some kid in Arkansas stuck a bike pump in his ear and pumped so hard that brains shot out the kid's nose, so the feature is being cut to be more sensitive to consumers in Arkansas.
So how do you cut this feature out? The feature is there and works, other code is reliant on it, the art is used in other sections of the game, what do you do? The safest bet is to just make it so that the minigame is never called by the main game. That way, you aren't interfering with code or art.
This is most likely what happened with "GTA:SA." Most games have hidden features in them. Admittedly, very few are sex games. Some are unfinished levels or test levels. Some are hidden characters. Some include unauthorized copies of "South Park" clips. Most of the time, only a game's die-hard fans care.
Now is the ESRB responsible for this? Nope. The feature can only be accessed by modifying a game file. Admittedly, it's only modifying a single byte, but it's still a modification. I'm sure if you modified a single byte in a couple of "The Simpson's" titles, you'd get Homer screaming, "Fuck you, Flanders!" The ESRB can only really review titles as they ship. Now, if the feature could be unlocked somehow within the game, like the "chunky" and "superchunky" codes were in Dungeon Siege, then the ESRB could easily do something. As is, we'll have to be patient to see what the ESRB does.
Update (7/20/2005, 4:59pm): An AO rating. Not surprising.
Update (7/20/2005, 10:44pm): Corrected a typo, responded to feedback in comments section.
July 18, 2005
Off-Topic: Weekend From Hell In Review
Did you ever have one of those weekends where literally everything went wrong? I have.
It started Friday night. A massive thunderstorm rolled through Dallas, affecting power in the Ritual offices. While the UPS did its job and no work was lost, I figured "better safe than sorry," shut down, and went home. I managed to eat a quick meal prior to heading over to the "Harry Potter" midnight party with my wife (haven't read the books, just being a supportive husband), where I ended up being bored silly for 3+ hours.
I sleep in for a bit on Saturday, get up, go to Washington Mutual to change the PIN on my ATM card, browse through Lone Star Comics for awhile, then head into work to get caught up. I found a few interesting bugs, like an exploit in the accuracy system where if you crouch then immediately stand, you have 100% accuracy for about half a second. Logged those, and went home because we were going to go shopping for cell-phones.
Given our mobile requirements, we had decided on T-Mobile. We have a T-Mobile dealership across the street, so we went there. Now, we try to be informed consumers. We do our research prior to making a purchase. So having the T-Mobile representative on hand lie his ass off to us in a blatant effort to increase his commission really turned us off. Not only did we not buy our phones or a plan through T-Mobile, we even went and shopped the competition.
After two hours of being flustered, we decided to take a break and go buy some tunes. We went back to Virgin Megastore, thinking that even with our past experiences, that they couldn't screw up music shopping. We were wrong.
I bought a copy of The Car's "Greatest Hits" album and a 5-CD box-set called "Complete Eighties." (The box-set passed the 80-80 rule...only buy the set if you recognize 80% of the tunes on it, and like 80% of what you recognize.)
So when I get home, I plop The Car's album in my Media Center to rip it to my library and pop disc 1 from the 80's box-set into my console CD player. I get audio dropouts and static every 5-10 seconds. That's not good. I pop the CD out...no smudges, scratches or fingerprints. I grab The Car's album from the Media Center and pop it in. No audio distortion...time to investigate.
Turns out that Virgin put the price tag and other labels over the portions on the box-set where they tell you that it's copy protected. Yes, that's right...copy protected. They used some product called "Cactus Data Shield." If I wanted to listen to it on my computer, I would have had to install some drivers, downgrade my Windows Media runtime, and even then I only would have been able to listen to cassette-quality .WMA and I would not have been able to send the music to any portable devices. Had I known any of this, I never would have bought it. If I can't get the music I buy in stores onto my Portable Media Center, it is useless to me.
By this point, I'm frustrated, so I go to sleep. Unfortunately, I'm out of my allergy meds, so I don't have a restful sleep. I wake up on Sunday, get dressed, and go down to Virgin to return the box-set. They won't give me my money back because it's opened. They don't tell me that at first, however. Instead, they grill me for 45 minutes about my computer specifications. Finally, they agree to give me store credit. To make sure I don't have the same experience, I pick up "Prince of Persia: The Sands of Time" for the Xbox. At least I know that will work.
I get home, take a Benedryl, go to sleep...and barely wake up in time for work. Here's hoping this week turns out better than this weekend.
It started Friday night. A massive thunderstorm rolled through Dallas, affecting power in the Ritual offices. While the UPS did its job and no work was lost, I figured "better safe than sorry," shut down, and went home. I managed to eat a quick meal prior to heading over to the "Harry Potter" midnight party with my wife (haven't read the books, just being a supportive husband), where I ended up being bored silly for 3+ hours.
I sleep in for a bit on Saturday, get up, go to Washington Mutual to change the PIN on my ATM card, browse through Lone Star Comics for awhile, then head into work to get caught up. I found a few interesting bugs, like an exploit in the accuracy system where if you crouch then immediately stand, you have 100% accuracy for about half a second. Logged those, and went home because we were going to go shopping for cell-phones.
Given our mobile requirements, we had decided on T-Mobile. We have a T-Mobile dealership across the street, so we went there. Now, we try to be informed consumers. We do our research prior to making a purchase. So having the T-Mobile representative on hand lie his ass off to us in a blatant effort to increase his commission really turned us off. Not only did we not buy our phones or a plan through T-Mobile, we even went and shopped the competition.
After two hours of being flustered, we decided to take a break and go buy some tunes. We went back to Virgin Megastore, thinking that even with our past experiences, that they couldn't screw up music shopping. We were wrong.
I bought a copy of The Car's "Greatest Hits" album and a 5-CD box-set called "Complete Eighties." (The box-set passed the 80-80 rule...only buy the set if you recognize 80% of the tunes on it, and like 80% of what you recognize.)
So when I get home, I plop The Car's album in my Media Center to rip it to my library and pop disc 1 from the 80's box-set into my console CD player. I get audio dropouts and static every 5-10 seconds. That's not good. I pop the CD out...no smudges, scratches or fingerprints. I grab The Car's album from the Media Center and pop it in. No audio distortion...time to investigate.
Turns out that Virgin put the price tag and other labels over the portions on the box-set where they tell you that it's copy protected. Yes, that's right...copy protected. They used some product called "Cactus Data Shield." If I wanted to listen to it on my computer, I would have had to install some drivers, downgrade my Windows Media runtime, and even then I only would have been able to listen to cassette-quality .WMA and I would not have been able to send the music to any portable devices. Had I known any of this, I never would have bought it. If I can't get the music I buy in stores onto my Portable Media Center, it is useless to me.
By this point, I'm frustrated, so I go to sleep. Unfortunately, I'm out of my allergy meds, so I don't have a restful sleep. I wake up on Sunday, get dressed, and go down to Virgin to return the box-set. They won't give me my money back because it's opened. They don't tell me that at first, however. Instead, they grill me for 45 minutes about my computer specifications. Finally, they agree to give me store credit. To make sure I don't have the same experience, I pick up "Prince of Persia: The Sands of Time" for the Xbox. At least I know that will work.
I get home, take a Benedryl, go to sleep...and barely wake up in time for work. Here's hoping this week turns out better than this weekend.
July 8, 2005
Stupid .NET Bugs
I've been working on automating the deployment of test builds for SiN: Episodes internally, and I've been fighting for half the afternoon with what seemed to be (at first) a network permissions error, but ended up being really funky crap happening in the System.IO namespace.
I have the approved build on my box, and I want to copy that build up to my prop server. Normally, I'd use XCOPY, but we're still in the phase where files may also be deleted from the tree, and XCOPY doesn't have any sort of "delete files on one side" functionality.
So I came up with a pretty decent little application that uses the System.IO.FileInfo.CopyTo() method to copy files over. Only catch: it only works for one copy. The moment I need to send another set of updated files over, I get craploads of UnauthorizedAccessExceptions. It seems that after I copy a file over once, I can't delete it or overwrite it again until I reboot the machine I'm copying to. (Before you ask, yes, I am passing in True for the overwrite parameter.)
I love the functionality inside the .NET Framework, but on occasion, niggling little things like this really piss me off.
In case anyone wants to check my code, here it is:
Now mind you, it says that the UnauthorizedAccessException is only thrown on FileInfo.Delete if the file in question is really a directory...but the file that's getting the exception thrown is really a file.
Now back to tearing what's left of my hair out...
UPDATE: Turns out that the .CopyTo method also copies over the file attributes, and FileInfo.Delete() and FileInfo.CopyTo() fail with UnauthorizedAccessExceptions if the destination file is ReadOnly.
To fix it, replace the above "DeleteFile" method with the following:
Grr...
I have the approved build on my box, and I want to copy that build up to my prop server. Normally, I'd use XCOPY, but we're still in the phase where files may also be deleted from the tree, and XCOPY doesn't have any sort of "delete files on one side" functionality.
So I came up with a pretty decent little application that uses the System.IO.FileInfo.CopyTo() method to copy files over. Only catch: it only works for one copy. The moment I need to send another set of updated files over, I get craploads of UnauthorizedAccessExceptions. It seems that after I copy a file over once, I can't delete it or overwrite it again until I reboot the machine I'm copying to. (Before you ask, yes, I am passing in True for the overwrite parameter.)
I love the functionality inside the .NET Framework, but on occasion, niggling little things like this really piss me off.
In case anyone wants to check my code, here it is:
Sub DeleteFile(ByVal filename As String)EnsureFolderPathExists() is there because CopyTo() will not copy a file to a path that doesn't exist, so I use the function to create the directory ahead of time. DeleteFile() is there just as a test...I was thinking for a little while that if I deleted the original, I wouldn't have these issues, but I get the UnauthorizedAccessException even with I try to delete the file.
Dim fi As New FileInfo(filename)
If fi.Exists Then fi.Delete()
End Sub
Sub EnsureFolderPathExists(ByVal filepath As String)
Dim fi As New FileInfo(filepath)
If Not fi.Directory.Exists Then _
Directory.CreateDirectory(fi.Directory.FullName)
End Sub
Sub CopyFile(ByVal sourcefile As String, ByVal destfile As String)
Dim sfi, dfi As FileInfo
Try
sfi = New FileInfo(sourcefile)
If Not sfi.Exists Then Return
EnsureFolderPathExists(destfile)
DeleteFile(destfile)
sfi.CopyTo(destfile, True)
If Not destfile.StartsWith("\\") Then
dfi = New FileInfo(destfile)
dfi.LastWriteTime = sfi.LastWriteTime
End If
Catch ex As Exception
Console.Error.WriteLine("Error: " & ex.Message)
End Try
End Sub
Now mind you, it says that the UnauthorizedAccessException is only thrown on FileInfo.Delete if the file in question is really a directory...but the file that's getting the exception thrown is really a file.
Now back to tearing what's left of my hair out...
UPDATE: Turns out that the .CopyTo method also copies over the file attributes, and FileInfo.Delete() and FileInfo.CopyTo() fail with UnauthorizedAccessExceptions if the destination file is ReadOnly.
To fix it, replace the above "DeleteFile" method with the following:
Sub DeleteFile(ByVal filename As String)
Dim fi As New FileInfo(filename)
If fi.Exists Then
If fi.Attributes Or FileAttributes.ReadOnly Then
fi.Attributes = FileAttributes.Normal
End If
fi.Delete()
End If
End Sub
Grr...
July 6, 2005
Incompetent Customer Service
There is one thing that I miss here in Texas...there are no decent places around to purchase anime. I can get anime-related accessories just about anywhere, but I can't get my anime fix very easily here.
There are three places around here that stock anime. There is the Movie Trading Company across the street, but if it isn't at least six months old, forget finding it there. There is Border's down the street, but their selection is abysmal unless you want InuYasha DVD's. Finally, there's the Virgin Megastore at Mockingbird Station. They have a small selection of anime, but they usually have new releases in.
Yesterday, "Tenchi Muyo! Ryo-Ohki OVA 3 Volume 1" was released here in the states. I'm a bit of a Tenchi fan, so I asked my wife if she could pick it up for me at Virgin. She said she would.
Now, I've never gotten good customer service at Virgin, but I knew they were the most likely place to have it. So, I wrote down on a pad of paper the exact information that my wife was going to need to get the right DVD. I wrote down, "Tenchi Muyo! Ryo-Ohki OVA 3, Volume 1 of 3, Published by Funimation, MSRP $29,99, Not GXP, released 7/5/2005." Any salesman who looked at that could, via process of deduction, figure out which disk it was. It wouldn't be the OVA 1/2 set, as that was released by Pioneer/Geneon as either a 3-DVD boxset (now discontinued) or a set of 4 DVD's. It wouldn't be Tenchi Universe or Tenchi in Tokyo, as both of those were 8 DVD's long and both are now dropped to a sub-$20 MSRP. Finally, it wouldn't be Tenchi Muyo! GXP, as that was 8 DVD's as well and specifically called out...mostly because I noticed they had it in stock the last time I was there. Finally, aside from GXP, all previous Tenchi DVD's were released by Pioneer or Geneon.
So my wife goes to get it. She hands the salesman my note. He grabs a DVD. She asks three times if he's sure it's the right one. He swears up and down that it is.
It's not. It's not at the right price point, it's not the right publisher, and the DVD was released over two years ago. In short, he didn't even pay attention.
So, my wife gets it home. I call her from work to let her know I'm running about 30 minutes late. She reads the DVD package to me, and I can tell immediately that it's the wrong one. I tell her to meet me at Mockingbird Station.
We both get there about 30 minutes later. We walk into Virgin together, and the salesman who helped her saw us and ran. Yes, you read that right. He ran.
So my wife starts the arduous process of returning the merchandise while I go to see if they have it in stock. The salesman, who evidently covers the area, is avoiding it like the plague. After determining they didn't have it in stock, I return to the front counter and get our money back.
So, what did this salesman do wrong?
1) Didn't double-check the merchandise matched the requested specifications.
2) Assured the customer that the wrong piece of merchandise was the right piece.
3) Avoided the customer when he was going to be confronted with his failure.
4) Did not assist in correcting the problem.
5) Did not properly cover his area.
Now Virgin is a decent company. I have nothing wrong with them at all. However, this Mega Store branch needs some serious work. If your staff would spend less time programming their iPod playlists and more time paying attention to their customers and their needs, there might be more than 2-3 people in there when I visit.
There are three places around here that stock anime. There is the Movie Trading Company across the street, but if it isn't at least six months old, forget finding it there. There is Border's down the street, but their selection is abysmal unless you want InuYasha DVD's. Finally, there's the Virgin Megastore at Mockingbird Station. They have a small selection of anime, but they usually have new releases in.
Yesterday, "Tenchi Muyo! Ryo-Ohki OVA 3 Volume 1" was released here in the states. I'm a bit of a Tenchi fan, so I asked my wife if she could pick it up for me at Virgin. She said she would.
Now, I've never gotten good customer service at Virgin, but I knew they were the most likely place to have it. So, I wrote down on a pad of paper the exact information that my wife was going to need to get the right DVD. I wrote down, "Tenchi Muyo! Ryo-Ohki OVA 3, Volume 1 of 3, Published by Funimation, MSRP $29,99, Not GXP, released 7/5/2005." Any salesman who looked at that could, via process of deduction, figure out which disk it was. It wouldn't be the OVA 1/2 set, as that was released by Pioneer/Geneon as either a 3-DVD boxset (now discontinued) or a set of 4 DVD's. It wouldn't be Tenchi Universe or Tenchi in Tokyo, as both of those were 8 DVD's long and both are now dropped to a sub-$20 MSRP. Finally, it wouldn't be Tenchi Muyo! GXP, as that was 8 DVD's as well and specifically called out...mostly because I noticed they had it in stock the last time I was there. Finally, aside from GXP, all previous Tenchi DVD's were released by Pioneer or Geneon.
So my wife goes to get it. She hands the salesman my note. He grabs a DVD. She asks three times if he's sure it's the right one. He swears up and down that it is.
It's not. It's not at the right price point, it's not the right publisher, and the DVD was released over two years ago. In short, he didn't even pay attention.
So, my wife gets it home. I call her from work to let her know I'm running about 30 minutes late. She reads the DVD package to me, and I can tell immediately that it's the wrong one. I tell her to meet me at Mockingbird Station.
We both get there about 30 minutes later. We walk into Virgin together, and the salesman who helped her saw us and ran. Yes, you read that right. He ran.
So my wife starts the arduous process of returning the merchandise while I go to see if they have it in stock. The salesman, who evidently covers the area, is avoiding it like the plague. After determining they didn't have it in stock, I return to the front counter and get our money back.
So, what did this salesman do wrong?
1) Didn't double-check the merchandise matched the requested specifications.
2) Assured the customer that the wrong piece of merchandise was the right piece.
3) Avoided the customer when he was going to be confronted with his failure.
4) Did not assist in correcting the problem.
5) Did not properly cover his area.
Now Virgin is a decent company. I have nothing wrong with them at all. However, this Mega Store branch needs some serious work. If your staff would spend less time programming their iPod playlists and more time paying attention to their customers and their needs, there might be more than 2-3 people in there when I visit.
Steam Memory Usage Myths Debunked
I've been seeing a metric shit-ton of posts online about the Steam client from Valve using a lot of memory...57Mb of RAM just for the distribution client is their claim. I figured, what the hell...I've got Steam on this machine, let's check their claims.
This is from Process Explorer looking at my Steam instance, which has the Half-Life 2 Gold Package and a few mods:
According to this snapshot, Steam is currently using 32.2Mb of memory (the 14,128K for Private Bytes, and the 18,812K Working Set). At its peak, Steam was using 41.2Mb of memory (18,776K for Private Bytes, 23,368K Working Set).
Okay, no biggie. That's 32Mb of its own address space used...but how much of that is being shared among other processes? After all, if a DLL is loaded in Windows, it's loaded once into memory, then mapped into the appropriate address space in other processes, so it's really only using memory once.
We know for a fact that Steam is currently using 13.8Mb for itself. That's what the Private Bytes is for. That is memory that the Steam Client has allocated to itself and is currently using. Some of that may have been swapped to disk, but that amount is exclusively Steam.
So now for the Steam libraries being loaded in...
So Steam's true cost is a total of 23.28Mb, which is less than half the memory cost being quoted online, or about the equivalent of MSN Messenger 7.0, and that cost only exists while the Steam client is loaded.
If you don't believe me, that's fine. You don't have to. Download Process Explorer from SysInternals and do the tests yourself. This is what I got, and it's all documented here.
This is from Process Explorer looking at my Steam instance, which has the Half-Life 2 Gold Package and a few mods:
According to this snapshot, Steam is currently using 32.2Mb of memory (the 14,128K for Private Bytes, and the 18,812K Working Set). At its peak, Steam was using 41.2Mb of memory (18,776K for Private Bytes, 23,368K Working Set).
Okay, no biggie. That's 32Mb of its own address space used...but how much of that is being shared among other processes? After all, if a DLL is loaded in Windows, it's loaded once into memory, then mapped into the appropriate address space in other processes, so it's really only using memory once.
We know for a fact that Steam is currently using 13.8Mb for itself. That's what the Private Bytes is for. That is memory that the Steam Client has allocated to itself and is currently using. Some of that may have been swapped to disk, but that amount is exclusively Steam.
So now for the Steam libraries being loaded in...
dbg.dll (Steam DLL, 68Kb)That's it for Steam-related DLL's. The rest is all part of Windows and the same DLL's are loaded by Explorer. So that means that Steam's working set is truly only 9.48Mb.
FileSystem_Steam.dll (Steam DLL, 120Kb)
serverbrowser.dll (Steam DLL, 1.08Mb)
Steam.dll (Steam DLL, 3.51Mb)
steam.exe (Steam Executable, 1.18Mb)
steamclient.dll (Steam DLL, 260Kb)
SteamUI.dll (Steam DLL, 1.91Mb)
tier0_s.dll (Steam DLL, 192Kb)
TrackerNET.dll (Steam DLL, 152Kb)
trackerUI.dll (Steam DLL, 560Kb)
vgui2.dll (Steam DLL, 252Kb)
vstdlib_s.dll (Steam DLL, 196Kb)
So Steam's true cost is a total of 23.28Mb, which is less than half the memory cost being quoted online, or about the equivalent of MSN Messenger 7.0, and that cost only exists while the Steam client is loaded.
If you don't believe me, that's fine. You don't have to. Download Process Explorer from SysInternals and do the tests yourself. This is what I got, and it's all documented here.
July 3, 2005
New Blog Template
Recently, Blogger has been inserting some rather odd HTML at the top of each of my posts. It seems the base template I had been using was no longer supported.
So, here's my new template. It's not "me" yet, but it will be soon. Give it time...
So, here's my new template. It's not "me" yet, but it will be soon. Give it time...
Rearchitecting...
I'm currently about 50% done rearchitecting RSEngine (my VB.NET 3D engine) from the fixed-function pipeline to a shader-driven pipeline.
It's been interesting trying to strike a balance between performance and flexibility. While I could potentially render everything using the same shader, it doesn't make any sense to. Right now, I've got one shader for the world, one shader for transparent surfaces, one shader for animated meshes and one other for static meshes.
That lets me do id-style "quad" shading on models, but not the world, and that's fine. The engine is going to be released under the BSD license anyway, so if you don't like it, change it yourself.
Anyway, it's been a fun use of my weekend trying to wrap my head around shaders. The book I'm using is "Microsoft DirectX® 9 Programmable Graphics Pipeline" by Kris Gray (Microsoft Press). I found it on sale recently for $24.98, and I would have been crazy not to pick it up at that price. It's fairly decent, and the tutorials run the gamut from vs/ps1.1 through HLSL. I would have preferred more samples, specifically some more real-life samples and information on integrating multiple shaders in the same pipeline, but it's a good book.
It's been interesting trying to strike a balance between performance and flexibility. While I could potentially render everything using the same shader, it doesn't make any sense to. Right now, I've got one shader for the world, one shader for transparent surfaces, one shader for animated meshes and one other for static meshes.
That lets me do id-style "quad" shading on models, but not the world, and that's fine. The engine is going to be released under the BSD license anyway, so if you don't like it, change it yourself.
Anyway, it's been a fun use of my weekend trying to wrap my head around shaders. The book I'm using is "Microsoft DirectX® 9 Programmable Graphics Pipeline" by Kris Gray (Microsoft Press). I found it on sale recently for $24.98, and I would have been crazy not to pick it up at that price. It's fairly decent, and the tutorials run the gamut from vs/ps1.1 through HLSL. I would have preferred more samples, specifically some more real-life samples and information on integrating multiple shaders in the same pipeline, but it's a good book.
July 1, 2005
My Bellevue Trip
I spent Tuesday and Wednesday at a NDA-level game development conference in Bellevue. While 99.9% of what I saw at the conference was under NDA, there were some minor tidbits that aren't, and I'm going to quickly comment on what I can.
First off, it was great meeting a lot of the people at Microsoft who make game development on Windows such a compelling development environment. These guys were all extremely knowledgable about their craft and knew their stuff. Plus, it was great to be able to ask questions to the people who are actually developing their stuff.
Second, the most impressive demo (at least to me) was also (unfortunately) the most ignored one. All I can say is watch this space soon.
Third, I was kind of shocked by how much of an impression I've made. I met a few people who are now Microsoft employees working on various and sundry products who decided to shoot for Microsoft after seeing my presentation that I had made to the SIGDA chapter at the University of Utah. I met people who are still using tools I wrote three years ago. I met a good 40 people who knew about and read my blog regularly.
Fourth, if you haven't been using PIX for Windows, start. It's moved from being nearly useless to being almost on par with the Xbox version. Admittedly, the Xbox version can do some nifty things, but the Windows version actually gets some extra useful features.
Fifth, whoever was running up and down the hallway on the 20th floor of the Hyatt Regency pounding on the doors can kiss my ass. Actually, as far as prices go, even the Hyatt Regency can kiss my ass. Four dollars for a bottle of water...
Sixth, it was great going out to dinner with Andy from The Z-Buffer. Because my co-workers hadn't seen much of the area, he ran us around and gave us the 50-cent tour. In exchange, I treated him to a semi-decent dinner at a local restaurant. We didn't get to talk much about Managed DirectX, but we had a good chat.
Seventh, managed code and Managed DirectX are making headway in game development. I wasn't the only one asking questions targeted towards managed code and MDX development. There were several companies that have already moved large chunks of their production pipelines to managed code due to the speed of development and ease of maintenance, and some that were developing content creation tools using MDX. I'm currently using both managed code and MDX in the testing tools that I create.
And finally, a note to the conference staff: It's rather silly to give us the documentation in a physical format that was allowed to be disabled in a recent update to Windows.
First off, it was great meeting a lot of the people at Microsoft who make game development on Windows such a compelling development environment. These guys were all extremely knowledgable about their craft and knew their stuff. Plus, it was great to be able to ask questions to the people who are actually developing their stuff.
Second, the most impressive demo (at least to me) was also (unfortunately) the most ignored one. All I can say is watch this space soon.
Third, I was kind of shocked by how much of an impression I've made. I met a few people who are now Microsoft employees working on various and sundry products who decided to shoot for Microsoft after seeing my presentation that I had made to the SIGDA chapter at the University of Utah. I met people who are still using tools I wrote three years ago. I met a good 40 people who knew about and read my blog regularly.
Fourth, if you haven't been using PIX for Windows, start. It's moved from being nearly useless to being almost on par with the Xbox version. Admittedly, the Xbox version can do some nifty things, but the Windows version actually gets some extra useful features.
Fifth, whoever was running up and down the hallway on the 20th floor of the Hyatt Regency pounding on the doors can kiss my ass. Actually, as far as prices go, even the Hyatt Regency can kiss my ass. Four dollars for a bottle of water...
Sixth, it was great going out to dinner with Andy from The Z-Buffer. Because my co-workers hadn't seen much of the area, he ran us around and gave us the 50-cent tour. In exchange, I treated him to a semi-decent dinner at a local restaurant. We didn't get to talk much about Managed DirectX, but we had a good chat.
Seventh, managed code and Managed DirectX are making headway in game development. I wasn't the only one asking questions targeted towards managed code and MDX development. There were several companies that have already moved large chunks of their production pipelines to managed code due to the speed of development and ease of maintenance, and some that were developing content creation tools using MDX. I'm currently using both managed code and MDX in the testing tools that I create.
And finally, a note to the conference staff: It's rather silly to give us the documentation in a physical format that was allowed to be disabled in a recent update to Windows.
Subscribe to:
Posts (Atom)