Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lance.ewing

Pages: 1 [2] 3 4 ... 40
16
AGI Development Tools / Re: C# AGI Interpreter
« on: January 13, 2019, 04:53:57 AM »
Thanks for solving that mystery. That definitely explains it then. Looks like I will have to add specific version checks in there to make it truly compatible.

17
AGI Development Tools / AGI Player by Hugues Valois
« on: January 12, 2019, 05:31:21 PM »
Back in 2017, you might remember that I discovered that I wasn't the first person to write an AGI Interpreter in C#. Hugues Valois had already beaten me to it. I found his website with various pictures of his Interpreter and editors, but I couldn't find any links to the application.

Well this evening I thought I'd have a look again and it appears that he has put all of his code up on github 22 days ago, along with a first release build:

https://github.com/huguesv/AgiPlayer

https://github.com/huguesv/AgiPlayer/releases/tag/v1.0.0

http://www.huguesvalois.com/ProjectsAgiPlayer.aspx

I haven't tried it yet, but I probably will at some point tomorrow. Looks amazing.

18
AGI Development Tools / Re: C# AGI Interpreter
« on: January 12, 2019, 11:26:40 AM »
If you have verified that it works correctly with the original DOS interpreter, I would love to get a copy of that interpreter file; I've decompiled all AGI versions that I have, including all v3 versions. I can confirm that only 3.002.102 and above use flag 20. I've examined the code in the 3.002.086 version I have, and there is nothing there that I can see that would change loops (without specific code in the logic), so I would love to know if the interpreter file I have is authentic (the date/time stamp is 8/31/1988 12:38PM). Would you mind sharing your file?

The date/time stamp of my one is 7/25/1988 12:43PM, as it currently appears on my harddisk. The AGI file is 40866 bytes. I can't recall now where I found this one, but I've had it for a while I think. I can confirm that the game definitely handles the loop changing even though the VIEW has 5 loops.

Also, I don't have access to my original disks (I'm on temporary assignment for work away from home for several months). Could I ask for a copy of the game files for your KQ4 version as well?  Thx!

PM sent.

19
AGI Development Tools / Re: C# AGI Interpreter
« on: January 12, 2019, 05:23:21 AM »
Also, is your source code available for your C# interpreter? I'd be happy to take a look at any sections where you have questions/concerns; I might be able to find issues quickly based on my decompilation efforts.

The project is currently a fork of Collector's AGI/SCI Developer repo in Bitbucket. That repo is described as a merger of SCI Developer and Visual AGI. It has a separate AGI Library that Visual AGI uses to load and save resources, although it didn't have anything to deal with SOUND or LOGIC resources when I started out with the Interpreter, and it didn't have anything for loading AGI V3 games either. The reason I forked Collector's repo is because one of the end goals is that it would be possible to run an AGI game from within the Visual AGI part of the IDE, so it is built on top of that AGI Library.

So having said all that, Collector's repo is currently private, and my fork of his repo is also private. If you create a Bitbucket account though, or already have one, then I can share my repo with you so that you can take a look. It would be very helpful actually. It would be good to get your feedback on what you see in there. I know there are still a number of outstanding issues. I was playing through SQ2 last night (nearly half way through I think) and spotted another four issues I need to take a look at. There are also several issues in KQ4.

20
AGI Development Tools / Re: C# AGI Interpreter
« on: January 11, 2019, 03:39:10 PM »
I assume they would. I've tried a couple of the easy to get to ones, and they work. I haven't played through much of KQ4 yet though.

I'm looking at my list of known issues at the moment. For some reason saved games don't work at all in Gold Rush. It completely ignores it when I select Save game in the menu. Really weird. I guess as soon as I start debugging that, all will become obvious.  That's probably the main one at the moment, but I haven't played through much of any game other than KQ1 so far.


21
AGI Development Tools / Re: C# AGI Interpreter
« on: January 11, 2019, 02:35:46 PM »
I've checked this now, and flag 20 is not set. So I guess that agrees with the fact that only 3.002.102 and above use flag 20 for controlling this.

Version 3.002.086 must be doing something similar but not controlled by flag 20.

22
AGI Development Tools / Re: C# AGI Interpreter
« on: January 11, 2019, 02:25:00 AM »
Yeah, that would definitely explain it. Let me check the version...  its 3.002.086 apparently, but it certainly behaves differently with regards to the automatic loop choosing than what AGI V2 does. Is it possible that f20 feature is there for all of AGI V3? I haven't checked yet whether f20 is set at this point in the version I have, but will do soon.


23
AGI Development Tools / Re: C# AGI Interpreter
« on: January 10, 2019, 04:12:20 PM »
ScummVM does use an abbreviated MD5 check (from the first 5000 bytes), usually on the logdir file for AGI games to determine not just the game, but the game version as well. I used this for my Sierra game version detector tool. Wouldn't such an approach cause a problem with using it on the fly to run a new game, especially one still under development where the target file for the check would be constantly changing.

