Step By Step Guide to Make an Adventure Game with Wintermute

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
MetaFox
Adventure Gamer
Adventure Gamer
Posts: 2818
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 12 times
Contact:

Step By Step Guide to Make an Adventure Game with Wintermute

Post by MetaFox »

Caleb posted on the Dreamcast Scene forums inquiring about how to make adventure games on Dreamcast. The post referred to the DCEvolution SCUMM Fan Game Collection. The games in this release however, used ScummC and ScummGen. It is possible to make a game for Dreamcast with these tools, but it requires a lot of programming experience, as you have to compile the compilers yourself (which isn't an easy process. I personally was able to compile ScummGen on Windows when I extended Indiana Jones and the Call of Thunder for that compilation, but I never had success with ScummC (it probably would be a different experience on Linux or possibly even Mac OS X, as these compilers were designed with *nix in mind when they were written). It also requires you to learn to code in the scripting languages and there are no tools with a graphical interface available for setting up inventory items, sprites, or setting pathfinding settings, etc. (I can create a guide for creating games in ScummGen if someone is interested, however note that it's not as easy to use as other adventure game creation suites that are available).

ScummVM itself does offer a much easier to use solution though, and that is Wintermute. This engine has been used to create many games such as Chivalry is NOT Dead (which at this moment, is the only Wintermute game officlally supported in ScummVM). At the moment though, the engine in Wintermute is set with settings that cause the engine to be skipped at compile time on the Dreamcast (such as having graphics over 320x240 and a high resolution palette). This is because the Wintermute game creation suite, by default, sets games to a 800x600 32-bit resolution. Wintermute is very flexible however, and games can be created at resolutions higher or lower than the default. In the past, going in resolutions under 800x600 wasn't recommended, as many modern monitors don't support resolutions lower than this and the Wintermute engine itself didn't have the capabilities to display these lower resolutions in full screen on these monitors (as it was never the designer's intention to support low resolution games). However, the ScummVM architecture does support resolutions lower than this, so theoretically it should be possible to run a low resolution game created with Wintermute in ScummVM for Dreamcast. As the Dreamcast port of ScummVM skips Wintermute by default in its current state, and because there are no lower resolution games to test it at the moment, ScummVM would have to be updated in order to run them. That's part of the reason why I'm writing this guide, as I'll be creating a game step-by-step to support lower resolutions. Once I have a working game to test Dreamcast support I'll update the ScummVM code to support lower resolutions and submit my patch to the ScummVM team. If the patch is approved, then everyone will be able to create adventure games for Dreamcast using the Wintermute suite, which is something many people (myself included) have wanted for a long time. :)

Before I get into the guide, I should note that there are also other methods to create adventure games on Dreamcast. You can use Sierra's AGI or SCI engines, as there are several suites available that allow you to make fan games supported by these engines. AGI, however, is usually not a good target for Dreamcast, as it is best played with a keyboard as the engine has a text parser by default. However, there is a fan created extension of the AGI API called AGI-Mouse, which allows you to create a game using the engine that is completely mouse controlled. There is also a fan made extension of the engine called AGI-256 that allows for 256 colors, which is beyond the standard 16 colors (EGA mode on PC, Amiga versions did have a higher palette, yet still not as high as AGI-256) of the original. Both of these fan extensions of AGI are supported in ScummVM. There is also a recently created fan extension of the SCI API that allows for playing MP3 music in games. This is also now supported in ScummVM. If anyone would be interested in a guide for either of these engines, I'll be more than happy to create one (or both) after this guide has wrapped up. There are also WIP engines for ScummVM that have tools available for fans to create games to use those engines. World Builder support was added to ScummVM recently, and although it's still WIP it should be able to play games to completion without any problems. The suite to create these games was released by the author as free software. One serious drawback however is that you have to use the suite on a PowerPC Mac (or use an emulator), as it was originally designed in the 1980s for the original grey-scale lines of Mac (which means that games created with this engine are grey-scale only). There is also a work in progress AGS engine for ScummVM. This one will be a real boon for creating adventure games on lower powered systems such as the Dreamcast as it was designed from the get-go for low resolutions (it's default resolution was 320x240 the last time I used the engine, which was probably around 10 years ago - but it's still being used to create low resolution games to this day). However, the engine is in very early stages, as it hasn't even been added to the main ScummVM code repository. When this does get to a more complete state though, I'll definitely create a guide for it. AGS support would be even better to have than Wintermute since it is the most popular adventure game creation suite by far, so there is a huge community that will help you and there's also lots of example code available if you need assistance.

