22/Oct 2010
By admin
8 min. read
Big weekend news were EA releasing some of their codebase source, including parts of EASTL. Given that the original EASTL document has been the main inspiration for my RDE STL experiment, I was very interested in finally seeing the code itself. First impression - it’s still big. It is leaner than STL, but it is a big library. That’s quite understandable if you remember it’s not a local, one studio thing, it’s used by the whole organization.
9/Oct 2010
By admin
4 min. read
Few years ago I wrote a short article about dealing with heap corruptions (buffer over/underruns). I mentioned that even after applying described techniques, the biggest problem with overruns is that they’re detected when memory block is freed, not when the actual corruption happens. Those two moments can be very far apart from each other, which complicates debugging. I described some workarounds, but they were not really anything I’d call a satisfying solution.
2/Oct 2010
By admin
1 min. read
Recently, I’ve been getting mails asking about license that applies to various code snippets published here. I never actually bothered to think about it and it seems like there is a zillion of different licenses out there. zlib seems like one of the most reasonable ones (and it’s so short I could be arsed to read it), so that seems like a good choice. It doesn’t really change anything, but I put it here (and here), just so that it’s obvious.
28/Sep 2010
By admin
1 min. read
Few years ago I mentioned a nice little program by SysInternals - Process Explorer (task manager replacement). I install it everywhere I go. Recently, I ran into weird problem, however. My work machine runs Windows 7 64-bit. PE works perfectly, the only problem is that I couldn’t make it to replace standard Task Manager. There is a menu option that should do just that, but running it didn’t change nothing.
26/Aug 2010
By admin
9 min. read
Recently, I’ve been experimenting a little bit with different kinds of MT-safe containers. I wanted to compare a performance of various kinds of containers I’ve had lieing around. It turned out it’s more tricky than I expected, as under Windows, results vary wildly from one run to another. I’m not even speaking about container performance, just running same task can be many times slower (see this note for example). Include similar problems with managing the threads themselves (sometimes they wake up too late or not at all) and you should get the picture.
11/Aug 2010
By admin
2 min. read
On Sunday we’ve returned from a short vacations in Cuba. As usual, it wasn’t really a conscious choice, rather a result of having to choose some destination, as my vacation date approached. As it turned out - it worked out great. If I’d have to sum up Cuba (and especially Havana) in one word it’d be irrational. Country like that has no right to exist, yet it does. What makes it feel even more weird, it’s a mere 3 hours flight from Toronto, but it feels like a different planet or like there’s a time machine involved.
4/Jul 2010
By admin
3 min. read
In my previous note I mentioned that IDs are my favourite form of weak references. By pure coincidence, just recently Noel made one of his Inner Product articles public and it deals with very related subject. As a matter of fact Noel’s implementation of HandleManager has been a starting point for the one I use for my home projects. I use it not only for dealing with resources, but as a general ID->pointer resolver.
27/Jun 2010
By admin
5 min. read
Over the years, I’ve seen plenty of different code bases - open source projects, internal game engines, my own experiments. Some of them were just bad and buggy, but in many situations I found something that could only be described as ‘smartness overload’. An obviously skilled & experienced programmer just tried too hard. There’s a great quote attributed to Brian Kernighan: ‘Debugging is twice as hard as writing the code in the first place.
15/May 2010
By admin
6 min. read
One of the most basic truths about optimizing existing code is: there are no low hanging fruits. Your coworkers are not stupid, it’s not like you can just add some switch or line and code will magically run two times faster (at least not often). ‘Easiest’ way nowadays is probably some form of parallalization, but it’s not always possible. Usually, it’s more a series of mundane tweaks, day after day, shaving few cycles here, few there.
25/Apr 2010
By admin
11 min. read
Short list of tips & guidelines that every game developer should keep in mind. No rocket science, common sense, really, but it’s still relatively rare to find codebases that apply to them. It’s especially aimed at gameplay programmers, who operate a little bit further up from the metal. With todays hardware, cache can be your biggest friend or enemy, CPUs got the the point where a few extra calculations hurt much less than a single cache miss (so LUT is not always the best option, for example).
4/Apr 2010
By admin
2 min. read
Venice is truly one-of-a-kind city. I’ve ‘been’ there almost 8 years ago when returning from Italy by train (long story involving lost plane connection), but it was continental part then (Mestre) and only for 2 hours. For some reason I thought that the rest of the city looks the same, just with some canals here and there. Couldn’t be more wrong. Basically, it’s more of a museum than a city.
28/Mar 2010
By admin
1 min. read
OK, I’m back. Just for a few days, though. I’m crashing at my sister’s place, as our flat is rented. There’s rather crappy internet connection here, so no Venice photos yet. I’ve updated (very roughly) my GDC note. In the meantime - GDC vault has been updated, so you can find most of the papers there. I will try to upload some photos when I get to the hotel in Canada.
19/Mar 2010
By admin
1 min. read
As I mentioned - I’m flying for a quick vacations tomorrow, so I will not be able to update the GDC links. This post is mainly to trigger RSS readers, as I’ve added some new stuff during last week. Feel free to add new links in the comments, I will move them to the post when I get back. In the meantime people can just dig them out from the comments section.
17/Mar 2010
By admin
6 min. read
About two weeks ago I had my last company beer/good-bye party at Starbreeze. I need to deal with lots of formal stuff in Poland now, then I’ll have a short vacation (flying to Venice next week) and then I will move to Canada to work for Digital Extremes. It really wasn’t easy decision as I had great time in Sweden and Starbreeze, but the offer was just too good to pass, one needs to take risks sometimes.
9/Mar 2010
By admin
2 min. read
I’ll keep updating this post with links as I find them. Pål-Kristian Engstad (Naughty Dog) - Introduction to SPU Optimizations, part1 & part2 (not sure if those are official GDC2k10 papers, but have been just released and are great),
Glenn Fiedler (Sony Santa Monica), Networking for Physics Programmers (slides + demo),
Havok demovideos,
Kent Hudson (2K) - The AI of BioShock 2: Methods for Iteration & Innovation (slides, keep an eye on Kent’s GDC page, versions with annotions to come),
27/Feb 2010
By admin
2 min. read
Data breakpoints are one of the most helpful debugger features when trying to hunt for memory overwrites/ninja variable modifications. In majority of cases it’s enough to set them up from debugger, however, there are situations when it’s not possible. Sometimes breaking into debugger changes program behavior (I had this problem just yesterday), sometimes we don’t want to catch every variable access, just some of them (as others are legal). In situations like that we need to set data breakpoints from code.
20/Feb 2010
By admin
3 min. read
Simple technique that can help in making code more future-proof and easier to modify. Applicable in most situations where two subsystems need to exchange informations. Let’s imagine the following scenario - for some reason we need to introduce ‘unlimited mana’ feature in our game. If hero is in berserker mode, his attributes increase, time slows down, he is able to cast spells even if he’s out of mana and his mana pool doesn’t deplete at all.
9/Feb 2010
By admin
4 min. read
Little challenge posted by a workmate. Good for those 5 minute breaks at work when you need to force your brain to think about something else than your current task. Recode the following piece of code so that it doesn’t use branches/multiplies:
unsigned char* oldStart = 0;
if (m_start + size < m_bottom)
{
oldStart = m_start;
m_start += size;
}
return oldStart; Don’t read below if you want to try it yourself.
31/Jan 2010
By admin
5 min. read
Few weeks ago I’ve been watching The Curious Case of Benjamin Button. It is a nice movie, but also painfully long - almost 3 hours. It got me thinking - are movies getting longer & longer? I could have sworn that I have remembered them to be shorter, usually around 1.5h, now it feels like it’s closer to 2h. Obviously, this was only my impression, I had no hard data to back it up.
27/Jan 2010
By admin
1 min. read
Another interesting photo technique (named after Michael Orton). To be perfectly honest, I’m not that big fan, it makes images a little bit ‘cheesy’. However, it should be interesting for every graphics programmer, as the idea behind it is almost exactly the same as behind fullscreen glow/bloom effect. Basically, it’s a blend of two images, the original one & overexposed/blurred layer. Sample result:
Old comments Riddlemaster 2010-01-27 21:00:10 I hate bloom :) but still… it would be great if games looked like this - great picture ;)