I've decided to go with simply the Game ID check for now, i.e. "KQ4" in this case. Its the same string they use when building saved game filenames. It seems that there is no need to check the specific AGI version because KQ4 was only released with the one version of Interpreter as far as I know.


24
AGI Development Tools / Re: C# AGI Interpreter
« on: January 10, 2019, 04:03:20 PM »
So I started wondering how scummvm handles this (since I've already ruled out the extra Loop having been introduced by an editor, due to timestamps on the KQ4 files still being 1988). Turns out that it has a specific workaround coded for KQ4:

https://github.com/scummvm/scummvm/blob/master/engines/agi/view.cpp


Turns out this fix goes all the way back to Sarien (which was imported to ScummVm), some 18 years ago:
https://github.com/cmatsuoka/sarien/commit/2e38cdc

I suspected as much. It wouldn't have taken long to see the issue in KQ4, in fact its right there in the first room.  I like the commit comment.    :)

25
AGI Development Tools / Re: C# AGI Interpreter
« on: January 10, 2019, 02:23:16 AM »
If you are talking about view.000 being the main view, then yes version 2 only has four loops. It has been some time since I have last looked at Visual AGI, but my memory is that it could not open any AGI3 resources. I am assuming that you added support for decoding these too, not just AGI3 logic support. I need to go through the project again to refamiliarize myself with it.

There is definitely something weird going on with VIEW.0 in KQ4. My first workaround for this broke MUMG. Since the original AGI interpreter handles playing KQ4 fine, then it is coping with this extra Loop, even though the fragments of original AGI interpreter source indicate that AGI V2 would not have handled it. So I started wondering how scummvm handles this (since I've already ruled out the extra Loop having been introduced by an editor, due to timestamps on the KQ4 files still being 1988). Turns out that it has a specific workaround coded for KQ4:

https://github.com/scummvm/scummvm/blob/master/engines/agi/view.cpp

Code: [Select]
if (!(screenObj->flags & fFixLoop)) {
switch (screenObj->loopCount) {
case 2:
case 3:
loopNr = loopTable2[screenObj->direction];
break;
case 4:
loopNr = loopTable4[screenObj->direction];
break;
default:
// for KQ4
if (getVersion() == 0x3086 || getGameID() == GID_KQ4)
loopNr = loopTable4[screenObj->direction];
break;
}
}

My workaround was almost the same but without the AGI interpreter version and game ID check. This breaks MUMG though, which is why it seems that it is necessary to have a game specific check.

26
AGI Development Tools / Re: C# AGI Interpreter
« on: January 06, 2019, 04:21:27 PM »
Yes, it does say version 2, but the strange thing is that I've checked the timestamps of the vol files and they're all still 1988, which suggests they haven't been modified.

I have found another issue with KQ4. It only seems to affect KQ4. There are a few pictures that the AGI Library does not load, complaining that in the 0xF7 "relative draw" command that Y hits a value of 168, which it says is invalid. That sounds fair enough, but if I comment out that check, these pictures load fine and are drawn fine by my Interpreter. Not sure at this point whether this is somehow "bad" data that the original AGI Interpreter (and my Interpreter) is handling without issue, or whether there is something wrong in the AGI Library's Picture drawing code. I'm tempted to leave this validation check commented out since the Pictures are working fine like that.

Since my last update, I discovered an omission in my SOUND resource decoding that I have fixed. It wasn't catering for early termination of a voice with two consecutive 0xFF bytes.

And hold.key and release.key have been implemented, so the MH games are feeling like the real thing now.

I've been looking back over games that I thought I had working fine, and noticed that MUMG has a number of rendering issues. I recall discovering this back in early 2017. I thought I had fixed it, but perhaps I was partway through trying to resolve this when I was distracting by other things. It is to do with when animated objects are drawn. What MUMG does is to draw some animated objects to screen (e.g. speech bubble), and then immediately sets them to stop updating. The main Interpreter cycle doesn't redraw "stopped" animated objects; it only redraws those that are updating. So what MUMG does is to then position text on top of the "stopped" animated object, which it expects to stay on the screen. Currently my Interpreter is redrawing the stopped animated objects, which it shouldn't be in order to be compatible. So I'll need to take a look at that now. The way the original AGI Interpreter manages and redraws its "stopped" and "updating" objects though is like a ball of spaghetti, so its a matter of extracting the key parts in a cleaner design. I've got it all written out in a notebook, so hopefully I can get this solved soon.

Edit: Oh, forgot to mention that yes, I added AGIV3 support for loading of all resources. Mainly its just the LZW compression, and the Picture compression.

27
AGI Development Tools / Re: C# AGI Interpreter
« on: January 05, 2019, 07:10:41 AM »
For KQ4, the whole opening story played through fine, with the music playing nicely in the background. Didn't spot any issues. But after the game itself started, ego's loop wasn't changing when I changed walking direction. It did, however, change loops properly and as expected when ego walked into water, which means the mechanism itself is fine, but for some reason the default ego View isn't switching loops. I will take a look at that over the next day or so.

I've fixed this one but it was an interesting problem. The main Rosella ego View has 5 loops. Not certain yet whether the extra one was in the original game or whether it inadvertently was added at some point when loaded into an editor. I'll try to rule that out soon.

I discovered another issue to do with non-default base priority values. KQ4 uses a base priority of 73. My priority band calculations were incorrectly using this. It has now been fixed.

I'm quite keen to try playing the whole of KQ4 through now and see where I get to.

In Gold Rush, I spotted a minor issue to do with the user input prompt. Might take a look at that one tonight.

Also fixed.

MH1 and MH2, both games fell over with an Exception. Haven't taken a look to see why yet. In the case of MH1, the opening story/credits played through fine, but in MH2, it crashes almost immediately. I haven't yet implemented the AGI V3 specific commands, so might be to do with that. I guess I'll find out soon.

There were several issues with the Manhunter games. Their logic scripts seem to do things that pretty much none of the other games do. This revealed a couple of areas where I wasn't quite doing things the same as in the original AGI interpreter, particularly around room changing and game clock updates. That is fixed now.

It is now possible to play both MH games. The main thing outstanding is the hold.key and release.key AGI v3 commands. Currently without them it means the round ball "ego" that you move around on the maps doesn't stop moving if you stop pressing the cursor key. Shouldn't take much to implement hold.key and release.key to resolve this.


28
AGI Development Tools / Re: C# AGI Interpreter
« on: January 01, 2019, 05:17:44 PM »
The only bug I'm aware of that is currently outstanding is associated with sound playing. It seems that it holds down some notes for too long. It isn't obvious with most sounds, but there are a few where a note is held down for far too long. I'll start looking at that now.

And then after that I'll be adding AGI v3 support to Visual AGI's AGI Library. Should be straight forward.

The sound bug has been fixed now, and I have also added the ability to load AGI V3 games.

So far I have tried KQ4, Gold Rush, MH1, and MH2. Haven't tried the AGI V3 build of BC yet. - For KQ4, the whole opening story played through fine, with the music playing nicely in the background. Didn't spot any issues. But after the game itself started, ego's loop wasn't changing when I changed walking direction. It did, however, change loops properly and as expected when ego walked into water, which means the mechanism itself is fine, but for some reason the default ego View isn't switching loops. I will take a look at that over the next day or so.

In Gold Rush, I spotted a minor issue to do with the user input prompt. Might take a look at that one tonight.

In MH1 and MH2, both games fell over with an Exception. Haven't taken a look to see why yet. In the case of MH1, the opening story/credits played through fine, but in MH2, it crashes almost immediately. I haven't yet implemented the AGI V3 specific commands, so might be to do with that. I guess I'll find out soon.

29
AGI Development Tools / Re: C# AGI Interpreter
« on: December 30, 2018, 04:27:14 PM »
The strange thing is that I've noticed a few issues when playing my Ruby Cast  demo. I'll have to check those out. I'm surprised I didn't see similar issues in KQ1. They are the kind of issues, to do with sentence recognition, that I would have thought would have affected KQ1 as well. But maybe Ruby Cast is more broken than I thought. I'll have to try it in the original AGI interpreter and compare.

I have now fixed the parsing issues that I had noticed in The Ruby Cast. I can see why they didn't affect KQ1. I did find some rooms in SQ2 where the bugs could be seen though. But all fixed now.

I fixed a number of other bugs as well, including a long standing picture bug with the Space Quest 2 title screen. Turns out that the Visual AGI library had a bug in it where it wasn't executing "Fill" commands in some scenarios where it should have been.

The only bug I'm aware of that is currently outstanding is associated with sound playing. It seems that it holds down some notes for too long. It isn't obvious with most sounds, but there are a few where a note is held down for far too long. I'll start looking at that now.

And then after that I'll be adding AGI v3 support to Visual AGI's AGI Library. Should be straight forward.

30
I would hate to see Visual AGI get swept under the rug with all of these other projects.

I do have it on my todo list to convert that AGI sound editor code that you sent me so that it can be incorporated into Visual AGI. Hopefully at some point we'll see that. And obviously in the not too distant future I'll ask you to merge my C# AGI Interpreter back into Visual AGI and then we can add a "Run Game" button.

On the subject of other projects, I think it is really great that there are other AGI projects starting up. We should encourage these as much as possible, and I for one would like to support Peter in what he has suggested. A browser based AGI IDE would be fantastic.

Pages: 1 [2] 3 4 ... 40

SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.119 seconds with 21 queries.