GSoC 2017: Sludge Engine Week 3
Week task conclusion
Generally, this 3rd week of GSoC project was good: milestone 1 is completed as we are able to display texts and play sounds(wav, ogg) now, although not all sound system works because of the need of implementing advanced module file decoders for XM, IT, S3M formats, which is not a small task at all. So we decided to leave it for later.
Again, thanks to my mentors _sev(Eugene Sandulenko), t0by(Tobia Tesan) and all scummvm team members that has helped me on texts and sounds during this week.
To make a brief conclusion about what we have and have not achieved for this week :
Tasks completed:
And :
For later (They don’t have much effects for now):
|
A minor problem that may not have much effect:
|
What’s for next week: Cursor & Input
In order to have a playable game, we will move to input stuff next week :
|
Some findings about sludge
How texts work
Every font is represented by a series of sprites for characters. Every sprite includes 2 parts:
- the black background that gives a black border for texts: so all texts in sludge have black borders
- a white overlay image, whose colors can be changed by shaders. This effect can be reproduced by changing input parameters of scummvm blit funtion
How audios work
There are 5 sound formats supported by sludge: .WAV, .OGG and .XM, .IT, .S3M. Every sound is played by a call in the game script:
- playSound(…) for WAV and OGG
- startMusic(…) for module sound formats : .XM, .IT, .S3M
We also have the possibility to loop a list of sounds in sludge, which is done by building a circled linked list beforehand and at the end-of-stream callback function, “the next sound” in the linked list is played.