1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-23 15:45:24 +00:00
A mirror of the OpenDiablo2 project
Go to file
William 48a193579f
Enhanced escape menu with options - d2gui bug remaining (#459)
* First improvements

Signed-off-by: William Claude <w.claude@thebeat.co>

* Make the menu more generic

Signed-off-by: William Claude <w.claude@thebeat.co>

* Handle mouse events

Signed-off-by: William Claude <w.claude@thebeat.co>

* Remove debug statement

Signed-off-by: William Claude <w.claude@thebeat.co>

* Handle left clicks better

Signed-off-by: William Claude <w.claude@thebeat.co>

* Remove unused file

Signed-off-by: William Claude <w.claude@thebeat.co>

* Handle titles in screens

Signed-off-by: William Claude <w.claude@thebeat.co>

* Improve the menu using layouts

Signed-off-by: William Claude <w.claude@thebeat.co>

* Add support for onOff labels

Signed-off-by: William Claude <w.claude@thebeat.co>

* Mutualise title creation

Signed-off-by: William Claude <w.claude@thebeat.co>

* Add gutter and mutualise things

Signed-off-by: William Claude <w.claude@thebeat.co>

* Improve menu, mutualise a lot of things and support animated sprites

Signed-off-by: William Claude <w.claude@thebeat.co>

* Use a cfg struct instead of independent handlers

Signed-off-by: William Claude <w.claude@thebeat.co>

* Fix hardcoded value

Signed-off-by: William Claude <w.claude@thebeat.co>

* Clean things a bit

Signed-off-by: William Claude <w.claude@thebeat.co>

* Remove unused property

Signed-off-by: William Claude <w.claude@thebeat.co>

* First support for hoverable elements

Signed-off-by: William Claude <w.claude@thebeat.co>

* Add support for label selection feedback

Signed-off-by: William Claude <w.claude@thebeat.co>

* Add support options

Signed-off-by: William Claude <w.claude@thebeat.co>

* Update print statement

Signed-off-by: William Claude <w.claude@thebeat.co>

* Update rendering and clean code

Signed-off-by: William Claude <w.claude@thebeat.co>

* Remove debug things

Signed-off-by: William Claude <w.claude@thebeat.co>

* Handle hovering

Signed-off-by: William Claude <w.claude@thebeat.co>

* Support enter key for labels

Signed-off-by: William Claude <w.claude@thebeat.co>

* Attach methods to layout

Signed-off-by: William Claude <w.claude@thebeat.co>

* Move things under EscapeMenu

Signed-off-by: William Claude <w.claude@thebeat.co>

* Some renaming

Signed-off-by: William Claude <w.claude@thebeat.co>

* Clean

Signed-off-by: William Claude <w.claude@thebeat.co>

* Set hovered element ID when using the mouse

Signed-off-by: William Claude <w.claude@thebeat.co>

* Clean

Signed-off-by: William Claude <w.claude@thebeat.co>

* Delete unused file

Signed-off-by: William Claude <w.claude@thebeat.co>

* Wire save & exit with a nasty hack

Signed-off-by: William Claude <w.claude@thebeat.co>

* Remove unused file

Signed-off-by: William Claude <w.claude@thebeat.co>

* Remove dead code

Signed-off-by: William Claude <w.claude@thebeat.co>

* Reorder the code a bit

Signed-off-by: William Claude <w.claude@thebeat.co>

* Rename hoverableElement into actionableElement

Signed-off-by: William Claude <w.claude@thebeat.co>

* Prevent regenerating the label if the text didn't change

Signed-off-by: William Claude <w.claude@thebeat.co>
2020-06-25 16:27:16 -04:00
.circleci Update to Go 1.14 (#429) 2020-06-23 23:53:21 -04:00
.github Create FUNDING.yml 2020-06-24 12:03:57 -04:00
.vscode Switch to fork of coverage tool (#446) 2020-06-24 20:40:12 -04:00
d2common Character stats (#458) 2020-06-25 14:56:49 -04:00
d2core Enhanced escape menu with options - d2gui bug remaining (#459) 2020-06-25 16:27:16 -04:00
d2game Enhanced escape menu with options - d2gui bug remaining (#459) 2020-06-25 16:27:16 -04:00
d2networking Character stats (#458) 2020-06-25 14:56:49 -04:00
d2script Added multiplayer support (#336) 2020-06-18 14:11:04 -04:00
docs Fix and QA (#325) 2020-06-13 18:34:45 -04:00
scripts Added multiplayer support (#336) 2020-06-18 14:11:04 -04:00
.editorconfig Changes necessary for migration to org account (#67) 2019-11-02 17:38:39 -04:00
.gitignore Performance/Memory Improvements (#365) 2020-06-20 21:07:36 -04:00
.golangci.yml Linter (#427) 2020-06-23 22:15:31 -04:00
.travis.yml Don't try to copy config.json on travis (#263) 2019-12-19 20:25:44 -05:00
build.sh Reorganize run.sh (#457) 2020-06-25 13:08:33 -04:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-11-22 10:54:08 -05:00
CONTRIBUTORS Character stats (#458) 2020-06-25 14:56:49 -04:00
d2discord.png Fixed walking animations and pathing bugs. (#345) 2020-06-20 00:40:49 -04:00
d2logo.ico More build updates. Added build info to game. 2019-11-02 16:15:16 -04:00
d2logo.png Fixed walking animations and pathing bugs. (#345) 2020-06-20 00:40:49 -04:00
go.mod Linter (#427) 2020-06-23 22:15:31 -04:00
go.sum Pull go-astar code into the repo, improve perf (#411) 2020-06-23 02:04:17 -04:00
LICENSE Create LICENSE 2019-10-25 18:47:19 -04:00
main.go added a startup error screen shown when the mpq files are not found (#442) 2020-06-24 14:42:39 -04:00
README.md Reorganize run.sh (#457) 2020-06-25 13:08:33 -04:00
rh.exe Final modification for builds 2019-11-02 16:25:24 -04:00
tagdev.bat CI release updates 2019-11-02 13:41:03 -04:00

OpenDiablo2

CircleCI Code Status

Logo

Join us on Discord!
Development Live stream
Support us on Patreon

We are also working on a toolset:
https://github.com/OpenDiablo2/HellSpawner
Please consider helping out with this project as well!

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 ./build.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.

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:

go run . --profile=cpu

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

Ingame you can create a heap dump by pressing ~ and typing dumpheap. A heap.pprof is written to the pprof directory.

You may need to install Graphviz in order to convert the profiler output.

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