Chasing Coffee http://www.chasingcoffee.com/blog/ highly caffeinated, sardonic, evil bastard games programmer en-us matt@chasingcoffee.com Copyright 2005 2005-04-19T13:32:34-08:00 hourly 1 2000-01-01T12:00+00:00 Today's hungarian notation award http://www.chasingcoffee.com/blog/archives/001747.html Today's Hungarian Notation award goes to Microsoft for the following: pdidoi Pointer to a direct input device object instance. No actual name, just 6 characters of notation.... 1747@http://www.chasingcoffee.com/blog/ Today's Hungarian Notation award goes to Microsoft for the following:

pdidoi

Pointer to a direct input device object instance.
No actual name, just 6 characters of notation.


]]>
2005-04-19T13:32:34-08:00
Sideways data http://www.chasingcoffee.com/blog/archives/001715.html 1715@http://www.chasingcoffee.com/blog/ We're taking an interesting approach to data in our new prototype. In every project I've worked on in the past 6 years there was always a class like this


class GameObject
{
    Vector3 Position;
    char* Name;
    Geometry *Renderable;
    //etc etc etc
    virtual int Use();
};

Which leads to classes like this:


class PickupObject : public GameObject
{
    float PickupRadius;
    virtual int Use() { /* special pickup code */ }
};

And this is a perfectly valid approach that's worked well for thousands of games. It also seems to be a very natural way of thinking about the way to structure your data.

The main difficult with this approach is that it's difficult to keep your objects both lightweight and easy to refactor.

The approach we're taking:

Build a very simple lightweight database. Take all your data, divide it up into logical units (hitpoints, position, model name, physics data, etc) then each object gets an integer identifier. If an object needs a position an entry is added to the position database with the object's GUID. Property inheritance is done through a parentage/archetype database.

Restructuring data becomes a data problem. Use of data goes through a common query type interface.

There are known performance issues if you're looking for data that isn't there. This should be solvable with a combination of caching and strict rules governing archetype construction.

It's a bit like turning all the data on its side, but it seems to cause a few difficult problems (massive refactoring, inflexibility, data bloat, etc) to become a number of simpler problems (simple database design, simple reference counting).

--

Note: Other games (especially the Thief series) used this approach before we ever thought of it. Our work has been significantly helped along by presentations by: Doug Church, Michael Doherty, Alex Duran, and others.

]]>
2005-03-02T10:55:15-08:00
fear! terror! boredom! http://www.chasingcoffee.com/blog/archives/001703.html "Goss warns of terror threat to U.S." So, somewhere, sometime in the future, something bad might happen to someone within a couple thousand miles of you. Not that we should ignore this, but it's idiotic to have CNN blowing the FUD trumpet. Unless you happen to be in Iraq, in which case it's more of a "how many today" type of situation. But it's bad to think about real people getting blowing up. It's much more productive for people to be randomly afraid of nonspecific threats so that they'll be happy when authority figures abuse and harass them because then the authority figure is Doing Something. Ignorance is strength. Fear is happiness.... 1703@http://www.chasingcoffee.com/blog/ "Goss warns of terror threat to U.S."

So, somewhere, sometime in the future, something bad might happen to someone within a couple thousand miles of you.

Not that we should ignore this, but it's idiotic to have CNN blowing the FUD trumpet.

Unless you happen to be in Iraq, in which case it's more of a "how many today" type of situation.

But it's bad to think about real people getting blowing up. It's much more productive for people to be randomly afraid of nonspecific threats so that they'll be happy when authority figures abuse and harass them because then the authority figure is Doing Something.

Ignorance is strength.
Fear is happiness.

]]>
Politics 2005-02-16T14:28:01-08:00
stupid night http://www.chasingcoffee.com/blog/archives/001696.html Apparently last night was stupid driver night at Border's. I pull into the underground parking lot, take my ticket to make the gate open and a guy promptly pulls about 4 feet out of a parking space, blocking my way. He then sits there for about 2 minutes before backing his car straight into a bright yellow post. Fortunately, he went back into his parking space before he got out and started alternating between swearing and asking how to get out of the garage. On my way out I got to see someone make a 5 point turn in order to turn left around a corner. Just one of those nights...... 1696@http://www.chasingcoffee.com/blog/ Apparently last night was stupid driver night at Border's.

