OpenTasks

From ScummVM :: Wiki
Revision as of 09:15, 5 July 2007 by Sev (talk | contribs) (Moved tasks taken at GSoC2007 to separate page)
Jump to navigation Jump to search

Introduction

This page contains a list of open tasks. Completing any of them would benefit the ScummVM project a lot. At least in theory, all of them should be doable even by somebody relatively new to the project, in particular, as part of the Google Summer of Code. Besides the tasks listed here, there is of course also the TODO page listing more things that need to be done (but with far less details).

Some basic rules

Below follow some basic rules that anybody interested in one of these tasks should adhere to. Sometimes exceptions may be possible -- as always, common sense applies, and if in doubt, ask.

The projects below are sketches and ideas. Plus, things evolve over time, so the descriptions might be slightly outdated by the time you read them (although we strive to keep them up-to-date). Hence, you should talk with somebody from the team, probably the person(s) listed as Tech Contact, before starting work on any of them.

All code, unless stated differently, must be written in clean and portable C++, in particular, GCC must be able to compile it (portability exceptions can be made for platform specific code, of course). We also have some Code Formatting Conventions. Using the standard C++ lib for code used inside ScummVM is at this time not possible. Using it inside non-essential tool should be fine, though.

All of the code submitted must be contributed under the terms of the GPL.

We only accept clean and maintainable code. This is a somewhat vague requirement, but as a rule of thumb, if the code does what it is supposed to do, but is not extensible, a quick hack, or we need to rewrite it from scratch to properly integrate it, we will not accept it. In particular, we would rather have a maintainable, clean and incomplete piece of code that we could extend than a complete but unmaintainable piece of code.

Some good advice

The PostgrSQL folks have some real good Advice to Students on Submitting SoC Applications. We recommand all students interested in applying with us (or any other SoC project, for that matter) to read this.

Student application template

The following was adapted from the FreeBSD Proposal Guidelines.

  • Name
  • Email
  • Project Title
  • Possible Mentor (optional)
  • Benefits to the ScummVM Community - a good project will not just be fun to work on, but also generally useful to others.
  • Deliverables - It is very important to list quantifiable results here e.g.
    • "Improve X modules in ways Y and Z."
    • "Write 3 new man pages for the new interfaces."
    • "Improve test coverage by writing X more unit/regression tests."
    • "Improve performance in FOO by X%."
  • Project Schedule - How long will the project take? When can you begin work?
  • Availability - How many hours per week can you spend working on this? What other obligations do you have this summer?
  • Bio - Who are you? What makes you the best person to work on this project?

Your task

Anything you can dream of

Technical Contact: Our IRC channel, our mailing list, or contact Eugene Sandulenko, Max Horn

The Task:

Come up with your personal clever way to improve ScummVM and its various side projects. Be creative. Incorporate the ideas listed below and in our TODO, but don't let yourself be limited by them. Come up with something totally new, or enhance existing features. It's up to you.

But of course like with all the other tasks, we recommend that you first talk to us (see above).

Generic infrastructure tasks

Plugins

Technical Contact: Max Horn

Background:

ScummVM contains by now over a dozen different engines for different adventure game systems. Each of these engines forms a "plugin", and it is possible to compile these plugins as loadable modules separate from the core of ScummVM itself. This makes it possible to (un)load engine code at will, ideal for systems with tight memory constraints; if you want to play a game, you only need to load the engine for that specific game, and can unload the others.

We always compile the engines as "plugins", but by default, they are compiled as so-called "static" plugins; these are not real plugins, but rather the engine gets compiled into the application (i.e. "static linked", hence the name), but is still treated by the rest of the application as a plugin (only that it is not dynamically loaded). Support for true "dynamic" plugin is only available on a subset of all plugins -- essentially most POSIX systems (including Linux, *BSD, Mac OS X) and the Dreamcast.

The Task:

There are various ways in which this plugin code could be improved:

  • Add support for real "dynamic" plugins on Windows. This is currently not possible, because the ScummVM plugins rely on "backlinking" from the loaded modules to the core binary. This is not supported on Windows. There are various ways to solve this issue (use Google for more info). This is further complicated by the fact that while the interface of the *plugins* is well-defined (although not quite as well documented -- see base/plugins.h), the converse is not true -- plugins can call virtually arbitrary code within the core of ScummVM.
  • Add support for "dynamic" plugins on more systems which might benefit from them.
  • Improve the way we search for plugins. Right now we only look in the current directory. Should this be made configurable? On Unix, maybe /usr/share/scummvm should be searched, too? On Mac OS X, the CoreFoundation bundle API should be used to search for plugins inside the ScummVM.app bundle (which would also require the build system to be enhanced to properly bundle all plugins). Etc.

