OpenDiablo2

《暗黑破坏神2》的开源重新实现。「An open source re-implementation of Diablo 2」

Github星跟蹤圖

OpenDiablo2

加入我们的 Discord!
开发直播
在 Patreon 上支持我们

我们还在开发一个工具集:
https://github.com/OpenDiablo2/HellSpawner
请考虑也帮助这个项目!

关于这个项目

OpenDiablo2 是一款与2000年代游戏相同的 ARPG 游戏引擎,并支持玩 Diablo2。该引擎是用 golang 编写的,并且是跨平台的。但是,请注意,该项目未附带玩《暗黑破坏神2》所需的资产或内容。您必须在计算机上安装合法购买的《暗黑破坏神2》及其扩展的《毁灭之王》(Lord of Destruction)副本,才能在此引擎上运行该游戏。如果您有磁盘的原始副本,那么这些文件也应该可以正常工作。

我们目前正在开发完整播放暗黑破坏神2所需的功能。完成后,我们将致力于扩展该项目,以包括用于改装的工具和插件支持,以及使用引擎编写全新的游戏。

请注意,该游戏并非由暴雪或其母公司 Activision 开发或认可。

暗黑破坏神2及其内容是 ©2000 Blizzard Entertainment,Inc. 保留所有权利。

Diablo 和 Blizzard Entertainment 是 Blizzard Entertainment,Inc. 在美国和/或其他国家/地区的商标或注册商标。

所有其他商标均为其各自所有者的财产。

构建

要把项目拉下来,请运行 go get github.com/OpenDiablo2/OpenDiablo2

在 Windows 上,此文件夹很可能位于 C:\users\{you}\go\src\github.com\OpenDiablo2\OpenDiablo2

在根文件夹中,运行 go get -d 下拉所有依赖项。

要运行项目,请从根文件夹运行 go run。

您也可以在 VSCode 中打开根文件夹。 确保已安装 ms-vscode.go 插件。

Linux

有几个依赖项需要额外安装。 要安装它们,可以在项目根文件夹中使用 ./build.sh -- 该脚本为您完成安装。

贡献

该项目的导入使用 github.com/OpenDiablo2/OpenDiablo2。 这意味着即使您克隆了存储库,也不会进行更改,因为它仍将从主存储库的文件中提取。 为了使用您的本地版本,将以下内容添加到基本文件夹中的 go.mod 中:

replace github.com/OpenDiablo2/OpenDiablo2 => /your/forked/import/path

这将告诉 go 使用您的本地路径,而不是正式的仓库。 确保从您的请求请求中排除此更改!

如果发现要修复的东西显然已损坏,请创建一个分支,提交您的代码,然后提交拉取请求。 如果您想查看它是新增功能还是缺少的功能,请添加问题并进行说明!

如果您想提供帮助并且不确定如何操作,则可以浏览所有未解决的问题和任务,或者在我们的不和谐服务器上询问任务。

VS Code 扩展

建议使用以下扩展名来处理此项目:

  • ms-vscode.go
  • defaltd.go-coverage-viewer

第一次打开工作区时,Visual Studio Code 将自动建议安装这些扩展。

另外,您也可以通过以下方法进行设置:转到设置 Ctrl+,展开“扩展”并选择“转到配置”,然后在 settings.json 中单击“编辑”。只要在适当的地方粘贴该部分即可。 或者你也可以点击设置 Ctrl+,展开扩展并选择 Go configuration,然后点击 settings.json 中的 Edit。把这个部分粘贴到合适的地方。

配置

引擎是通过 config.json 文件配置的。默认情况下,该配置假设你已经通过官方的暴雪暗黑2安装程序使用默认的文件路径安装了暗黑2和资料片。如果你不在 Windows 上,或者已将游戏安装在其他位置,则可能需要调整基本路径。

概要分析

有许多分析器选项用于调试性能问题。可以通过提供以下命令行选项来启用它们,并将它们保存在 pprof 目录中:

go run . --profile=cpu

可用分析器:

cpu mem block goroutine trace thread mutex

您可以使用以下命令导出分析器输出:

