Interview with Valve programmer Dave Kircher: Questions
88 replies, posted
I know it's been said before, but to make it even more obvious, is there going to be a Linux client in the near future, due to other services such as Desura creating Linux clients, and the Humble Bundles porting games over to Linux.
[QUOTE=BBgamer720;34245426]It can't be [I]THAT[/I] hard for them to do it, they've already built an OSX client, which is *nix based.[/QUOTE]
Uh, no it's not. It uses a BSD kernel but the OS is proprietary. I'd be very surprised if the OSX parts of the client weren't written in Objective C.
[QUOTE=Lexic;34245531]Uh, no it's not. It uses a BSD kernel but the OS is proprietary. I'd be very surprised if the OSX parts of the client weren't written in Objective C.[/QUOTE]
Meh, my bad. It'd still be awesome to see a Linux client though.
[QUOTE=OnDemand;34239598]What's the average amount of lines of code you write per day? And the maximum you've ever written in one day?[/QUOTE]
they probably delete nearly as many lines as they write
[editline]17th January 2012[/editline]
lines of code is a shitty metric anyhow
[QUOTE=swift and shift;34247451]they probably delete nearly as many lines as they write
[editline]17th January 2012[/editline]
lines of code is a shitty metric anyhow[/QUOTE]
And a very discouraging one.
[QUOTE=Lexic;34245531]Uh, no it's not. It uses a BSD kernel but the OS is proprietary. I'd be very surprised if the OSX parts of the client weren't written in Objective C.[/QUOTE]
It's still just cross-platform programming though. Add a derived class for things that are OS-specific and you're good to go. It's not that easy, but it's a fact that having written the Mac OS X client a few months ago has probably helped them a ton for a potential Linux port.
[QUOTE=swift and shift;34247451]they probably delete nearly as many lines as they write
[editline]17th January 2012[/editline]
lines of code is a shitty metric anyhow[/QUOTE]
The days where I write the most lines are usually the days where I find the least amount of issues/fix the least amount of bugs/document the least amount of code. (I don't include comments in lines)
The LoC metric plain sucks. A good day might mean writing 10 classes and a few interfaces and rigging them up, or a good day might mean deleting 2 classes, refactoring 8 others and deleting 50 net lines of code.
It's fun for bosses because they think they can pinpoint things, but the metric only works if you have someone who is really slacking off (not happy at work/lazy/etc)
[QUOTE=Lexic;34245531]Uh, no it's not. It uses a BSD kernel but the OS is proprietary. I'd be very surprised if the OSX parts of the client weren't written in Objective C.[/QUOTE]
I think it's more likely they just ported their c++ code. Why would they add another language to their codebase?
[QUOTE=DeadKiller987;34254151]I think it's more likely they just ported their c++ code. Why would they add another language to their codebase?[/QUOTE]
i think it's more likely they have two platform layers that the rest of the app talks to
[QUOTE=DeadKiller987;34254151]I think it's more likely they just ported their c++ code. Why would they add another language to their codebase?[/QUOTE]
Uh, because OSX doesn't have a C++ library for desktop integration. If you want to do anything with a GUI on a mac, you need to either use Objective C (which will happily run your C++ backend) or convert your entire program to run through a massive library like QT.
Can we still post questions?
My question is [i]"what kind of programming patterns and/or algorithms does the Source Engine use?
Does the engine use the MVC (Model, View, Controller) pattern or maybe a pattern that I've never heard of?"[/i]
I don't need 10 page essay, but just a few pointers (and names of any pattern/algorithm) so I know what to research to increase my knowledge as a game programmer.
-snip-
What are the basic steps physics-wise, graphics-wise and entity-wise for rendering and computing portals? What did you find hardest when dealing with portals?
[QUOTE=Randdalf;34283146]What are the basic steps physics-wise, graphics-wise and entity-wise for rendering and computing portals? What did you find hardest when dealing with portals?[/QUOTE]
Rendering is pretty easy. Source's renderer probably exists of multiple views, the renderer is batched with picking up the settings from each view and rendering it <to some location (backbuffer, etc.)>.
They then define a view for each portal, the renderer renders those out to a texture and they're composited in/rendered into the main view scene.
Physics is probably rather interesting given the 'hole in the wall' that it provides.
[QUOTE=Randdalf;34283146]What are the basic steps physics-wise, graphics-wise and entity-wise for rendering and computing portals? What did you find hardest when dealing with portals?[/QUOTE]
this topic has been covered pretty widely already
[QUOTE=swift and shift;34247451]they probably delete nearly as many lines as they write
[editline]17th January 2012[/editline]
lines of code is a shitty metric anyhow[/QUOTE]
It's more of a fun question than anything else. It's just to get an idea of what the professionals do in their day. Obviously there's a lot of of erasing and testing before those final lines appear so since I'm not a business man I won't laugh if they tell me they do ten lines of code a day due to the complexity of the work. Needless to say I agree with the lines of code being a shitty metric, in fact, I did not know it was considered as a metric by the bosses.
[QUOTE=Greyh0und;34276911]Can we still post questions?
My question is [I]"what kind of programming patterns and/or algorithms does the Source Engine use?
Does the engine use the MVC (Model, View, Controller) pattern or maybe a pattern that I've never heard of?"[/I]
I don't need 10 page essay, but just a few pointers (and names of any pattern/algorithm) so I know what to research to increase my knowledge as a game programmer.[/QUOTE]
If you want to be a good programmer, forget about thinking in terms of patterns. They help, and they're good concepts when you understand how they work and how you should apply them, but if you write a program and go "Okay, should I use Flyweight, Facade, Decorator, ..." you're doing it extremely wrong.
The way it works is that you recognize a problem, see that it is solved easily by a particular pattern, and then you apply it (with slightly adaptations if needed, but be consistent).
Ok, so I put together a list of questions from you guys.
Not counting my questions, there's about 30 questions from you guys I will be asking.
I should be doing the interview soon.
So I'm not accepting any more questions.
I hope my question is included
So, I'll probably be doing it next Steam update. The current one is unfortunately buggy and likes to crash a lot.
Send him an e-mail with the questions? Come on, it's been weeks already
[QUOTE=Fox-Face;34430403]Send him an e-mail with the questions? Come on, it's been weeks already[/QUOTE]
God damn be patient.
[QUOTE=Fox-Face;34430403]Send him an e-mail with the questions? Come on, it's been weeks already[/QUOTE]
Yeah, I know it's been a while. Sorry about that real life stuffs getting in way, etc.
I promise to do it as soon as I can.
make sure you remember to ask about this:
[QUOTE=swift and shift;34086182]Does the person who wrote this still have their job?
[img]http://i.imgur.com/Reqnl.png[/img]
[url]http://cdn.steamcommunity.com/public/javascript/global.js[/url][/QUOTE]
i actually want to know
[QUOTE=swift and shift;34438652]make sure you remember to ask about this:
i actually want to know[/QUOTE]
I actually want to know what all of that means.
[QUOTE=swift and shift;34086182]Does the person who wrote this still have their job?
[img]http://i.imgur.com/Reqnl.png[/img]
[url]http://cdn.steamcommunity.com/public/javascript/global.js[/url][/QUOTE]
Well, I guess that's one way to avoid the garbage collector if you use
[code]setTimeout( this.selfRef + ".doRequest()", 200 );[/code]
instead of
[code]setTimeout( this.doRequest, 200 );[/code]
This one worries me more:
[code]function setCheck(checkDiv, checkField)
{
realField = eval('document.loginForm.'+checkField);
curVal = realField.value;
if(curVal == 0)
{
document.getElementById(checkDiv).style.color = '#909090';
realField.value = 1;
}
else
{
document.getElementById(checkDiv).style.color = '#000000';
realField.value = 0;
}
}[/code]
(It doesn't seem to be used anywhere, at least.)
[QUOTE=Tamschi;34439466]Well, I guess that's one way to avoid the garbage collector if you use
[code]setTimeout( this.selfRef + ".doRequest()", 200 );[/code][/QUOTE]
the stuff is all still referenced from a global variable so that wouldn't change anything.
I think they just don't know about anonymous functions and closures
[QUOTE=swift and shift;34439728]the stuff is all still referenced from a global variable so that wouldn't change anything.
I think they just don't know about anonymous functions and closures[/QUOTE]
Doesn't setTimeout(code, delay) just eval the string after the delay?
If they had used setTimeout(func, delay) they wouldn't need the global.
[editline]29th January 2012[/editline]
Or do you have to pass [I]this[/I] explicitely? My JavaScript isn't that good anymore.
[QUOTE=Tamschi;34441265]Doesn't setTimeout(code, delay) just eval the string after the delay?
If they had used setTimeout(func, delay) they wouldn't need the global.
[editline]29th January 2012[/editline]
Or do you have to pass [I]this[/I] explicitely? My JavaScript isn't that good anymore.[/QUOTE]
fact of the matter is that they're doing everything wrong
Sorry, you need to Log In to post a reply to this thread.