1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2025-02-09 01:56:47 -05:00
A mirror of the OpenDiablo2 project
Go to file
Ian 9121209f86
Backmerge master into ecs (#1021)
* quest log disabled icon

* removed unused functions for text colorizing

* terminal printing

* fixed saving key change bug

* help overlay text

* removed unused issue comments

* Update Ebiten to v2.0.2

* changed terminal color separator & changed logLevelNone to logLevelDefault in app.go

* status and screens update

* quest animation initial.

* escape menu hotkeys

* hero save file

* add-buttons init

* add-buttons actions

* stats changing: hero stats panel

* skill tre - remaining points label

* revert:hero save file (app.go)

* escape menu hotkeys

* hero save file

* updated d2hero.HeroStatsState

* corrected grammar errors

* animation is played and last frame is completedFrame

* animation stops playing, when quest log is closed & quest socket gets highlighted, when animation is playing & fixed highlight bug

* fixed quest descr bug & added code description

* level-up buttons tooltips

* Replaced kingping with flag package

* Cleanup d2records logging

* Renamed CharStatRecord

* Renamed SoundDetailRecord

* Renamed MonStatRecord

* Renamed ObjectDetailRecord

* Renamed MonStat2Record

* fixed onHover bug in d2ui.Sprite (#992)

Co-authored-by: M. Sz <mszeptuch@protonmail.com>

* added static checks to d2ui (#990)

Co-authored-by: M. Sz <mszeptuch@protonmail.com>

* fixed onHover bug in d2ui.Label (#991)

Co-authored-by: M. Sz <mszeptuch@protonmail.com>

* Revert "fixed onHover bug in d2ui.Sprite"

This reverts commit 8b557062fb.

* tip-labels in tcpip menu

* skill select menu dependencies (when we open skillselect menu, other panels are closed)

* Cleaned up d2term

* A wild } appeared

* Fixed linter issues

* ckecked value of italian modifier

* game-controls refactor

* fixed build and lint errors

* removed unnecessary switch-case statments from onKeyUp and onEscKey

* fixed bug with terminal's logLevel

* Refactor StreamWriter

* Refactor StreamReader

* Fixed gocritic linter issues

* Reduce GetTiles slice allocation

* Networking bugfixes and cleanup

Make sure connections close properly, without weird error messages
Remove player map entity when a player disconnects from a multiplayer game
Close server properly when host disconnects, handle ServerClose on remote clients
Don't mix JSON decoders and raw TCP writes
Actually handle incoming packets from remote clients
General code cleanup for simplicity and consistency

* Switched to self hosted build agent

* Removed PR requirement for action

* remove build job requirement

* Fiddling with actions names

* Updated workflows

* Fix yaml errors

* Yet another yaml fix

* Removed improper ebiten dependency in d2interface.

* Add checkboxes, checkbox test scene

* Render HUD before Panels (in this Case 'Panels' only does mean Inventory Panel). This is to avoid Entity Labels to be renderd above the Inventory Panel. Fixes #936

* This DCC frame size calculation seems useless

TBH there some to be some other overcomplicated things going on in
DCCAnimation but too tired to use brain right now.

* De-lint ecs branch

* bugfix: file_handle_resolver

* Add boot state to scenes, fix loading screen scene

* added label-button widget (#989)

Co-authored-by: M. Sz <mszeptuch@protonmail.com>

* removed links to closed issues from code (#1005)

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
Co-authored-by: gravestench <dknuth0101@gmail.com>

* removed unused fields from d2player.GameControl.actionableRegions (#997)

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
Co-authored-by: gravestench <dknuth0101@gmail.com>

* d2ui.Frame refactor (#994)

* d2ui.Frame refactor

* removed unneccessery d2asset.AssetManager argument from d2ui.NewUIFrame

* d2ui.Frame refactor

* removed unneccessery d2asset.AssetManager argument from d2ui.NewUIFrame

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
Co-authored-by: Tim Sarbin <tim.sarbin@gmail.com>
Co-authored-by: gravestench <dknuth0101@gmail.com>

* d2mpq refactored (#1020)

* d2mpq refactor

* d2mpq refactor last standing lint error

* d2mpq refactor: less linter noise

* d2mpq refactor: more linter issues

Co-authored-by: M. Sz <mszeptuch@protonmail.com>
Co-authored-by: Tim Sarbin <tim.sarbin@gmail.com>
Co-authored-by: Hajime Hoshi <hajimehoshi@gmail.com>
Co-authored-by: gucio321 <73652197+gucio321@users.noreply.github.com>
Co-authored-by: Intyre <intyre@gmail.com>
Co-authored-by: ThomasChr <thomaschristlieb@hotmail.com>
Co-authored-by: Ziemas <ziemas@ziemas.se>
Co-authored-by: gravestench <dknuth0101@gmail.com>
2021-01-09 00:25:44 -08:00
.circleci Update to Go 1.14 (#429) 2020-06-23 23:53:21 -04:00
.github Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08:00
.vscode Switch to fork of coverage tool (#446) 2020-06-24 20:40:12 -04:00
d2app Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08:00
d2common Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08:00
d2core Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08:00
d2game Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08:00
d2networking Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08:00
d2script lint fixes (#615) 2020-07-23 12:56:50 -04:00
docs Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08:00
scripts Added multiplayer support (#336) 2020-06-18 14:11:04 -04:00
utils/extract-mpq Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08:00
.editorconfig Changes necessary for migration to org account (#67) 2019-11-02 17:38:39 -04:00
.gitignore Fix background music crash issue. (#880) 2020-10-28 22:34:47 -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 fixed some errors 2020-11-18 09:13:16 +01:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2018-11-22 10:54:08 -05:00
CONTRIBUTORS Misc(CONTRIB): Adds Ganitzsh as a contributor (#896) 2020-11-02 01:13:46 -08: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 Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08:00
go.sum Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08:00
LICENSE Create LICENSE 2019-10-25 18:47:19 -04:00
main.go transform component, scene testing 2020-12-07 12:44:11 -08:00
README.md Backmerge master into ecs (#1021) 2021-01-09 00:25:44 -08: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

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.

Status

At the moment (december 2020) the game starts, you can select any character and run around Act1 town. You can also open any of the game's panels.

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!

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 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!

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.

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.

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

Roadmap

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

Screenshots

Main Menu

Select Hero

Select Hero

Gameplay

Inventory Window

Game Panels

Additional Credits