Discworld

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
User avatar
sev
ScummVM Lead
Posts: 2306
Joined: Wed Sep 21, 2005 1:06 pm
Contact:

Post by sev »

hal9000lives wrote:They game was written in a separate compiled language called Tinsel. It was compiled down to P-Code which is basicially a sequence of low-level instructions stored as byte values (a bit like assembler)
When you mentioned it for the first time, I was scared by buzzwords like P-code. But when I looked into the sources, it appeared that that is a usual virtual machine. Usual in terms of engines already supported by ScummVM. Moreover, there are more complicated cases with nested P-codes in other engines.

I mean that we effectively fixed script bugs in majority of our engines, taking in account that those are bugs, not missing features like cutscenes. So I expect ScummVM reimplementation be better and more stable that original, as it proved to be in most of our already supported engines, and at least some bugs will be definitely fixed.

What really unique to DW is co-routines, but those are really hacky, and we will try to refactor the engine in order to get rid of them.


Eugene
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

To clarify what Eugene wrote: We already work around game script bugs in many other engines (e.g. the SCUMM engine). This works with existing releases of the game, and does not require to recompile the game scripts etc. -- so it's a bit more work, but certainly feasible.

So we might get a bug report, then discover it is caused by a script bug. When that happens, we add code to the engine which dynamically patches the affected script, resp. works around the bug there, using various techniques.
User avatar
hal9000lives
Posts: 8
Joined: Wed Aug 01, 2007 8:54 am

Post by hal9000lives »

fingolfin wrote:To clarify what Eugene wrote: We already work around game script bugs in many other engines (e.g. the SCUMM engine). This works with existing releases of the game, and does not require to recompile the game scripts etc. -- so it's a bit more work, but certainly feasible.

So we might get a bug report, then discover it is caused by a script bug. When that happens, we add code to the engine which dynamically patches the affected script, resp. works around the bug there, using various techniques.
ScummVM fixing engine bugs is expected. I imagine it will run a lot smoother than the original.

Fixing the game code, from the P-Code only, will be an "interesting" excercise, as DW1 was released with over 250 known script bugs. Even the very last bug-fix release had dozens of script bugs, so please ensure you at least have the very last released data to avoid lots of extra problems.

Here is a practical example: The DW1 engine only supported global variables and global tags (I requested that local scene variables and local scene tags be added to the engine for DW2). That means the state of a tag called "butterflies" in one scene accidentally modifies the state of another "butterflies" tag in another scene. Obscure problems like that are going to be very hard to fix without source scripts for reference. Heck, they were even hard to fix with the source scripts! :)

Cheers, Dave
Ceri Cat
Posts: 149
Joined: Wed Jun 11, 2008 3:47 pm

Post by Ceri Cat »

That's just a tad sloppy Dave codewise to not allow for local variables in the first place.
It's fixable, but it's definitely a lot of hard work and trial and error to even find where the fixes need to be made. *sighs* Surprised there weren't fan fixes for that sort of thing though after you guys had moved on.
User avatar
hal9000lives
Posts: 8
Joined: Wed Aug 01, 2007 8:54 am

Post by hal9000lives »

Ceri Cat wrote:That's just a tad sloppy Dave codewise to not allow for local variables in the first place.
It's fixable, but it's definitely a lot of hard work and trial and error to even find where the fixes need to be made. *sighs* Surprised there weren't fan fixes for that sort of thing though after you guys had moved on.
Sloppy? Dave? Speak to the Tinsel engine developers :)

As has been pointed out I was "only" the guy who:
scripted most of the 2 games...
wrote the animation package...
generated the actor's scripts...
created miscellaneous tools...
built the installers...
compiled all the assets...
defined the language changes...
put all the pieces together for mastering...
blah blah blah etc etc (you get the picture)

16 hours a day, 7 days a week for 90 days straight at the end of DW2... and in the end I left Perfect with nothing but grief and bad memories :lol: (oh, and 20,000 Discworld 2 animation frames)

