Category: GSoC ScummVM

GSoC 2017 Summary

GSoC 2017: Sludge Engine

Summary

Project description

During GSoC 2017, I worked for the org ScummVM, which is a program that allows running some classic graphical point-and-click adventure games on multiple platforms (Win, MacOS, Linux, Android, etc.), with game data file provided.

My project has been importing the Sludge engine into ScummVM and adding full support at least for the game Out Of Order. At the start, I had Sludge engine source code as base to work on, which is an open source project licensed under GNU LGPL version 2.1.

Goals achieved

Now I’d like to make a summary of what I’ve achieved:

1. Sludge engine

Sludge engine has largely been imported into ScummVM now with capability to run the games below:

  • Out of Order
  • Frasse and the Peas of Kejick
  • The Interview
  • Life Flashed By
  • The Game That Takes Place on a Cruise Ship
  • Cubert Badbone, P.I.
  • Robin’s Rescue (Tutorial game for sludge engine)

I tested the game Out Of Order from the beginning to the end and the first scenes in other games. There doesn’t seem to be serious problems.

2. Other features

    1. CMD :
      • As the entry barrier for GSoC program, I made a PR for the command line to get games detected and added. This feature has been polished and enriched by two other summvm members criezy and tobiatesan later.
    2. GRAPHICS :
      • I added Multiply blend mode for Transparent Surface: PR.
      • I fixed a minor bug about off-screen clipping handling for Transparent Surface : PR
    3. IMAGE :
      • I made a small modification to make it possible to write png from surfaces of 4-byte pixel format : commit 1 2

Future work

      • Unimported Sludge features :
        • Play movie
        • Color transition animation
      • Continue to track down game bugs
      • Code objectifying for sludge
      • I’m still working on adding support for .mod .s3m and .xm tracker sounds in my own fork.

Code

The code for sludge engine is in an individual folder in the repo:

https://github.com/scummvm/scummvm/tree/master/engines/sludge

The commits that I made :

https://github.com/scummvm/scummvm/commits?author=yinsimei

Advertisements

GSoC Week 12

GSoC 2017: Sludge Engine Week 12

Week task conclusion

Generally, this week is still focused on bug fixing and primary study of sound decoder.

Again, thanks to my mentors _sev(Eugene Sandulenko), t0by(Tobia Tesan) and all scummvm team members that has helped me during this week.

To make a brief conclusion about what we have achieved for this week :

  1. Bugs Fixed :
    1. Sprite darkness level bug
    2. Save&load looping sound bug
    3. zBuffer bug when burn sprites to backdrop
  2. A local branch in my fork for sound decoder has been created

As for the sound decoder, we’ve decided to use the the library micromod for it, which is a library including a converter from s3m, mod, xm to wav format. We find it impressive for its size and its capability to create a common loading structure for all three formats.

