AGS engine PSP port

Started by JJS, Fri 15/07/2011 16:27:57

Previous topic - Next topic

Dataflashsabot

Someone really needs to release Allegro for Android! AGS will be easy after that.

To clarify, the only thing that needs to be done in Java is a tiny wrapper to collect input and ouptut image and audio; a tiny "glue". There's no need to rewrite anything. :)

JJS

R5 released now!

This one adds compatibility for 3.1.1 and 3.1.2 datafiles. 8)

Also a bit more memory is available because the MOD player is gone (anyone knows a game that uses this format?) and the hq2x3x filter is removed as there is no filtering available on the PSP port anyway.

TTF text is now always drawn without anti-aliasing because this option corrupted some text before.

Quote from: Jinx1337 on Fri 29/07/2011 23:21:27
2) Could you consider making a 'cursor slowdown' button? ScummVM uses the right trigger, which - when pressed and held - slows the "mouse" cursor movement down, making it much more comfortable to hunt for one-pixel-items.
This is implemented too. In the default configuration is is mapped to the right trigger.

Enjoy! And please let me know any bugs/crashes/major slowdowns!


Download as always from the links in the opening post.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Dataflashsabot

A question- how are you adding support for old versions without their source code?
Another, related question- I can drag an old AGS game over a new acwin.exe and it runs fine. Also works if I rename it to ac2game.dat. How does this work without backward compatibility? Is there any chance of this being able to run 2.x games?

JJS

#43
The only data file difference I see between 3.2.1 and 3.1.1 is that the older file lacks the game.audioClips and game.audioClipTypes data structures. So my code reads in all music and sound files present in the data files and  generates those structures from them. And with that the game runs (there is a tiny bit more to it, but read the source for that).

Amazingly you are right and the 3.1.1 acwin.exe seemingly can run 2.72 games :o. I will look into that.

Edit: Looks like whatever backward compatibility code there was in 3.1.x is gone in the current version. For example, I don't see how the old interaction system was defined/stored.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Dataflashsabot

Quote from: JJS on Tue 02/08/2011 17:51:43
Edit: Looks like whatever backward compatibility code there was in 3.1.x is gone in the current version.
Well shit.
Quote from: JJS on Tue 02/08/2011 17:51:43
For example, I don't see how the old interaction system was defined/stored.
As in the interaction editor? I thought that "compiled" straight to code, behind the scenes.

monkey0506

I don't see what the Interaction Editor would have anything to do with 3.1.x compatibility considering that the IE was removed in AGS 3.0. Anything 3.0+ doesn't use the IE at all, and only uses the scripts.

JJS

#46
We are talking about 2.x compatibility here  ;).

Anyway the interaction stuff is figured out because the engine still has support for the old format (I was wrong with my previous assesment). So the only big part missing is a dialog script interpreter now. There are also a few glitches (e.g. games running too fast).

Edit: Ok, I think I understand the dialog format now.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds


Jinx1337

Can hardly wait for updates!

JJS

New release R6.

This one brings mainly one thing: Compatibility with AGS 2.60 and up. ;D

There are a few glitches that occur in older games though. They are the same as running the games with the 3.1.1 Windows engine and are most likely caused by bug fixes and subtle data format changes.

A strange bug is that drawing order calculations in 2.x seem to be done differently than in the current version. This is very much noticable in the intro to Garfield. Also in Ben Jordan 7, after the Ben walks into his room in the intro he is drawn on top of the door while it is closed instead of behind it. Both Ben and the door have the same baseline value that is calculated from their y-position. Therefore is is probable that the order in which objects and characters are added to the "things to draw" list is inverted in 3.x compared to 2.x.

Also in the Ben Jordan games, especially in the deluxe versions: Ben often faces the wrong direction when entering a room. There is a script call to FaceLocation just before the room changes that turns the character around. It looks like that call is supposed to happen after the room change though. Very puzzling.


On the technical side, what was done to achieve the compatibility is adding the legacy formats to the loading function and writing a parser for the old dialog scripts. You can check that in the commit log.

As always, the download and source links are in the opening post.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Jinx1337