Actually Gregg Barnett (the game's designer) defined the original language features and felt it could all be done with global settings. He has a much larger mind for retaining facts than us mere mortal programmers :)

Dave (sorry for rambling on... it's been a very long week)
Last edited by hal9000lives on Fri Jun 20, 2008 4:16 pm, edited 2 times in total.
User avatar
hal9000lives
Posts: 8
Joined: Wed Aug 01, 2007 8:54 am

Post by hal9000lives »

Ceri Cat wrote:That's just a tad sloppy Dave codewise to not allow for local variables in the first place.
It's fixable, but it's definitely a lot of hard work and trial and error to even find where the fixes need to be made. *sighs* Surprised there weren't fan fixes for that sort of thing though after you guys had moved on.
P.S. I fixed all these, including with local variables, in the previously mentioned director's cut of DW1 (using the DW2+ engine).

If anyone out there knows the whereabouts of the 1Gb Discworld Jaz discs... please let someone know! Anyone from Psygnosis still alive and kicking? :)
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

hal9000lives wrote: Fixing the game code, from the P-Code only, will be an "interesting" excercise, as DW1 was released with over 250 known script bugs. Even the very last bug-fix release had dozens of script bugs, so please ensure you at least have the very last released data to avoid lots of extra problems.
Ouch.

In the end, I guess it will depend on the nature of the bug. Some script bugs may be easy to work around. Others not.

For instance, Broken Sword 2 has a few known script bugs (including the infamous "pyramid bug") which happen simply because a script forgets to reset a variable, or un-hide the mouse cursor, before the script ends. Those are easy to fix, once the problem has been identified. (I don't know if that's also true for the Tinsel engine, but I'm using this as an example because I'm familiar with it.) But there's also one known problem which is caused by things happening in the wrong order within a script, and I couldn't find any simple way of working around that. Since the only consequence was that an object vanished from the screen before the animation of the player picking it up, it didn't seem worth the trouble to look for a hard way.

Hopefully, most of the remaining Discworld script bugs are of the harmless and/or unlikely variety. I didn't notice any the last time I played the game, at least.
User avatar
hal9000lives
Posts: 8
Joined: Wed Aug 01, 2007 8:54 am

Post by hal9000lives »

eriktorbjorn wrote:Ouch.

In the end, I guess it will depend on the nature of the bug. Some script bugs may be easy to work around. Others not.

For instance, Broken Sword 2 has a few known script bugs (including the infamous "pyramid bug") which happen simply because a script forgets to reset a variable, or un-hide the mouse cursor, before the script ends. Those are easy to fix, once the problem has been identified. (I don't know if that's also true for the Tinsel engine, but I'm using this as an example because I'm familiar with it.) But there's also one known problem which is caused by things happening in the wrong order within a script, and I couldn't find any simple way of working around that. Since the only consequence was that an object vanished from the screen before the animation of the player picking it up, it didn't seem worth the trouble to look for a hard way.

Hopefully, most of the remaining Discworld script bugs are of the harmless and/or unlikely variety. I didn't notice any the last time I played the game, at least.
I don't think many people noticed more than a couple of serious bugs in the first release (there was a floppy disc patch in the first boxes sold). Even the first version was playable unless you were unlucky.

Once thing you may be able to fix easily are the dimensions of a polygon tag which marks a worm in the street scene. I made it too accurate to the shape of the worm and that is a very small worm to click on!

Dave
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

hal9000lives wrote:I don't think many people noticed more than a couple of serious bugs in the first release (there was a floppy disc patch in the first boxes sold). Even the first version was playable unless you were unlucky.
I remember running into some minor glitches the first time I played the game. Mostly layering problems, where an actor was drawn behind something, instead of in front. And I seem to recall some problem near the very end of the game, where it showed an animation of Rincewind using an object he didn't yet have, thus giving away part of the solution.

I'm not sure which version of the game it was, but it had English speech and subtitles in a few non-English languages. (Once I had bought another second-hand copy, with English subtitles, I got rid of the first one, so I no longer have it.) But for all I know, these may have been DOSBox bugs, rather than Discworld bugs. :)
Ceri Cat
Posts: 149
Joined: Wed Jun 11, 2008 3:47 pm

Post by Ceri Cat »

I wasn't blaming you for it Dave, just talking directly to you. The other thing Greg ignored was multiple people would be working on it, and the more people working together, the better the chance of such discrepencies occuring. It's part of why certain standards are adopted in such environments such as a prefix for which room, act of the game (if relevent), etc.
User avatar
JamesWoodcock
Posts: 222
Joined: Wed Nov 09, 2005 12:20 am
Location: England UK
Contact:

Post by JamesWoodcock »

Just out of curiosity, where are we currently at with the task of getting DW1 working within ScummVM and how is it progressing :)
Reckless
Posts: 221
Joined: Tue Nov 01, 2005 1:12 am