(Link to the repo on github : https://github.com/martincameron/micromod)

 

What’s for next week: Importing micromod sound decoders & Bug fixing

Tasks for next week :

  1. Import the micromod sound decoder into scummvm
  2. make the 3 win-only games work

GSoC Week 11

GSoC 2017: Sludge Engine Week 11

Week task conclusion

Generally, this week is focused on further bug fixing for the game Out Of Order and we are able to play from the begin to the end now.

Again, thanks to my mentors _sev(Eugene Sandulenko), t0by(Tobia Tesan) and all scummvm team members that has helped me during this week.

To make a brief conclusion about what we have achieved for this week :

  1. Bugs Fixed :
    1. Sprite depth
    2. Add thumbnail
    3. Save & load interface
      1. Add thumbnail
      2. Add saved file list
  2. Lightmap: 1 2 3
  3. Multiply blend mode for transparent surface

Things not achieved yet:

  1. Bugs left to be solved:
    1. Sometimes the menu can’t be called out by esc. This can be solved by restarting scummvm. Not sure when this bug will occur yet.
    2. The character sprite can be too dark sometimes.
    3. Save&Load game can cause some loop sound that shouldn’t be played there played
    4. When the credits show in the end, the zBuffer of the last scene remain
    5. At the beginning of the game, there is a moment the zbuffer doesn’t work. Don’t know why it is.
  2. The end of the game Out Of Order contains a short movie, so we’ll also need to see how to play it in scummvm
  3. By the way, the parallex is not used anywhere in any game. So I think it’s not necessary to implement it now.
  4. Still don’t know why the windows-only games don’t work.

What’s for next week: XM, IT, S3M Sound decoders

Tasks for next week :

  1. Fix the bugs that remain
  2. XM, IT, S3M sound decoders

GSoC Week 10

GSoC 2017: Sludge Engine Week 10

Week task conclusion

Since I didn’t have time to work on Sludge last week, I make this week the 10th week of GSoC Generally, this week is focused on bug tracking for the game Out Of Order. As the objectifying took longer than planned, we decided to back to it when we have time later and concentrate on bug fixing.

Again, thanks to my mentors _sev(Eugene Sandulenko), t0by(Tobia Tesan) and all scummvm team members that has helped me during this week.

To make a brief conclusion about what we have achieved for this week :

  1. Bug Fixing
    1. Backdrop bug :
      1. Clear screen
      2. Fix backdrop loading
      3. Fix crash when loading game
    2. zBuffer :
      1. zBuffer order bug
      2. Reset zBuffers when blank back drop
    3. Fix Off-screen cliping handling for Transparent Surface (in PR at present)
    4. Others :
      1. Quit game buit-in
      2. Correct pixel format for png writing
  2. New game situations :
    1. Out Of Order : Bugs concerning backdrop and z-Buffers are fixed
    2. The Interview : The crashing bug has been fixed with the update
    3. Life Flashes By: The bug concerning save & load file detection is unsolved, as it is not related to the built-in function FileExists as I expected. So still need to track down this problem.

What’s for next week: Bug fixing & Lightmap & Parallax

Tasks for next week :

  1. Test Out Of Order thoroughly and fix the bugs that remain
  2. Test other games and track bugs
  3. Add lightmap shader effect to sprite displaying
  4. Test and add parallax in Out Of Order (haven’t seen it in Out Of Order till now, maybe it is used in the scenes later)
  5. If time permits, try to figure out why the windows game doesn’t work. This may be something convoluted, the reason is still unknown

And for the week after the next, we will focus on making the decoder for multi-track sounds

GSoC Week 9

GSoC 2017: Sludge Engine Week 9

Week task conclusion

Generally, this 9th week of GSoC project is focused on objectifying the code and adding new games. The objectifying takes more time predicted and I think I will continue to work on it next week and debug for new games.

Again, thanks to my mentors _sev(Eugene Sandulenko), t0by(Tobia Tesan) and all scummvm team members that has helped me during this week.

To make a brief conclusion about what we have achieved for this week :

  1. Objectify the code
    1. Timer
    2. Language Manager
    3. Resource Manager
    4. Object Manager
    5. Graphics Manager : 1 2 3
    6. Event Manager
    7. Sound Manager
    8. Text Manager
    9. Cursor Manager
  2. Add new games
    1. Out Of Order : playable without any mechanic bugs in the first scenes, I didn’t test it to the end though. However, there are several graphic bugs with backdrops and z-buffers that need to be fixed
    2. Frasse and the Peas of Kejick : playable without bugs in the first scenes
    3. The Interview : There is a crush concerning backdrop size when we go to scene 2, need to check
    4. Life Flashes By: There is a bug concerning save & load file detect. I think implementing the fileExists built-in function will solve it.
    5. A few windows-only games, with blank screen or only main menu works. I can’t understand why there’s windows-only sludge game. I think I’ll need the source code to have a check

 

The data files of the games mentioned above can be found in the repo : https://github.com/yinsimei/sludge-test-games

What’s for next week: Fix games & Finish code objectifying

Tasks for next week :

  1. Finish code objectifying :
    1. Character Manager
    2. Stack Machine Manager
  2. Fix games
    1. Fix the animation issue in Robin’s Rescue : This issue is here for several weeks, didn’t have time to look deep into it as it’s a rather wierd one. This bug only exists in this game. No such bug in other games.
    2. The issues mentioned above

GSoC Week 6

GSoC 2017: Sludge Engine Week 6

Week task conclusion

Generally, this 6th week of GSoC project was good: the first mid-term evaluation has been validated and Robin’s Rescue is playable on ScummVM (still having some bugs to fix, though).

Again, thanks to my mentors _sev(Eugene Sandulenko), t0by(Tobia Tesan) and all scummvm team members that has helped me on bug fixing during this week.

To make a brief conclusion about what we have and have not achieved for this week :

 

Tasks completed:

  1. Load headless png files : flag to skip signature check + modify image loader
  2. FIx bugs related to loading background after loading zbuffer
  3. Other minor bug fixes …

 

To resolve later:

  1. There is still a problem with game’s timer, which is slower than expected
  2. Characters’ animation are very slow as well
  3. The text color is not 100% right

What’s for next week: Save & Load System

Tasks for next week :

  1. Clear the rest of issues in Robin’s Rescue
  2. Get save & load system up

Some findings about sludge

Sludge engine use headless png files (without 8 byte signature) for sprites.

GSoC Week 5

GSoC 2017: Sludge Engine Week 5

Week task conclusion

Generally, this 5th week of GSoC project was going smoothly: The z-Buffer zone (multi-layer effect) has been reproduced and fall back detection has been added

Again, thanks to my mentors _sev(Eugene Sandulenko), t0by(Tobia Tesan) and all scummvm team members that has helped me on z-Buffer during this week.

To make a brief conclusion about what we have and have not achieved for this week :

Tasks completed:

  1. z-BufferZone : load z-Buffer sprites + reproduce multi-layer effects
  2. fall back detection for sludge games

 

To resolve later:

  1. There is a segmentation fault when Robin’s Rescue starts. It may result from the game logo reading in the initilization, which is not implemented yet

What’s for next week: Bug fixes in Robin’s Rescue

Tasks for next week :

  1. Fix the segmentation error in Robin’s Rescue
  2. Clear all bugs in Robin’s Rescue

Also, the first GSoc evaluation will take place next week.

Some findings about sludge

z-Buffer Zone

In sludge, z-Buffer zones are different areas of a scene which can obscure character graphics, such as foreground silhouettes, doorframes and furniture. Their display has been ordered by a y-value to create different image layers (up to 16).

The above room image has the following z-buffer image (3 layers) :

And characters will change the image layer it lies in, when its own y-value changes. To reproduce this effect in scummvm, we used an array of 16 Lists for different layers.