OK, now on to the guide. In this post I'll just go through installing the development kit, as I intend to adapt the basic template for our needs (and since this tutorial is going to use my low resolution template, there's no need to follow me in the steps I take to modify the template to use a 320x240 resolution).

1. First, download the Wintermute Engine Development Kit. It's only available for Windows machines (Windows 98 or higher), however some people have had success using it in Wine, if you have Linux or OS X (you also can use Boot Camp if you are on Mac, which is what I use, or use a Virtual Machine program such as VirtualBox.

2. Install the Wintermute Engine Development Kit (there are no optional components, so installing it is quite straightforward).

3. There are many tools available that are part of the Wintermute Development Kit. The program that we want to use to set up the logistics of the game is called "WME Project Manager".

At this point, feel free to play around with the settings in the WME Project Manager, or try some of the other tools available in the suite. If you want you can click on file and then new. You'll be given the option to create a game using the basic project template. We'll be using a modified version of that for our project, if you want to play around, go ahead and give it a project name. I'm creating a character called the Dream Cat for our little demo, so go ahead and name it Dream Cat, or something else, if you want to.

This project doesn't need to be saved, as I'm not going to be using the standard basic template for this tutorial. I'm going to adapt the basic project template to use 320x240 resolution instead of 800x600 resolution, so it will be easier to adapt for our needs. This is all a bunch of size changing and adapting the code for the changed sizes. It won't be necessary to follow me on this step, as I'll upload a 320x240 template to use when I'm done. This will make it much easier to make low resolution games which should be able to run on the Dreamcast, as the basic template can be adapted as you see fit to create a basic adventure game.
User avatar
Quzar
Dream Coder
Dream Coder
Posts: 7500
Joined: Wed Jul 31, 2002 12:14 am
Location: Miami, FL
Has thanked: 4 times
Been thanked: 14 times
Contact:

Re: Step By Step Guide to Make an Adventure Game with Winter

Post by Quzar »

Very informative post. I'd heard of Wintermute before, but didn't realize that it had compatibility with ScummVM at all.

Also a belated welcome back.
"When you post fewer lines of text than your signature, consider not posting at all." - A Wise Man
User avatar
MetaFox
Adventure Gamer
Adventure Gamer
Posts: 2818
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 12 times
Contact:

Re: Step By Step Guide to Make an Adventure Game with Winter

Post by MetaFox »

Quzar wrote:Very informative post. I'd heard of Wintermute before, but didn't realize that it had compatibility with ScummVM at all.

Also a belated welcome back.
Thanks. It's nice to see that you're still around. :)

And sorry for the long reply. I got caught up in real life, and it was harder to adapt the template to 320x240 than I had anticipated (I had to adjust all of the hotspots, image sizes, and locations, and usually had to do it manually).

But, it's done now - and that means that the hard part is out of the way. So anyone who wants to make a game can skip the headache and start with this game as a template and adapt it to suit your needs. :)

We'll be using the DFAF Adventure source as a base for our example game.
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Step By Step Guide to Make an Adventure Game with Winter

Post by Chilly Willy »

While the DC cannot do 800x600, 640x480 is easy enough. Perhaps an updated ScummVM supporting that would make this easier.
User avatar
MetaFox
Adventure Gamer
Adventure Gamer
Posts: 2818
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 12 times
Contact:

Re: Step By Step Guide to Make an Adventure Game with Winter

Post by MetaFox »

Chilly Willy wrote:While the DC cannot do 800x600, 640x480 is easy enough. Perhaps an updated ScummVM supporting that would make this easier.
ScummVM for Dreamcast runs the 640x480 games, but they're really choppy. It's fine when there's not a lot going on, but audio and speech slow it right down.