go tool pprof --pdf ./OpenDiablo2 pprof/profiler.pprof > file.pdf

在游戏中,您可以通过按〜并键入 dumpheap 来创建堆转储。 将 heap.pprof 写入 pprof 目录。

您可能需要安装 Graphviz 才能转换探查器输出。

路线图

有一个正在进行的项目路线图,它将随着时间的推移、随着新的需求而更新。

致谢

主要指標

概覽
名稱與所有者OpenDiablo2/OpenDiablo2
主編程語言Go
編程語言Go (語言數: 5)
平台Linux, Windows, Mac
許可證GNU General Public License v3.0
所有者活动
創建於2018-11-22 05:19:30
推送於2021-10-21 13:18:36
最后一次提交2021-10-21 09:18:36
發布數1
最新版本名稱v0.1-pre-alpha (發布於 )
第一版名稱v0.1-pre-alpha (發布於 )
用户参与
星數10.9k
關注者數228
派生數826
提交數1.5k
已啟用問題?
問題數268
打開的問題數67
拉請求數792
打開的拉請求數8
關閉的拉請求數66
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

OpenDiablo2 Build Status

Join us on Discord!
Development Live stream

Logo

About this project

OpenDiablo2 is an ARPG game engine in the same vein of the 2000's games, and supports playing Diablo 2. The engine is written in golang and is cross platform. However, please note that this project does not ship with the assets or content required to play Diablo 2. You must have a legally purchased copy of Diablo 2 and its expansion Lord of Destruction installed on your computer in order to run that game on this engine. If you have an original copy of the disks, those files should work fine as well.

We are currently working on features necessary to play Diablo 2 in its entirety. After this is completed, we will work on expanding the project to include tools and plugin support for modding, as well as writing completely new games with the engine.

Please note that this game is neither developed by, nor endorsed by Blizzard or its parent company Activision.

Diablo 2 and its content is ©2000 Blizzard Entertainment, Inc. All rights reserved. Diablo and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.

ALL OTHER TRADEMARKS ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS.

Building

To pull the project down, run go get github.com/OpenDiablo2/OpenDiablo2

On windows this folder will most likely be in C:\users\(you)\go\src\github.com\OpenDiablo2\OpenDiablo2

In the root folder, run go get -d to pull down all dependencies.

To run the project, run go run . from the root folder.

You can also open the root folder in VSCode. Make sure you have the ms-vscode.go plugin installed.

Linux

There are several dependencies which need to be installed additionally.
To install them you can use ./run.sh in the project root folder - this script takes care of the installation for you.

Contributing

The imports for this project utilize github.com/OpenDiablo2/OpenDiablo2. This means that even if you clone the repo, changes will not be taken as it will
still pull from the main repo's files. In order to use your local version, add the following to go.mod in the base folder:

replace github.com/OpenDiablo2/OpenDiablo2 => /your/forked/import/path

This will tell go to use your local path instead of the official repo. Be sure to exclude this change from your pull requests!

If you find something you'd like to fix thats obviously broken, create a branch, commit your code, and submit a pull request. If it's a new or missing feature you'd like to see, add an issue, and be descriptive!

If you'd like to help out and are not quite sure how, you can look through any open issues and tasks, or ask
for tasks on our discord server.

VS Code Extensions

The following extensions are recommended for working with this project:

  • ms-vscode.go
  • defaltd.go-coverage-viewer

When you open the workspace for the first time, Visual Studio Code will automatically suggest these extensions for installation.

Alternatively you can get to it by going to settings Ctrl+,, expanding Extensions and selecting Go configuration,
then clicking on Edit in settings.json. Just paste that section where appropriate.

Configuration

The engine is configured via the config.json file. By default, the configuration assumes that you have installed Diablo 2 and the
expansion via the official Blizzard Diablo2 installers using the default file paths. If you are not on Windows, or have installed
the game in a different location, the base path may have to be adjusted.

Roadmap

There is an in-progress project roadmap,
which will be updated over time with new requirements.

Screenshots

Main Menu

Select Hero

Select Hero

Additional Credits