I pull into the underground parking lot, take my ticket to make the gate open and a guy promptly pulls about 4 feet out of a parking space, blocking my way. He then sits there for about 2 minutes before backing his car straight into a bright yellow post. Fortunately, he went back into his parking space before he got out and started alternating between swearing and asking how to get out of the garage.

On my way out I got to see someone make a 5 point turn in order to turn left around a corner.

Just one of those nights...

]]>
Life 2005-02-10T10:43:51-08:00
Maps http://www.chasingcoffee.com/blog/archives/001695.html Ok, I must admit that Google's new map thing is nifty. But I'm not sure why plugging in the search "Ale and Whores" for my local area managed to produce "Art Center College of Design".... 1695@http://www.chasingcoffee.com/blog/ Ok, I must admit that Google's new map thing is nifty. But I'm not sure why plugging in the search "Ale and Whores" for my local area managed to produce "Art Center College of Design".

]]>
2005-02-09T13:25:10-08:00
Every game http://www.chasingcoffee.com/blog/archives/001678.html Every game starts with a spinning cube on the screen. And meetings. Endless meetings. Now, if you'll excuse me, I'll go write that command console that we're supposed to be sharing with the other team.... 1678@http://www.chasingcoffee.com/blog/ Every game starts with a spinning cube on the screen.

And meetings.

Endless meetings.

Now, if you'll excuse me, I'll go write that command console that we're supposed to be sharing with the other team.

]]>
Programming 2005-01-18T17:24:03-08:00
Have yourself a merry little lamb http://www.chasingcoffee.com/blog/archives/001667.html Happy holidays! All SKUs of my project have been approved and I'm on vacation.... 1667@http://www.chasingcoffee.com/blog/ Happy holidays!

All SKUs of my project have been approved and I'm on vacation.

]]>
2004-12-25T10:36:27-08:00
life in the fast lane http://www.chasingcoffee.com/blog/archives/001647.html The lovely and talented Kasia has been laid off. Those looking to hire a talented programmer might want to scoop her up fast.... 1647@http://www.chasingcoffee.com/blog/ The lovely and talented Kasia has been laid off. Those looking to hire a talented programmer might want to scoop her up fast.

]]>
Life 2004-11-29T20:33:03-08:00
Waiting http://www.chasingcoffee.com/blog/archives/001646.html The worst part of the game submission process is the waiting. You know about those 10 places where tester #24 can reliably crash the game when running off DVD in release mode if he (and only he) yanks out the controller at exactly the right moment. You know about those 200 crash bugs that are all marked as "it happened once". You know that at least one tester was fired for being a completely incompetent boob. You know that the publisher has a crack team of demon testers that would be perfectly happy to have your game bounce from submission. And of course, you can't touch the product. Good thing I went out of town for Thanksgiving, it was easier to not-do stuff while I was out of the office.... 1646@http://www.chasingcoffee.com/blog/ The worst part of the game submission process is the waiting. You know about those 10 places where tester #24 can reliably crash the game when running off DVD in release mode if he (and only he) yanks out the controller at exactly the right moment. You know about those 200 crash bugs that are all marked as "it happened once". You know that at least one tester was fired for being a completely incompetent boob. You know that the publisher has a crack team of demon testers that would be perfectly happy to have your game bounce from submission. And of course, you can't touch the product.

Good thing I went out of town for Thanksgiving, it was easier to not-do stuff while I was out of the office.

]]>
Work 2004-11-29T20:24:10-08:00
perl http://www.chasingcoffee.com/blog/archives/001630.html I wrote a nice little perl routine to munge data today. That was so relaxing. No worrying about race conditions, or code executed during an interrupt, or running out of memory, or having a cascading failure that produces gradual fragmentation over the course of several hours. Just input data and output data. So relaxing.... 1630@http://www.chasingcoffee.com/blog/ I wrote a nice little perl routine to munge data today.

That was so relaxing.