GUI

Technical Contact: Eugene Sandulenko, Johannes Schickel

Background:

ScummVM implements its own GUI code. We can't use any of the portable GUI kits out there, as they are mostly not portable enough, use too many resources, or simply are not flexible enough to work atop our backend system. Also, our GUI must look equally good with 8bit, 16bit or 32bit graphics, at 320x200, 320x240 or 640x480 resolutions -- and ideally also at 240x200 or at 1280x1024.

Currently we have a quite flexible system for defining the look and feel of our GUI. Almost every aspect of it can be specified via external theme file described here.

The Task:

There are many things missing:

  • Shadows are not configurable
  • Not all widget aspects such as font to use are configurable
  • We need to implement possibility for backends to extend GUI by adding their own tab in options dialog
  • It would be nice to have antialiased fonts (possibly optionally -- we still need to support relatively low end devices, after all)
  • Perhaps implement portable support for TrueType fonts
  • We need better About dialog
  • We need dialog for save game selection
  • There are a number of small things to do which will make GUI behavior more predictive
  • Modern Theme renderer should be reworked to make it faster, for example currently shadow drawing is rather slow (and hacked)

Audio related tasks

Add support for TFMX, and more Amiga MOD formats

Technical Contact: Eugene Sandulenko, Sven Hesse

Background:

Since we're adding (and have added so far) support for different Amiga game versions, we need support for the sound files too. Currently we need support for following formats:

  • TFMX a (non-MOD) format used by Monkey Island 1. There is a player for it already, which is written in rather poor C, also it misses several macros implementation. This documentation may be useful, it isn't complete though. If you don't have the Amiga version of Monkey Island 1 you can use the demo of Monkey Island 1. The main objective of this task is to write a TFMX player with all the effects and macros needed by the Monkey Island music tunes. Work can be based on the original - uncommented - replayer routine disassembly (Motorola 68k).
  • MaxTrax support for Kyrandia 1. The Amiga version isn't supported yet, but LordHoto will be working on it when his copy arrives. A Motorola 68000 (short: 68k) assembler implementation by Joe Pearce can be found here. It would be necessary to re-implement it in proper C++, naturally a must for this task is 68k assembler knowledge. If you don't have the Amiga version of the Legend of Kyrandia, there are sample modules available.
  • SoundFX is used by the Future Wars and Operation Stealth games of the cinE engine. The player is already implemented, but it cannot load music stored in Amiga format with combined track info and instrument info. The existing code only supports loading them separately, which happens to be the way they are stored in the DOS version. If you don't have the Amiga versions of the required games, you can use the demo of Future Wars and the demo of Operation Stealth. A standalone player has been written in the past, initially for the cinE project (the source is available here) which should be able to play the music tunes of Future Wars, Operation Stealth, Cruise for a Corpse and Another World.

MIDI enhancements

Many of the adventures supported by ScummVM make use of MIDI music. Which is why we already include several device drivers for various MIDI APIs and emulators (e.g. ALSA, Windows MIDI, Mac OS X CoreAudio/CoreMIDI, fluidsynth...).

MIDI device configuration

Technical Contact: Max Horn

Background:

Right now, the MIDI drivers are treated by ScummVM in a rather single minded fashion: Either a driver is linked in and hence "available", or not. It's not possible to configure anything about them (like ports to be used etc.), nor does it ever take into account that a single driver might correspond to multiple devices (after all, you can plug several sequencers into your MIDI port; or you could have configured several different sound font settings in your MIDI emulator).

The Task:

  • Add an API for querying the OSystem backend for a list of available MIDI devices (not drivers)
  • Information about the selected device must be serializable, so that it can be stored in the config file
  • Selection of devices via command line should be possible
  • It must deal with devices being added/removed (at least between runs of ScummVM, ideally also while ScummVM is running)
  • Devices should be configurable via the GUI; this needs to be done in a flexible (different devices/drivers offer different settings) and portable fashion.

XMIDI parser

Technical Contact: Max Horn

Background:

Several of our games make use of the XMIDI format. We already have a parser for it (see sound/midiparser_xmidi.cpp), which was based on code from the Exult project, but it is incomplete.

The Task:

