kromenak / gengine

A 3D game engine capable of parsing and running data files from the classic Sierra Studio's adventure game Gabriel Knight 3
GNU General Public License v3.0
63 stars 15 forks source link

Demo support? #10

Closed neuromancer closed 1 year ago

neuromancer commented 2 years ago

Hi,

I was wondering if you plan to support the GK3 demo, which could be useful for people to play some part of the game using this engine, without the need to buy it.

kromenak commented 1 year ago

Hi, sorry for the (very) delayed response - I'm not opposed to supporting the demo, but it wouldn't be a high priority right now. I will leave this ticket open for the time being though.

neuromancer commented 1 year ago

Thanks for the response. Is it a large effort to add it or do you think someone else could do it?

kromenak commented 1 year ago

The effort required depends on how similar the demo's data files are to the final game's data files. Between release of the demo and the final game, it's possible for a lot of things to change - data file formats change, the way the code interprets the data files can change, etc. If the demo data files are very different from the final game's data files, then it would be more complex to get those data files to work.

Since the engine code is open source, theoretically anyone who'd like could attempt to run the engine against the demo data files.

mondegreengames commented 1 year ago

I tried it. It works pretty well. Things I had to change:

// If no GAS files were loaded, try to use defaults.
if(actor.model != nullptr)
{
    if(actor.idleGas == nullptr)
    {
        actor.idleGas = Services::GetAssets()->LoadGAS(actor.model->GetNameNoExtension() + "Idle");
    }
    if(actor.talkGas == nullptr)
    {
        actor.talkGas = Services::GetAssets()->LoadGAS(actor.model->GetNameNoExtension() + "Talk");
    }
    if(actor.listenGas == nullptr)
    {
        actor.listenGas = actor.talkGas;
    }
}

Some other random things I noticed when playing through the demo:

kromenak commented 1 year ago

@mondegreengames, thanks for looking into this! Since it isn't too tricky to get it working, I may be able to review and roll in these changes before the next release.

One thought is to detect the presence of "Gk3demo.brn", and if it exists, load the engine in "demo mode," utilizing some of the changes you've outlined above. Otherwise, it loads in "full game mode."

I actually haven't reviewed/investigated the laser puzzle scene at all yet, so not too surprising it's busted!

kromenak commented 1 year ago

Support for Demo mode has been added in the latest release (v0.0.8).

To enable the demo, simply put "Gk3demo.brn" in the Data folder. When the game detects this file, it will start the game in "demo mode," where you should be able to play the full demo.