Well, originally - meaning before we incorporated really any of the patches - the game is very stable. After all, it was already programmed and tested by Konami!snatchernaut wrote:and i was only wondering. i have played through the game on many occasions. i was just wondering on how many items you have come across which you would consider to be a bug in the game with the translation as opposed to those if any that were originally in the game anyway!
When you introduce new assembly code and you're doing the programming at such a low-level without any sort of compiler or memory manager to help you, it's really difficult to know whether what you're doing has long-term or global effects to the game's stability.
The main hack I did for the in-game text is a three parter. You have to:
1. Hack the actual dialogue that appears below the game window. This is the majority of all text - it's whenever the characters speak (without voice actors), so as you can imagine it's the most prevalent and far-reaching effect. Konami however, packaged filenames and function calls along with the text, so my hack had to be smart enough to say, "Do this differently for English, but leave this other stuff alone."
So early on, you'd get in English in the prologue but certain parts of the game were unplayable. An example of this is a file called "telop.pak" which - unsurprisingly - is called upon when a telop appears onscreen. Since it's a filename, I don't want my hack trying to translate or readdress that, but early on I wasn't dealing with it correctly, so when you'd get a telop (which is quite often) the game would report a READ ERROR 10007 onscreen and either hang, not display the telop, or just move on after reporting the error. This is obviously very unacceptable.
So I started accounting for filenames - my patcher/hack basically marks those as "critical sections" and leaves them alone - it lets the game do its thing and only uses new routines for real text.
But a little bit later, I discovered Konami also put plain keywords in there, that were also not meant for display and had to be left alone. While some were obviously keywords and I could tell the hack to explicitly ignore them (such as "SANGO" or "ttt", strings unlikely to be present in a characters' dialogue), others were a lot trickier. One was "roll" which, while I can't think of any good examples right now, could presumably appear in the English.
But another one was "blood" which you can imagine, appears quite a lot.
So a big challenge is how to get my patcher to retain keywords which could also collide with the actual text itself.
In the end, it really wasn't that hard. The hack uses control codes I introduced to know when "blood" is in printed dialogue and should be displayed onscreen versus when it's a keyword and should be left alone. You can imagine though, the game would hang or skip certain events if these keywords were not present (usually hang).
The keywords just happened to start around Act 2, so I would say...
- I started the hack on the Prologue. Here, it was still in major development, so as expected, it took awhile to get working at all in English. Once it did, a lot of playtesting helped tighten it up.
- Act 1 introduces multiple new files (the Prologue is really only 2) so now the hack got a workout in terms of new data sets. It handled it okay, but at that point, it wasn't fully developed enough, so while it crashed a few times, a lot of times, the English wouldn't appear correctly. That said, that was where momentum picked up and I was able to do scene-after-scene requiring only some tweaking.
- Act 2 is really where Policenauts hit me hard and started throwing in these keywords. There were a lot of hangs in Act 2, which you may know, is where a lot of cool stuff starts happening. So you can imagine that was especially frustrating to me to have to start a cool scene, and then do programming in order to see what happened next.
- But by Act 3, I'd now seen pretty much everything the game had to throw at me in terms of exceptional cases and the rest of the game flew by in comparison. We still get bugs here and there, but they're mostly "garbage-in/garbage-out" - meaning something went wrong with the text file Marc sent me (like DOS linebreak kind of crap - nothing that's his fault, just stupid things I have to remember to keep an eye out for or make my patcher account for)
I think it's very solid now and honestly, I'm sort of surprised whenever we get a bug in that aspect. At this point in the build, I do not know of any bugs directly related to the text patching hack and I think it will work as is for the finished product. *crosses fingers*
2. Menus
Menus which come up when you click items or have conversations with characters were a bit easier than the in-game text because they worked mostly the same... but they came with a big, big problem. It ended up being the third part of the hack...
3. Memory allocation
Yikes.
Menus are graphics that have to be accounted for. Policenauts needs to know how many characters are in each menu item in order to draw it correctly. So it has a separate routine for counting those. BUT, and here's where it go tricky, it'd use that same routine and memory space for other graphics stuff.
I had a LOT of problems with this as screwing with this part of the game meant tons of graphical glitches, which - as you can imagine - is confusing when I started on it, since I wasn't touching the graphics. (Or so I thought.) This is where thorough playtesting saved us. Doing the Prologue over and over and over thoroughly were the only way we could identify why things fucked up the way they did.
There's no great examples or tech explanation of how it was accounted for. Suffice it to say, if my hack screwed up at any point in either menus or in-game text, you might just get a text glitch or something garbled. If it screwed up here, it severely affected the game. Fortunately now, I think it's stable enough but only further testing will assure that.
This is a long post, but the summary is that the game started very stable, but by manually introducing new "compiled" code, we're effectively introducing instability, so it's all about thorough testing and figuring out exactly what I did wrong and why the game wasn't working like I thought it did.
At this point in the build, I think you can play through the whole game and it will not crash. But honestly, we'll only know after very thorough testing.
As far as bugs in the original, really only one or two.
Parts of Policenauts are a little sloppy behind the scenes (the original, I mean), but you never see that as a player because hey - if it all works, it all works. But when I have to recode that, I have to deal with it. And I'm not one to talk. I've been in that situation where it's 2AM and I just wanna be done, so I throw something together and it bites me in the ass the next morning because it broke something else.
I will say that one scene in particular - right now - works a TON better than it did in the original game, but I'll leave that for that when the hack's released and I can talk in more specifics without spoiling stuff.
And also we have the very silly feature of being able to turn off the telops if you really don't like them, which is an option not present in the original game.
edit: If you're wondering why the hack takes so long, it's because all this shit I just wrote is ONE PART of the whole thing. I'd say there are five major parts of the hack total, with ten or so smaller pieces.