Re: Easter egg

Post by Reckless »

hal9000lives wrote:You may have read that I rebuilt a Director's cut of DW1 using the DW2 engine (fixing all the game bugs and restoring missing cut-scenes), but that required a recompile of the game scripts and sadly that version and all game scripts are "long gone". Not realising the significance of the changes, Psygnosis did not want to pay to re-test the game. Any mentions you see of a released verson of the director's cut are malarky. To my knowledge only bug-fixes went out in later release. Real shame. I was quite proud of that version... even the butterflies made more sense! :(

Cheers, Dave
Dave, are you referring to the information here which does indeed suggest the 'Director's Cut' version was released (not one but 2 even!)? I recall 'back in the day' that the first CD-ROM release was buggy [and Psygnosis even sent out a replacement]. That version & replacement has long since gone so I picked up another copy from eBay. That has later dates than the 'latest' patch I could find. I got the CD from a US seller - so perhaps there were version differences across regions?

For example, on my CD (which is picture CD as opposed to the Argentium release), the game executable is:

Code: Select all

DWB.EXE 28/04/1995 13:45
where as, in patch (disc_up.zip) which has the following readme text echo This version works on any released version of Discworld (these should echo have timestamps of 3/20/95 or older).
echo WARNING: Version 1.04 of Discworld may NOT be compatible with your echo current saved games.
it's:

Code: Select all

DWB.EXE 24/03/1995 11:25
Also the sound drivers included in the patch also predate those files on the CD. Is there any way to identify which version of the game it really is?
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

The game basics are working, and we already managed to completely play through the game. However, there are many portability issues we still have to address, some of them quite complicated, and at least one severe (might force us to fundamentally rewrite some of the original code). We want to resolve those before going public. Also, there are various playing bugs (some might have been introduced by us, some might just be bugs in the original). However, those could also be resolved after going public.

All in all, we are making good progress. But don't hold your breath on when it's going to be released as the answer will be "when it's done" :)
NosPiraatu
Posts: 2
Joined: Thu May 08, 2008 9:53 pm
Location: UK

Re: Easter egg

Post by NosPiraatu »

Reckless wrote:Dave, are you referring to the information here which does indeed suggest the 'Director's Cut' version was released (not one but 2 even!)?
No, that wasn't released.
Reckless wrote:For example, on my CD (which is picture CD as opposed to the Argentium release), the game executable is: DWB.EXE 28/04/1995 13:45
That's the same as the Argentium release.
Reckless wrote:where as, in patch (disc_up.zip) which has the following readme text echo This version works on any released version of Discworld (these should echo have timestamps of 3/20/95 or older).
echo WARNING: Version 1.04 of Discworld may NOT be compatible with your echo current saved games.
it's: DWB.EXE 24/03/1995 11:25 Also the sound drivers included in the patch also predate those files on the CD. Is there any way to identify which version of the game it really is?
The sound drivers on the original CD interacted badly with 3xSpeed+ CD drives to cause crashes. The patch disc was the same engine code but with different sound drivers, and (obviously) worked with the original released data.

As far as I'm now aware there were 3 versions - original (late Feb), updated (early May) and finally one in December.
The 'director's cut' essentially used a version of the DWII engine and was never completed (in a tested and shipped sense).
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

sev posted a status update concerning DW in his blog:
http://sev-notes.blogspot.com/2008/06/d ... table.html
Post Reply