#50
Awesome!

A thousand 'thank yous', JJS!

Do you remember how I asked you if decompressing the games would help achieving better loading times? What tools would I require to decompress a random game of my choice?

It is driving me beyond crazy, how every action takes ca. 1-2 seconds to process in Kings Quest games; I actually had to switch the voices off in order to play the game comfortably. :)

And can I hope for the fullscreen feature I await so much in the nearest future?


Once again, cheers to you kind sir!
Thank you!

edit:

yeah, in 7DAYS it reads the MS for about half second every time a character takes a step; loading up the 'footsteps' sound files make characters walk like slo-mo robots ;)

LimpingFish

Quote from: Jinx1337 on Mon 08/08/2011 19:59:46
Now, remember when I asked you if decompressing the games would help speeding up the loading times? What tools do I need to try and decompress a random game of choice?

Compiled AGS games are encrypted. Try an open-source game, such as this one.
Steam: LimpingFish
PSN: LFishRoller
XB: TheActualLimpingFish
Spotify: LimpingFish

Jinx1337

Quote from: LimpingFish on Mon 08/08/2011 20:15:02
Quote from: Jinx1337 on Mon 08/08/2011 19:59:46
Now, remember when I asked you if decompressing the games would help speeding up the loading times? What tools do I need to try and decompress a random game of choice?

Compiled AGS games are encrypted. Try an open-source game, such as this one.

Is that so? Just tried Infinity String - one second load times between steps when a character walks. Gah...

Other than that, it seems to run the older games just fine! Awesome job JJS!

Jinx1337

#53
Hm... "A tale of two kingdoms" doesn't show the dinner scene at all after returning the king's scepter at the very beginning of the game.

The game instead 'freezes' on a fadeout after which the dinner should happen.
The game skips the scene when you press START (mapped to the ESC key, was it?) and continues to play.

JJS

Extracting the data files is pretty straightforward with the engine source, but I don't feel comfortable with providing an extraction tool.

The delay should not be as bad as you describe though because the audio cache should have the footstep sounds loaded after the first two steps. I will try to completely get rid of the memory stick access on playing cached sounds though.

A tale of two kingdoms doesn't actually "hang". The problem is that the game tries to draw messages while the screen is faded out. Seems like this was possible in 2.x but it is not anymore in 3.x. In the current engine, the screen fading is done by a graphic filter until the screen is completely faded out. Then the engine just stops drawing anything. My guess is that the fadeout was applied differently in older versions. A quick workaround for ATOTK is to always draw the screen, even when faded out. But this causes other screens to fade out completely and then after the filter is done, switch back to full brightness. I am really not sure how to handle this.
Ask me about AGS on PSP, Android and iOS! Source, Daily builds

Dataflashsabot

Legacy compatibility? Now that's awesome! I'm going to make my very best attempt at an Android port just as soon as there's a port of Allegro.

Jinx1337

Bump!

Any updates JJS?

Cheers!

lestat666

#57
Anybody try running Maniac Mansion Deluxe ver 1.4???

I can't seem to get it to run, and the psp port of AGS doesn't tell me that it is incompatible either.

Here is the error I am getting,
Script Link failed: Runtime Error: unresolved import /GetFlashlightMinLightLevel/

I tried version 1.1 of the game too, but that gave me a different error about a file being corrupt.

I have tried setting the resolution to 320x200 and disabling music and sound, but still it is not working.
Does anyone have any advice?

Is it even possible to run this game in this build of PSP AGS?

The game is in fact working on my pc, so I know I don't have corrupted files.

I tried contact JJS directly via his website email, but haven't heard anything, so I thought I would try here.  Not sure if he is still working on the build or not. 

It would be great to get this game working on the PSP. 

Any help is greatly appreciated.
Thanks again.

Khris

MMD uses the flashlight plugin; my guess is the PSP port doesn't support plugins yet.

(GetFlashlightMinLightLevel is one of the commands added by the plugin)

lestat666

I hope JJS is still working on this.

That feature would definitely be something that would add allot of support for many games.

SMF spam blocked by CleanTalk