No worrying about race conditions, or code executed during an interrupt, or running out of memory, or having a cascading failure that produces gradual fragmentation over the course of several hours. Just input data and output data.

So relaxing.

]]>
Programming 2004-11-08T21:18:58-08:00
ah geekdom http://www.chasingcoffee.com/blog/archives/001621.html Gotta love having an account on a multi-user unix system. Broadcast message from root (pts/2) Tue Nov 2 16:38:27 2004... go out and rock teh vote!!!! Broadcast message from root (pts/2) Tue Nov 2 16:38:27 2004... go out and rock teh vote!!!! (and yes, I voted. My cubemate didn't, but that's because he's a Canadian citizen, and it's against the rules for him to vote.)... 1621@http://www.chasingcoffee.com/blog/ Gotta love having an account on a multi-user unix system.

Broadcast message from root (pts/2) Tue Nov 2 16:38:27 2004...

go out and rock teh vote!!!!

Broadcast message from root (pts/2) Tue Nov 2 16:38:27 2004...

go out and rock teh vote!!!!

(and yes, I voted. My cubemate didn't, but that's because he's a Canadian citizen, and it's against the rules for him to vote.)

]]>
Politics 2004-11-02T15:13:35-08:00
what a wonderful world http://www.chasingcoffee.com/blog/archives/001612.html We live in an amazing world. I can now safely and legally send my ex-wife ebola or black death.... 1612@http://www.chasingcoffee.com/blog/ We live in an amazing world.

I can now safely and legally send my ex-wife ebola or black death.

]]>
Humor 2004-10-24T01:06:41-08:00
bend over and take it up your brainstem http://www.chasingcoffee.com/blog/archives/001608.html A couple days ago some odd black rectangles were installed in our elevators. I assumed that they were some sort of new security camera (several years ago our building management corporation was sued for rather a lot of money for failing to maintain a secure building in Chicago and has since become a bit paranoid). Yesterday, while I was riding up to my floor they came to life and turned out to be little LCD screens... that were displaying the logo of an advertising company... followed by ads. I think I would've preferred the security cameras.... 1608@http://www.chasingcoffee.com/blog/ A couple days ago some odd black rectangles were installed in our elevators. I assumed that they were some sort of new security camera (several years ago our building management corporation was sued for rather a lot of money for failing to maintain a secure building in Chicago and has since become a bit paranoid). Yesterday, while I was riding up to my floor they came to life and turned out to be little LCD screens... that were displaying the logo of an advertising company... followed by ads.

I think I would've preferred the security cameras.

]]>
Work 2004-10-21T09:49:57-08:00
Background noise http://www.chasingcoffee.com/blog/archives/001606.html Is spam a random event? There's a lot of it, it's full of garbage, no one person controls it. It seems like it could make an interesting random number generator. One of the old tricks for randomizing gameplay is to use the low bits off the analog inputs (or the disk seek times) to seed your random number generator. Seems like you could do the same sort of thing through statistical analysis of spam. It's probably an intrinsically bad idea to allow an external source influence your security, but the idea of using spam to improve the security of commercial transactions seems deliciously ironic.... 1606@http://www.chasingcoffee.com/blog/ Is spam a random event?

There's a lot of it, it's full of garbage, no one person controls it. It seems like it could make an interesting random number generator.

One of the old tricks for randomizing gameplay is to use the low bits off the analog inputs (or the disk seek times) to seed your random number generator. Seems like you could do the same sort of thing through statistical analysis of spam.

It's probably an intrinsically bad idea to allow an external source influence your security, but the idea of using spam to improve the security of commercial transactions seems deliciously ironic.

]]>
Humor 2004-10-20T16:12:41-08:00
Optimisery http://www.chasingcoffee.com/blog/archives/001604.html I suppose the up side of comment spam is that it's one way to find out what pharmaceuticals the terminally insecure are interested in.... 1604@http://www.chasingcoffee.com/blog/ I suppose the up side of comment spam is that it's one way to find out what pharmaceuticals the terminally insecure are interested in.

]]>
Spam 2004-10-20T11:59:02-08:00