Just wanted to mention this somewhere. I have come across several bugs that aren’t really explainable. I’m left to assume that deep in the bowels of either UE3’s memory management or DirectX or Windows, there are some bugs and I am stumbling into all of them. It’s either that or my game is possessed by an evil spirit and I need to find a priest willing to exorcise it.
Until then, maybe a couple of these bugs that I list will help you somehow if you come across something similar.
- The UnrealScript interpreter doesn’t always handle optional parameters. I’ve found that in some very specific circumstances (as in, attacking an enemy on a specific hex on a specific map), the UnrealScript interpreter crashes. By logging everything, I found out that the game crashed when I called a function, leaving out optional arguments. When I removed the optional keywords in the function definition and explicitly passed all the arguments every time the function is called, the bug went away. I found a similarly inexplicable crash later and on a hunch checked to see if a function with optional parameters was involved. It was.
- I had a problem with translucent decals writing depth. Normally that wouldn’t be an issue, but my game has a Sobel edge postprocess filter (like in Borderlands) that was drawing lines inside my decals. That problem went away on its own. Epic sure didn’t update my code. So either Microsoft or Nvidia changed something and didn’t tell me. Or maybe it was ghosts.
- One of my players was plagued by an issue I couldn’t reproduce, where the characters in his army would just run off at inopportune moments. Like he would go into the menu where you organize squads, and a bunch of his characters would decide to go for a walk. Or he would deploy his army on the battlefield, and a bunch of them would get distracted by a squirrel or something, and off they ran. The player found a workaround for the issue–by turning off the Sobel postprocess effect. So either something deep down in memory pointers got mismatched and characters were looking at postprocessing to decide whether to go for a walk. Or ghosts.