1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-12-26 12:06:24 -05:00
OpenDiablo2/README.md

139 lines
6.3 KiB
Markdown
Raw Normal View History

2020-02-02 18:52:16 -05:00
# OpenDiablo2
[![CircleCI](https://circleci.com/gh/OpenDiablo2/OpenDiablo2/tree/master.svg?style=svg)](https://circleci.com/gh/OpenDiablo2/OpenDiablo2/tree/master)
2018-11-26 22:42:22 -05:00
2020-06-25 12:13:18 -04:00
![Logo](d2logo.png)
2018-11-23 13:33:23 -05:00
[Join us on Discord!](https://discord.gg/pRy8tdc)\
2020-06-19 15:58:04 -04:00
[Development Live stream](https://www.twitch.tv/essial/)\
2020-06-21 11:23:17 -04:00
[Support us on Patreon](https://www.patreon.com/bePatron?u=37261055)
2018-11-22 00:21:05 -05:00
2020-06-25 12:13:18 -04:00
We are also working on a toolset:\
[https://github.com/OpenDiablo2/HellSpawner](https://github.com/OpenDiablo2/HellSpawner)\
Please consider helping out with this project as well!
2019-10-26 12:55:36 -04:00
2018-11-22 01:12:58 -05:00
## About this project
2019-10-24 09:38:57 -04:00
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](https://us.shop.battle.net/en-us/product/diablo-ii) and its expansion [Lord of Destruction](https://us.shop.battle.net/en-us/product/diablo-ii-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.
2018-11-22 01:12:58 -05:00
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.
2018-12-15 01:17:34 -05:00
Please note that **this game is neither developed by, nor endorsed by Blizzard or its parent company Activision**.
2018-11-22 01:12:58 -05:00
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.
## Status
2020-10-10 18:45:04 -04:00
At the moment (october 2020) the game starts, you can select any character and run around Act1 town.
Much work has been made in the background, but a lot of work still has to be done for the game to be playable.
Feel free to contribute!
2019-10-24 09:38:57 -04:00
## Building
2018-11-23 00:55:53 -05:00
To pull the project down, run `go get github.com/OpenDiablo2/OpenDiablo2`
2018-11-22 01:16:32 -05:00
2019-11-17 08:00:43 -05:00
On windows this folder will most likely be in `C:\users\(you)\go\src\github.com\OpenDiablo2\OpenDiablo2`
2019-10-24 11:26:07 -04:00
In the root folder, run `go get -d` to pull down all dependencies.
To run the project, run `go run .` from the root folder.
2019-10-24 11:26:07 -04:00
You can also open the root folder in VSCode. Make sure you have the `ms-vscode.go` plugin installed.
2018-11-22 00:21:05 -05:00
2019-11-16 11:18:49 -05:00
### Linux
There are several dependencies which need to be installed additionally.
To install them you can use `./build.sh` in the project root folder - this script takes care of the installation for you.
2019-11-16 11:18:49 -05:00
2019-11-02 14:58:03 -04:00
## 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
2019-11-02 14:58:03 -04:00
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:
2019-11-16 11:18:49 -05:00
2019-11-02 14:58:03 -04:00
```
replace github.com/OpenDiablo2/OpenDiablo2 => /your/forked/import/path
2019-11-02 14:58:03 -04:00
```
2019-11-16 11:18:49 -05:00
2019-11-02 14:58:03 -04:00
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 that's 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!
2019-11-02 15:10:04 -04:00
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.
**As of Oct. 26, 2020 we will no longer be accepting pull requests that introduce lint errors.**
We use `golangci-lint` to catch lint errors, and we require all contributors to install and use
it. Installation instructions can be found [here](https://golangci-lint.run/usage/install/).
## VS Code Extensions
The following extensions are recommended for working with this project:
2019-11-16 11:18:49 -05:00
- 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 <kbd>Ctrl+,</kbd>, expanding `Extensions` and selecting `Go configuration`,
then clicking on `Edit in settings.json`. Just paste that section where appropriate.
2019-10-24 09:38:57 -04:00
## 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.
2020-06-22 12:43:26 -04:00
## Profiling
There are many profiler options to debug performance issues. These can be enabled by suppling the following command-line option and are saved in the `pprof` directory:
2020-06-22 12:43:26 -04:00
`go run . --profile=cpu`
2020-06-22 12:43:26 -04:00
Available profilers:\
`cpu` `mem` `block` `goroutine` `trace` `thread` `mutex`
You can export the profiler output with the following command:\
`go tool pprof --pdf ./OpenDiablo2 pprof/profiler.pprof > file.pdf`
2020-06-22 12:43:26 -04:00
Ingame you can create a heap dump by pressing `~` and typing `dumpheap`. A heap.pprof is written to the `pprof` directory.
2020-06-22 12:43:26 -04:00
You may need to install [Graphviz](http://www.graphviz.org/download/) in order to convert the profiler output.
2020-06-22 12:43:26 -04:00
2020-10-10 18:45:04 -04:00
## Debugging
### Layouts
Layouts can show their boundaries and other visual debugging information when they render. Set `layoutDebug` to `true` in `d2core/d2gui/layout.go` to enable this behavior.
![Example layout in debug mode](https://user-images.githubusercontent.com/1004323/85792085-31816480-b733-11ea-867e-291946bfff83.png)
## Roadmap
There is an in-progress [project roadmap](https://docs.google.com/document/d/156sWiuk-XBfomVxZ3MD-ijxnwM1X66KTHo2AcWIy8bE/edit?usp=sharing),
which will be updated over time with new requirements.
## Screenshots
![Main Menu](docs/MainMenuSS.png)
![Select Hero](docs/SelectHeroSS.png)
2019-11-20 22:37:08 -05:00
![Select Hero](docs/areas.gif)
2020-11-13 05:37:47 -05:00
![Gameplay](docs/Gameplay.png)
![Inventory Window](docs/Inventory.png)
## Additional Credits
2019-11-16 11:18:49 -05:00
- Diablo2 Logo
- Jose Pardilla (th3-prophetman)
- DT1 File Specifications
- Paul SIRAMY (http://paul.siramy.free.fr/_divers/dt1_doc/)
- Other Specifications and general info
- Various users on [Phrozen Keep](https://d2mods.info/home.php)