Dark Magic is a community-driven open-source project that aims to recreate the legendary Diablo 2 gaming experience from scratch. Our mission is to modernize and enhance the game engine while preserving the classic gameplay mechanics and nostalgia that made Diablo 2 a timeless masterpiece.
Inspired by the passion of the Diablo community, we strive to deliver an authentic and faithful journey into the dark and dangerous world of Sanctuary. Together, we can bring back the magic of this iconic game and shape its future.
cmd
- contains a directory for each binary that can be compiled. some of what is here may be migrated to atools
directory in the future.pkg/models
- contains all the d2 models, much of them being the structs which represent records loaded from the MPQ excel files.pkg/services
- contains all the high-level application services like file loaders, lua environment, config file manager, etc.
This project uses the Service Mesh framework, which necessitates the high-level organization of an application be broken into a collection of services. Each service will have a README.md declared in their corresponding directories.
Config File
- manages config files in a root diectory. almost all other services will use this to read and write their config to disk.Asset Loader
- a composite loader, combines all of the other loaders, exports stuff to lua, and provides debug web routesDC6 Loader
- loads DC6 image files using the mpq loaderDCC Loader
- loads DCC image files using the mpq loaderDS1 Loader
- loads DS1 map "stamp" files using the mpq loaderDT1 Loader
- loads DT1 map tileset files using the mpq loaderFont Table Loader
- loads font tables files using the mpq loaderGPL Loader
- loads GIMP palette filesMPQ Loader
- loads the diablo2 mpq's, will load files from them by checking one at a time in order.PL2 Loader
- loads PL2 palette transformation files using the mpq loaderTBL Loader
- loads TBL text table files (locale strings) using the mpq loaderTSV Loader
- loads TSV tab-separated value spreadsheet files using the mpq loaderWAV Loader
- loads WAV audio files using the mpq loaderLocale
- uses the TBL and MPQ loaders and exposes an interface for things like locale string-lookupsLua
- manages a single global lua state machine, uses an exported interface that all other services may optionally implement in order to export stuff into the lua environment for use in scripting. This service also executes scripts.Record Manager
- uses the mpq and tsv loaders to parse all the excel files into arrays of structs defined inpkg/models
Web Router
- exposes an interface other services can optionally implement to expose web routes. Several of the other services expose web routes for debug purposes (like pulling files out of the mpq's)Web Server
- uses the web router to serve requests
Are you ready to embark on a journey into the heart of darkness? Unite with fellow adventurers and follow the development of Dark Magic on our and community Discord server.
Gather your courage, for a new era of sanctuary awaits. Embrace the magic, rewrite the destiny - with Dark Magic.
The following services need to be implemented:
Character Generator
- uses the record manager to create character instancesItem Generator
- generates items using the record managerLoot Generator
- uses the record manager to roll loot (generates items)Map Generator
- uses the record manager and asset loaders to generate mapsMonster Generator
- uses the record manager to create instances of monstersRenderer
- a wrapper around the rendering backend- TBD
We welcome contributions from developers, artists, designers, and Diablo enthusiasts of all levels of expertise. If you want to be part of this journey, check out our CONTRIBUTING.md guide to get started.
Also, you can copy/paste the Service Template
into pkg/services
for a head start on creating a new service.
This project is licensed under the MIT License - see the LICENSE file for details.
Dark Magic is not affiliated with or endorsed by Blizzard Entertainment, Inc. Diablo is a registered trademark of Blizzard Entertainment, Inc. All in-game content, imagery, and lore are the property of Blizzard Entertainment, Inc.