Skip to content

extremecodetv/OpenSC

Repository files navigation

OpenSC

Note: This project is in an unfinished state and is intended primarily for developers and enthusiasts.

A custom-built, open-source reimplementation of the engine powering the "Scratches: Director's Cut" adventure game.

Disclaimer: This is a personal pet project, created for educational and preservation purposes. It is not affiliated with the original developers of Scratches.

Project Status

This project is currently ~80% complete. The core engine is functional, and the entire first day of the game is fully playable from start to finish. However, it is not yet a fully polished replacement for the original executable and requires further development.

Overview

OpenSC is an engine built from the ground up in C# using modern graphics (OpenGL via Silk.NET) and audio (OpenAL) APIs. It aims to accurately recreate the experience of the original "Scratches: Director's Cut" by interpreting the game's original assets and Lua scripts.

This project demonstrates a reverse-engineering effort of a classic point-and-click adventure game engine.

Features

  • Playable Core: The fundamental gameplay loop for the first day is implemented.
  • Modern Rendering: Uses OpenGL for rendering, providing a potential base for future enhancements.
  • Audio Support: Integrated OpenAL for sound playback.
  • Lua Scripting: Supports the game's logic written in Lua 5.1 (Director's Cut version).

Known Issues & Limitations

As this was my first attempt at building a game engine, there are several areas that need improvement:

  • Memory Leaks: The engine currently suffers from memory leaks.
  • Localization: Only the English version of "Scratches: Director's Cut" is supported due to issues with old ASCII encodings in other localizations.
  • Lua Version Support: The engine only supports Lua 5.1. The original "Scratches" (using Lua 5.0) will not run. An integrated decompiler for Lua 5.1 is included.
  • Missing Features:
    • Weather effects
    • Advanced audio effects and music (current implementation is primitive)
    • Save/Load system
    • In-game menu
    • Journal system
  • Incomplete API: Many SCream engine functions are declared but not yet fully implemented.
  • Asset Loading: Some legacy resources fail to load due to being missing from resource files or issues with decoding certain TGA images (e.g., missing alpha channel).

Technical Details

  • Language: C#
  • Graphics: OpenGL (via Silk.NET)
  • Audio: OpenAL
  • Scripting: Lua 5.1 (using a custom integration with a decompiler)

Long-Term Vision

Ideally, this project could serve as a research reference and a starting point for a more robust reimplementation within the ScummVM project. Many classic point-and-click adventure game engines share a similar architecture, and the ScummVM framework already provides implementations for many low-level functions (resource decoding, video playback from Ogg/Theora files, etc.) that had to be built from scratch here.

Getting Started

  1. You need a legitimate copy of "Scratches: Director's Cut" for the game assets.
  2. Build the solution in your preferred C# development environment.
  3. Configure the engine to point to your game's asset directory.

Contribution

This project is a work in progress. Help from the community would be greatly appreciated, especially in tackling the known issues listed above. Feel free to fork the repository, open issues, and submit pull requests.

Good Luck!

I hope someone can pick up this project and bring it to completion. Happy coding!

About

👾 open-source recreation of the SCream engine for Scratches: Director's Cut

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages