Google Summer of Code Summary
Over the past few months I’ve made 451 commits to the main ScummVM repository, largely in the Macromedia Director and MacGUI subsystems:
Most of this work was focused on the reimplementation of Lingo, Director’s programming language, so that Director games can be played in ScummVM. You can find every commit here, but this is the overview:
I did extensive work on Lingo objects; I implemented factories, Lingo’s first iteration of objects.…
Read more ⟶
Wrapping up the Summer
Summer’s drawing to a close, and the school year is about to begin. Before that happens, I’m trying to squeeze in a few more tasks: exposing more Director features as Lingo objects, fully implementing chunk expressions, and cleaning up the implementations of Director 4 Lingo instructions.
One of the ways I’ve tried to make the D4 instructions cleaner is by reducing code duplication. First, I cut down the size of cb_objectcall by reusing functionality in the generic call.…
Read more ⟶
Shockwave!
Last week was an exciting one because the Director engine can finally load Macromedia Shockwave 1.0 movies!
This first version of Shockwave was based on Director 4.0, which we already have partial support for, and it used a “afterburned” movie format with a modified memory map and zlib compression. After implementing support for this file format, the Director engine can now load (and sort of play) early Shockwave games: None of the games I’ve tested work very well yet due to missing Director features, but I’m hoping that some Shockwave games will be fully playable soon, as they’re often small and rather simple.…
Read more ⟶
Fixup
This last week I largely worked my way through my backed up Trello cards, as well as fixing Buildbot failures and various issues with movies in windows.
Some highlights from bug hunting:
Director movies contain a Lingo names table (Lnam) which, as the name implies, stores the names of functions, variables, etc. Previously, we were just loading the name table which had the highest ID, and thus should usually be the newest.…
Read more ⟶
A Branded Desktop
It’s been a hectic week since I attended two online conferences going on at the same time, and I had to prepare a talk for one of them, but I still have some exciting progress to share!
This week I got desktop/window border textures working, so the environment surrounding the Director movies looks closer to how it would have back in the day. Though the ScummVM branding would’ve been Mac OS branding, of course.…
Read more ⟶
Events and Things
I spent last week fixing more Lingo issues, mostly event related:
Previously, event processing didn’t take into account the fact that multiple movies could be running at the same time, as it was implemented before MIAWs. Events were handled by whatever movie was currently being stepped, even if the event should’ve gone to another movie. I refactored the event handling code, and that’s been fixed. I made the Lingo interpreter pause every 100 operations to process events, preventing long Lingo scripts from blocking mouse position updates and quit events.…
Read more ⟶
Learning the Lingo
This week I worked out some longstanding Lingo issues!
Duplicate Scripts The first issue was duplicate scripts in Director 4 movies. Each cast member should have at most one Lingo script associated with it, but we were running into movies in which a cast member seemingly had several scripts. There was no obvious way to deal with this - redefining the script usually led to incorrect behavior, and so did keeping the original definition.…
Read more ⟶
MIAWs
This last week I finished up my refactoring spree, adding an object interface which allows any type to be treated as a Lingo object. With this done, it allowed for our Stage to be turned into a Lingo object, enabling…
Movies In A Window!
Now new windows can be created/destroyed and hidden/shown with open window "ball", close window "ball", forget window "ball", etc. There’s still a good number of Lingo methods and properties to implement, and rendering issues which need to be sorted out, but for now I’m focusing on fixing the large number of Buildbot errors which have recently piled up.…
Read more ⟶
Refactoring
This last week I got some boring but important work done. After completing some odd jobs like implementing event delegation for Director 2-3 and TrueType font loading, I began refactoring the Director engine to make it flexible enough to handle Movies In A Window (MIAWs), or multiple movies running in parallel.
For those not familiar, Director uses a movie metaphor for development. A movie’s major components are:
The cast, which contains cast members.…
Read more ⟶
Back to Bytecode
This week I wrapped up work on parent scripts and factories, starting with some bug fixes and minor refactoring. The Lingo in Lingo Workshop’s Bug Garden movie now fully works!
After getting Bug Garden working, I began implementation of the bytecode versions of parent scripts and factories. For those not familiar with the Director engine, there are two ways we load Lingo scripts. From Director 2-3, Lingo was stored in Director movies as source code, which we parse and compile to custom bytecode.…
Read more ⟶