RE: Amnesia: The Second Dimension [SAD NEWS]
Nearly a month ago I decided to package up an alpha version of the first half of The Second Dimension, to catch any bugs early and leave me free to work on the second half. Boy, did it catch a bug. Flawless and Badcatz, the ready and willing alpha testers, hadn't even got their hands on it before I noticed a fundamental problem with the way Second Dimension works.
To move the visible player character and NPCs, there are looping scripts running constantly and doing a lot of work. As far as I know, no other CS or game has kept a loop going 30 or 60 times a second, performing all the necessary calculations, for such an extended period of time.
Now, I did lots of testing as I built the levels and everything seemed to be fine. It wasn't until I put the first-half-alpha together that I discovered the problem, as that was the first point when I was able to play through more than a couple of levels at a time. Depending on various factors, two, three or four levels play just fine, then the engine crashes whilst loading the next level. It's only indirectly related to memory and processing power, as it happens the same way on two very different PCs.
Lowering the frequency of the loops to, say, 10 times per second seems to help a bit, but the game is practically unplayable and the crash still happens eventually. I've experimented with so many tweaks and tried so many things to try and fix this, but even though I can improve performance at a cost to gameplay, I can't actually stop it from crashing after playing a few levels. There are also a few other weird symptoms, like texture loading errors that only occur after you've been playing for a while over multiple maps. Resource Monitor doesn't show an increase in memory or processor usage, so it must be some problem internal to the engine.
I've come to the conclusion that HPL2 just can't handle scripting so intensively over long periods. If there is a more efficient way of doing it that the engine can handle, then it is beyond me. Because a lot of people were excited about the videos, and because I've put such huge amounts of time and energy into it, it makes me sad to say that I don't think I can make The Second Dimension work.
If there is an advanced coder out there who wants to take a look at it, then I will be happy to let them, but be warned: the script is complicated, I don't use comments much, and I've already tried everything I can think of.
I've tried and tried. I'm really sorry.
|