Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escavation of Hob's Barrow will not load. #1796

Closed
i30817 opened this issue Oct 2, 2022 · 18 comments
Closed

Escavation of Hob's Barrow will not load. #1796

i30817 opened this issue Oct 2, 2022 · 18 comments

Comments

@i30817
Copy link

i30817 commented Oct 2, 2022

Describe the bug
New ags game from wadget eye studios and a collaborator.

Adventure Game Studio v3.6 Interpreter
Copyright (c) 1999-2011 Chris Jones and 2011-2022 others
ACI version 3.6.0.35

Initializing backend libs
SDL Version: 2.0.20
Initializing game data
Located game data pak: /home/i3/Downloads/The Excavation of Hobs Barrow/TEOHB.exe
Opened game data file: game28.dta
Game data version: 50
Compiled with: 3.5.0.26
Startup directory: /home/i3/Downloads/The Excavation of Hobs Barrow
Data directory: /home/i3/Downloads/The Excavation of Hobs Barrow/
Setting up game configuration
Voice pack found: speech.vox
audio.vox found and initialized.
Initializing TTF renderer
Initializing mouse: number of buttons reported is 3
Install timer
Audio driver: pulseaudio
AudioCore: opened device "Default OpenAL playback device"
Supported sound decoders:
 - Play modules through ModPlug : 669,AMF,AMS,DBM,DMF,DSM,FAR,GDM,IT,MDL,MED,MOD,MT2,MTM,OKT,PTM,PSM,S3M,STM,ULT,UMX,XM,
 - MPEG-1 Audio Layer I-III : MP3,MP2,MP1,
 - Microsoft WAVE audio format : WAV,
 - Audio Interchange File Format : AIFF,AIF,
 - Sun/NeXT audio file format : AU,
 - Ogg Vorbis audio : OGG,
 - Creative Labs Voice format : VOC,
 - Raw audio : RAW,
 - Shorten-compressed audio data : SHN,
 - Free Lossless Audio Codec : FLAC,FLA,
Install exit handler
Initialize path finder library
Game title: 'The Excavation of Hob's Barrow'
Game GUI version: 119
Requested script API: v3.5.0-final (7), compat level: v3.2.1 (0)
Plugin 'agsgalaxy' could not be loaded (expected 'libagsgalaxy.so'), trying built-in plugins...
Placeholder functions for the plugin 'agsgalaxy' found.
Plugin 'agsplugin.spritefont' could not be loaded (expected 'libagsplugin.spritefont.so'), trying built-in plugins...
No placeholder functions for the plugin 'agsplugin.spritefont' found. The game might fail to load!
Plugin 'ags_shell' could not be loaded (expected 'libags_shell.so'), trying built-in plugins...
Placeholder functions for the plugin 'ags_shell' found.
unresolved import 'SetSpriteFont' in 'GlobalScript.asc'
unresolved import 'SetVariableSpriteFont' in 'GlobalScript.asc'
unresolved import 'SetGlyph' in 'GlobalScript.asc'
unresolved import 'SetSpacing' in 'GlobalScript.asc'
Loading game failed with error:
Script link failed.
Error (line unknown): in GlobalScript.asc: 4 unresolved imports (last: SetSpacing).

The game files may be incomplete, corrupt or from unsupported version of AGS.
Quitting the game...
***** ENGINE HAS SHUTDOWN

AGS Version
3.6.0.35

Game
No demo

To Reproduce
start the game on master

Desktop (please complete the following information):

  • OS: Linux
  • Version Ubuntu 22.04.1

Additonal Information:
Obviously this is running the windows version in linux ags. The windows version in wine is fine.

@i30817
Copy link
Author

i30817 commented Oct 2, 2022

It starts if you add a OR to the name recognizing if in the agsplugin file:

else if (apl->filename.CompareNoCase("agsspritefont") == 0 || apl->filename.CompareNoCase("agsplugin.spritefont") == 0)

Although now that i ran it, it has a corrupted font (much like scummvm downstream has a corrupt font in some games).

@ivan-mogilko
Copy link
Contributor

ivan-mogilko commented Oct 2, 2022

What is "agsplugin.spritefont"? Is it how user has renamed a plugin? Because if so, I don't think we should support any random names introduced by users. So far this does not look like a mistake in AGS.

I'd rather propose to clarify this with the game developer to see how this had happened. Also double check that they did not use a custom engine (just in case).

Optionally, as a preliminary thought, we may provide a custom mapping for plugin names which you add yourself in config file.
Alternatively, you could build a plugin yourself as a standalone *.so and name it to match the game's expectations.

@ericoporto
Copy link
Member

My guess is they are using the clifftop variant of the sprite font plugin, so it should not use whatever they used and use the one we have in our repositories that has additional fixes.

@ivan-mogilko
Copy link
Contributor

ivan-mogilko commented Oct 2, 2022

so it should not use whatever they used and use the one we have in our repositories that has additional fixes.

The engine is already using the one from our repository as a built-in plugin.