Specifically, we require support for XMIDI_CONTROLLER_FOR_LOOP and XMIDI_CONTROLLER_NEXT_BREAK. The XMIDI code from the Exult project (see Exult's audio/midi_drivers/XMidiSequence.cpp) could be used as a reference again. Another good reference for this task is the AIL library which has been recently open-sourced by its author.

Tools

Tools: Overhaul the compression tools

Technical Contact: Max Horn

Background:

We offer a multitude of command line tools in a separate package (scummvm-tools). The majority of these tools are used to (re)compress audio data. This greatly helps users who want to play their games on devices with limited storage, like PDAs and smart phones.

The user can choose between MP3, Ogg Vorbis and (in those cases where it makes sense) FLAC compression. The tools take the original data files, extract sound data, compress them, and reassemble everything into new (smaller) data files.

The Task:

There are various ways in which these tools could be improved:

  • Write a portable GUI for them -- that's a big task and hence has its own section (see below)
  • Unify their command line interfaces
  • Unify the actual compression code -- some partial work on this exists, but with a crude ad-hoc API, which makes it very difficult to use them and also inefficient
  • Right now, compression works by invoking external encoder binaries (oggenc, lame, flac). To this end we write data into a temporary file, invoke the external encoder, and read back the file it created. It would be nice if one could instead link against suitable encoder libraries, and provide compression binaries which are fully self-contained. Also this would make it possible to perform in-memory compression (which could provide a noticeable speedup).

Engine/game specific

Residual: Light-weight software renderer

Technical Contact: Pawel Kolodziejski

Background:

Residual currently offers two different renderers: OpenGL and TinyGL. Neither offers an ideal solution. Not all OpenGL drivers accelerate the operations needed by Grim Fandango, and the TinyGL renderer, apart from being somewhat glitchy, doesn't run well on low-end hardware.

The Task:

It would be nice to have a more light-weight cross-platform renderer. Since Grim Fandango uses mostly static backgrounds, we could probably gain a lot just from more intelligent screen redrawing.

This shouldn't require any deeper knowledge of the game engine. The renderer appears to be fairly well separated from the rest of the engine already.

Objectify CinE engine

Technical Contact: Eugene Sandulenko, Pawel Kolodziejski

Background:

The cinE engine started out as an external project started by Yaz0r. Originally it was written in plain C. ScummVM is a C++ project, so we need to objectify this engine without changing/breaking its behavior.

The engine itself is well-structured, hence many functions / variables which might be good candidates for being grouped together into a C++ class are already grouped by files.

No deep knowledge of the engine internals is required, but in any case the Engine is not that big, and thus it should be possible to learn enough about it to start working in a relatively short amount of time.

We have previously "objectified" several other engines, namely SAGA, Gob and AGI, so one can learn a lot about various approaches how to do this by tracing through our SVN repository.

Add 16bit graphics support to SCUMM engine

Technical Contact: Travis Howell, Eugene Sandulenko

Background:

The SCUMM engine was originally developed for palette-based graphics. At version 6 it was forked by Humongous Entertainment, which extended it significantly. Their later games started to use 16bit graphics for backgrounds and actors. See here for more detailed information.

This task requires good knowledge of C++, as we need a solution which will not clobber our code, will have minimal impact on 8bit games, and can be optionally turned off at compilation stage.

If you don't have any of the required games, there are several demos available. A 16bit graphics demo example would be the Freddi5 demo.

Add event recording

Technical Contact: Eugene Sandulenko, Max Horn

Background: All engines in ScummVM are driven by three sources of external influences (input):

  • Mouse events
  • Keyboard events
  • Pseudo-random number generators (several, in different parts of the code)

It would be useful to have some layer in between our system-dependent backends and engines which can record these events to a file and play them back later. Time control is crucial here, since the games take some time to react to these events (i.e. you need to record when the events occured, too).

This will significantly help with regression testing, as it would be possible to make records of certain scenes that caused bugs; we can record the incorrect behavior, and then automatically run these tests to compare the recorded with the expected behavior. (How this comparision would be done precisely also needs to be determined. You could for example compare screen content).

The solution should be high-level, perhaps in the form of a custom event loop, so that all engines will be able to use it with minimal effort. (Note that the PRNGs likely are the biggest obstacle here).

Implement "return to launcher" feature

Technical Contact: Max Horn

Background:

Presently we have to exit the ScummVM application completely when users exit a game because most engines do not clean up memory properly on their exit.

The Task:

What we need is to analyze what's going on there and plug all memory leaks, properly shut down subsystems like sound, so it will be possible to play more than a single game within one session.

The task will require good use of a memory leak analyzer and C++.