It's possible that optimizing the way ScummVM handles audio might improve performance, but it's probable that it might be a rather large undertaking since each engine handles the way they process the audio differently. It's beyond my abilities, I'm afraid, as I'm not that familiar with the inner workings of the ScummVM architecture.

It would certainly be awesome though. :)
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Step By Step Guide to Make an Adventure Game with Winter

Post by Chilly Willy »

I'm not familiar with how it handles video or sound, but I can guess - it's probably using software for both, and SDL. :)

However, the question here isn't how various games want the video and sound handled, it's how Wintermute wants video and sound handled. If it generates games with a specific way of handling video and sound, maybe just those could be optimized on the DC ScummVM rather than ALL the ways that ScummVM supports. Now if Wintermute allows you to use all those ways itself, that wouldn't be helpful.

EDIT: I looked at the code, and it's definitely software, but not SDL... it's not even KOS! It's using an older different devkit called libronin. He at least uses the PVR to draw the game bitmap to the screen. He uses a poly to draw the screen, then another poly to draw the overlay, then uses software to draw the mouse. The sound is a single stereo stream that calls scummvm to fill. So it's the most general of drivers to support as many games as it can, but will be slower than if it had more specific support.
User avatar
MetaFox
Adventure Gamer
Adventure Gamer
Posts: 2818
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 12 times
Contact:

Re: Step By Step Guide to Make an Adventure Game with Winter

Post by MetaFox »

I've got a repository set up for the code for this guide (based on the 8/10/16 DFAF Adventure code) here.
Chilly Willy wrote:EDIT: I looked at the code, and it's definitely software, but not SDL... it's not even KOS! It's using an older different devkit called libronin. He at least uses the PVR to draw the game bitmap to the screen. He uses a poly to draw the screen, then another poly to draw the overlay, then uses software to draw the mouse. The sound is a single stereo stream that calls scummvm to fill. So it's the most general of drivers to support as many games as it can, but will be slower than if it had more specific support.
Yeah, Marcus Comstedt did the Dreamcast port of ScummVM, so it uses his libronin library. He does still actively maintain the Dreamcast version of ScummVM and occasionally updates libronin whenever he needs to. But it definitely is not as robust as KOS. As far as I know, save for a few projects early on in Dreamcast development history, the only people who ever used libronin for their projects were Marcus Comstedt and Peter Bortas.
User avatar
MetaFox
Adventure Gamer
Adventure Gamer
Posts: 2818
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 12 times
Contact:

Re: Step By Step Guide to Make an Adventure Game with Winter

Post by MetaFox »

Now that we have our template, we'll get into actually making the game. Open dreamcat.wpr (either by clicking on the file as Wintermute should have been added to your registry during installation, or by opening it from within the WME Project manager (by going to File and then choosing Open).

You'll see a lot of settings on the left. These can all be customized from the project manager when you make your game, but for now we'll leave them as-is.

The first thing we'll do is set up a scene. Go to the toolbar - click on Tools, then click on SceneEdit.

Once, you're in SceneEdit, open (go to File, then Open) the main room scene. This is in data/scenes/room/room.scene

Once room.scene is open, you'll see a background and some colored shapes around some objects. These shapes represent your character's walking area.

Since this tutorial started with the DFAF game, I'll create a new background for the project. You can edit the background anyway you like. I recommend using an external editor for this (such as Paint.Net, Gimp, or Photoshop) as it's the easiest way to do edit images. The background is set as data/scenes/room/background.bmp (remember to keep your assets at 8-bit settings and the background at 320x170 for best compatibility with the Dreamcast version of ScummVM).

Notice in the Scene section - you have multiple layers listed. These tell the game where to set the objects in regard to other objects. The background should be the farthest object back, so it's listed in the top layer (backlayer). You can also have other objects back here, such as a couch that an NPC sits on.

Image

The next layer is for objects that are above the furthest layer, but behind the player character. So, we'll put the NPC that sits on the couch here.

The main layer comes next, and that's where the actor goes. It also can be used to outline objects in the background that can be highlighted. So, the door and window here have an outline around them that tells the engine that they can be interactable.

This project also has a foreground layer, that is used for LucasArts styled foreground objects that are in front of the shot, in the view of the "camera", but out of reach of the main character. The pink color is the transparent color that the Wintermute engine uses.

Image

You can add as many or as few objects as you like (but always try to keep the actor and the main interactables in the main layer).

Now that we have the scene set up, in the next section, we'll be dealing with the scripts to tell the game what to do.
User avatar
MetaFox
Adventure Gamer
Adventure Gamer
Posts: 2818
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 12 times
Contact:

Re: Step By Step Guide to Make an Adventure Game with Winter

Post by MetaFox »

Sorry about the long time in-between posts. I've been working on a patch to ScummVM for this project: https://github.com/scummvm/scummvm/pull/808

So, once that's added to the main branch, games made in Wintermute should be able to be played in the daily builds of ScummVM (theoretically up to 640x480, 32-bit color, but I'm not sure how those types of games will perform on the Dreamcast through ScummVM).
User avatar
bogglez
Moderator
Moderator
Posts: 578
Joined: Sun Apr 20, 2014 9:45 am
Has thanked: 0
Been thanked: 0

Re: Step By Step Guide to Make an Adventure Game with Winter

Post by bogglez »

MetaFox wrote:Sorry about the long time in-between posts. I've been working on a patch to ScummVM for this project: https://github.com/scummvm/scummvm/pull/808

So, once that's added to the main branch, games made in Wintermute should be able to be played in the daily builds of ScummVM (theoretically up to 640x480, 32-bit color, but I'm not sure how those types of games will perform on the Dreamcast through ScummVM).
Wow that's actually a really great idea!
Would it help to convert art assets to Dreamcast formats during load time? The pvr can work with 32 bit internally but in the end things are converted to 16 bit as far as I know.
I assume most of these games are paletted and would work well with palettes of 256 colors?
What are the polygon counts on 3d models like?
If we could implement a Dreamcast renderer for scummvm would that make many games viable?
Wiki & tutorials: http://dcemulation.org/?title=Development
Wiki feedback: viewtopic.php?f=29&t=103940
My libgl playground (not for production): https://bitbucket.org/bogglez/libgl15
My lxdream fork (with small fixes): https://bitbucket.org/bogglez/lxdream
User avatar
MetaFox
Adventure Gamer
Adventure Gamer
Posts: 2818
Joined: Wed Oct 17, 2001 7:44 pm
Has thanked: 0
Been thanked: 12 times
Contact:

Re: Step By Step Guide to Make an Adventure Game with Winter

Post by MetaFox »

bogglez wrote:
MetaFox wrote:Sorry about the long time in-between posts. I've been working on a patch to ScummVM for this project: https://github.com/scummvm/scummvm/pull/808

So, once that's added to the main branch, games made in Wintermute should be able to be played in the daily builds of ScummVM (theoretically up to 640x480, 32-bit color, but I'm not sure how those types of games will perform on the Dreamcast through ScummVM).
Wow that's actually a really great idea!
Would it help to convert art assets to Dreamcast formats during load time? The pvr can work with 32 bit internally but in the end things are converted to 16 bit as far as I know.
I assume most of these games are paletted and would work well with palettes of 256 colors?
What are the polygon counts on 3d models like?
If we could implement a Dreamcast renderer for scummvm would that make many games viable?
At the moment, only 2D Wintermute games are supported. There's a task suggestion in ScummVM's 3D sister project, ResidualVM, to support Wintermute 3D games, but for now, it's 2D only.

The Wintermute engine in ScummVM actually is a 32-bit color engine, so even with BMP resources it doesn't use a palette system. I originally suggested 256 colors to attempt to make sure that the engine wouldn't slow down when running on Dreamcast, but my assumption has been proven to be for naught by the author of ScummVM's Wintermute engine. Apparently, the color reduction wouldn't give an increase in speed due to the way the engine is currently coded. Resolution might cause slowdowns (again, I'm assuming based on other engines in ScummVM on Dreamcast), but a test case would need to be made in order to be certain, as I haven't yet made an experiment in 640x480. So far, I've tried one in 320x240 and one in 320x200.
These users thanked the author MetaFox for the post:
Ian Robinson
Post Reply