Wednesday, January 28, 2009

A Division of Brainpower


Lead: I cut the size of the network packet and now the game doesn't seem to work.

Me: Let me see. Oh, yeah, here it is. You're probably running out of packets we've allocated in the queue. You need more of them.

Lead: Why would we run out?

Me: ... because you changed the packet size and now they're smaller?

Lead: If they're smaller, aren't we reducing the data size?

Me: ... nooo, because the amount of data you're sending is the same, but the capacity of the packets is less. So you need more packets.

Silence.

Lead: Ohhhh, I see what you're doing.


What was I doing? Was it "division"?

Tuesday, January 20, 2009

Reducing Brain Size

What if we used conditional goto's to reduce our code size?

Tuesday, January 13, 2009

OMG hax!

Looks like we used to use a m_Data array to store data... now we're writing over m_Data itself


Wait, what? m_Data stores data!? And... whatever the second part of that quote is all about...

ToggleBrain()


Lead programmer indicates a function in the code.

Lead Programmer: This function is calling Toggle() which is hiding our text.

Me: Yep.

Lead Programmer: The debug menu is not showing up anymore because of this.

Me: This function is only called when you choose to connect online. How did you get this problem to happen? Were you trying to go online?

Lead Programmer: No, I wasn't going online. I didn't say that I saw the problem when the code got there.

Me: So... why is this code the reason behind your problems?

Lead Programmer: I... just thought... you were... toggling... something...

Lead programmer walks away.

Wednesday, January 7, 2009

Probabilities

While discussing the game's rarity system:


Designer: So the game will feature 12 different objects that appear at random based on set probabilities.

Lead Programmer: Do you think we should keep track the number of times we've seen each of those objects?

Me: Why?

Lead Programmer: So you can know which object to spawn.

Me: ... well there are probabilities in the tuning...

Designer: Yeah.

Lead Programmer: But if there's a 1% chance that something will show up, you may never see it!

Me: ... yeah. That's how probability works. It's independent of the last time you did something. What would the point of different levels of rarity be if you just weighted unseen objects more heavily?

Silence.

Me: You do realize that if you flip a coin 50 times and get heads each time, it doesn't mean that you're more likely to get a particular result the NEXT time, right?

Silence.

Tuesday, January 6, 2009

It looks kinda obvious to me now

Oh, I see what you're saying! Start() will call Finish(). It looks kinda obvious to me now.

On repetition

While explaining packed animation data:


Programmer: If, in an animation, all the upper nibbles have the same value, it's a 16 color animation. If not, it's a 256 color one.

2 minutes later

Lead Programmer: I guess you could check whether the upper nibbles are identical.

A facade of programmer knowledge

What if we used a facade of virtual functions to solve this?