The problem is that the clifftop variants are triggered by a game detection. Since this is a new game, so the detection does not trigger on it.

This will keep happening, until there will be a proper indication of which variant the game is using, either through a distinct plugin name, or API command that toggles between the plugin "modes".

Alternatively, one could investigate whether having the "clifftop" variant always active will break the other games or not. Because if not, then we could just use it all the time.

@i30817
Copy link
Author

i30817 commented Oct 2, 2022

Is there any way to force the clifftop variant to test it? I can easily plant a so on the game dir, but it would be the 'normal' one, i think. I suppose it's being forced by the internal name of the project?

@ivan-mogilko
Copy link
Contributor

ivan-mogilko commented Oct 2, 2022

The detection works by game guid.

// For Kathy Rain and WOAM instantiate the Clifftop Games version
// of the font renderer.
bool useClifftopGamesRenderers = false;
if (engine->version >= 26) {
AGSGameInfo gameInfo;
gameInfo.Version = 26;
lpEngine->GetGameInfo(&gameInfo);
// GUID:
// Kathy Rain: {d6795d1c-3cfe-49ec-90a1-85c313bfccaf}
// Whispers of a Machine: {5833654f-6f0d-40d9-99e2-65c101c8544a}
useClifftopGamesRenderers = strcmp("{d6795d1c-3cfe-49ec-90a1-85c313bfccaf}", gameInfo.Guid) == 0 ||
strcmp("{5833654f-6f0d-40d9-99e2-65c101c8544a}", gameInfo.Guid) == 0;
}

@ivan-mogilko
Copy link
Contributor

Should mention, it's possible to print game guid for the reference, e.g. here:

Debug::Printf(kDbgMsg_Info, "Game title: '%s'", game.gamename);

as
Debug::Printf(kDbgMsg_Info, "Game guid: '%s'", game.guid);

@i30817
Copy link
Author

i30817 commented Oct 2, 2022

Right, i forced that bool to true, then made, renamed and placed the plugin in the game dir.
The font works, so that more or less confirms they're using the 'clifftop version'.

The guid if you're wondering about a 'half measure' of hardcoding it is :
{4d1d659d-f5ed-4945-b031-68fedcac7510}

(although this would still require a rename without that or i put in the second post).

Personally speaking, i'm quite fond of the engine ability to run without dlls in the game dir. Good for OS portability, and i suppose, for scummvm downstream instructions.

@ivan-mogilko
Copy link
Contributor

I'd leave this for a while to consider possible options. Right now our priority is to complete 3.6.0, and I would not want to add any more rushed hacks.

@Dualnames1
Copy link

Dualnames1 commented Oct 3, 2022

Why are we running Hob's Barrow in 3.6?

Also there's a native port of the game for Linux. So this is even more interesting.

@i30817

This comment was marked as off-topic.

@ivan-mogilko
Copy link
Contributor

ivan-mogilko commented Oct 3, 2022

@Dualnames1

Why are we running Hob's Barrow in 3.6?

Because this is the official ags engine, and supposed to be backwards compatible; therefore many users use one engine binary to run all previously made games.

Additionally, afaik not every linux system can run the binaries distributed with the ags editor, and their users have or prefer to build engine from sources.

This of course is only suitable so long as the game was not made using a custom version of the engine, since we don't have a requirement of supporting these.

@messengerbag
Copy link

This of course is only suitable so long as the game was not made using a custom version of the engine

… and it's not running a custom plugin that doesn't have a version for the platform in question, surely?

The bug report says that the Windows version doesn't run on Linux, and it seems to be because it can't find the *.so plugins (I imagine that the Windows version only includes the DLLs). This seems like something that shouldn't work.

@messengerbag
Copy link

Also:

many users use one engine binary to run all previously made games.

Is this actually true? I would expect that only a small number of people actually do this.

@ivan-mogilko
Copy link
Contributor

Fine, I had enough of this.

@i30817
Copy link
Author

i30817 commented Oct 3, 2022

For the record, the current plugin does work in the 'clifftop' configuration, when inevitably someone else opens the same bug report and gets pointed here. Just build it yourself.

@i30817
Copy link
Author

i30817 commented Oct 4, 2022

Scummvm now loads the game by using the clifftop variant in their scanner and the inbuilt dll. They already had the variant name for Kathy Rain (apparently the name is used in some versions), so they only needed to change the scanner to use the right flag.

The commit is scummvm/scummvm@23f15cf (it doesn't reflect on the ini file).

@ivan-mogilko
Copy link
Contributor

ivan-mogilko commented Oct 5, 2022

@i30817 i added the hack (or rather extended existing one);

Also added a compilation option for making a plugin strictly Clifftop-games compatible (see comments to 9f5244a). This may be useful to build this plugin yourself from our sources for the new games which need it, or for existing games made with the older engine versions (which did not support retrieving guids in plugin API).

Personally, I believe the Clifftop plugin version should have been simply renamed, e.g. like agsspitefont2, then this would be resolved without having to detect games at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants