Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shawwn/noh

An open source implementation of Icefrog's DotA, with a pretty amazing engine. Builds in 3 minutes flat; cross-platform.
https://github.com/shawwn/noh

Last synced: 3 days ago
JSON representation

An open source implementation of Icefrog's DotA, with a pretty amazing engine. Builds in 3 minutes flat; cross-platform.

Awesome Lists containing this project

README

        

# Newerth of Heroes

image

An open source implementation of [dota](https://www.youtube.com/watch?v=qTsaS1Tm-Ic&ab_channel=BASSHUNTER).

Cross platform; multiplayer; lobby system; map editor; replay system; semicolon. Builds in 3 minutes flat on an M1 Air.

Table of Contents
=================

* [About](#about)
* [Media](#media)
* [Newerth dev stream #1](#newerth-dev-stream-1)
* ["I was a former HoN dev. AMA"](#i-was-a-former-hon-dev-ama)
* [License](#license)
* [Compiling NoH](#compiling-noh)
* [Building NoH on macOS](#building-noh-on-macos)
* [Install macOS dependencies](#install-macos-dependencies)
* [Clone the repository (--recursive is important!)](#clone-the-repository---recursive-is-important)
* [Build on macOS with CMake](#build-on-macos-with-cmake)
* [Building NoH on macOS with CLion](#building-noh-on-macos-with-clion)
* [Open the repo in CLion](#open-the-repo-in-clion)
* [Once CLion is open](#once-clion-is-open)
* [If things go wrong](#if-things-go-wrong)
* [Building NoH on Ubuntu](#building-noh-on-ubuntu)
* [Build without graphics](#build-without-graphics)
* [Build with graphics](#build-with-graphics)
* [Building NoH on Windows](#building-noh-on-windows)
* [Install Git for Windows](#install-git-for-windows)
* [Install CMake for Windows](#install-cmake-for-windows)
* [Install Visual Studio](#install-visual-studio)
* [Install CLion](#install-clion)
* [Build with CLion](#build-with-clion)

## About

Intended to be the game engine that my 13yo self wished he'd had. Think of it as a baseline "here's a fully working game engine, along with an actual game" reference that you can use for whatever you want. It's small enough that you can understand it, build it yourself, and customize.

My long term goal is to implement a custom game system reminiscent of the StarCraft 1 "Use Map Settings" era. There was [something magical about it](https://www.youtube.com/watch?v=hu_ekZfW6wE&t=76s&ab_channel=RedDevouringOne) that modern "custom game" attempts don't really capture. If you remember it, you know what I mean -- point to any modern equivalent that makes you feel the same spark of joy of joining a random lobby and discovering that it's actually a weirdly-detailed esoteric RPG that some 14yo crafted in StarEdit, or an intense tower defense experience that you didn't expect.

image

It also makes my heart ache that your only realistic choices for becoming a professional gamedev circa 2023 is to build everything from scratch yourself (Celeste) or to spend years learning Unreal Engine or Unity. Good luck understanding the inner workings of those behemoths, much less getting UE to build.

So hopefully this will give you a leg up as a lone wolf gamedev.

image

Ultimately, I expect this to take somewhere between three months and three years, and for roughly seven people to care about it. But if you're one of those seven, know that you'll have all my heart and soul pushing you forward, for whatever it's worth. I fell in love with the K2 engine when I worked at S2 in 2010. Perhaps one or two others might too.

## Media

### Newerth dev stream #1

https://youtu.be/VBj0RcpxCIc?t=132

I wanted to give hackers a sense of how it feels to work with the engine, so I recorded about an hour of random work.

Be sure to read the chapter titles as you watch; it's a detailed blow-by-blow of my thought process as I went.

### "I was a former HoN dev. AMA"

https://www.reddit.com/r/DotA2/comments/asc14j/i_was_a_former_hon_dev_ama/

This was an AMA I did when S2 officially shuttered Hon after Valve steamrolled them. The timestamp says four years ago, but it feels like a decade.

I originally joined S2 because I loved the game, and a certain bug was so frustrating that I simply had to annihilate it. Joining the company was the only way I could, so I did.

## License

All code and assets are MIT licensed, to the extent that I'm authorized to do so. Which is to say, not at all. But nobody cares at this point.

## Compiling NoH

### Building NoH on macOS

##### Install macOS dependencies

Install [Homebrew](https://brew.sh/):
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

Install the dependencies:

```
brew install cmake llvm ninja speex speexdsp giflib libpng libjpeg [email protected] freetype fswatch fileicon
```

##### Clone the repository (`--recursive` is important!)

```
git clone --recursive https://github.com/shawwn/noh
```

##### Build on macOS with CMake

```
cd noh
mkdir build
cd build
cmake ..
cmake --build . -j12
```

Things you can do:

- Run `./K2\ Model\ Viewer` and play with some effects
- Run `./NoH` and click "Local Game" to start a game
- Run `./NoH\ Editor`

### Building NoH on macOS with [CLion](https://www.jetbrains.com/clion/download/#section=mac)

##### Open the repo in [CLion](https://www.jetbrains.com/clion/download/#section=mac):
```
cd noh
clion .
```
##### Once CLion is open

- Open Project view (press `Cmd-1`)

- Open `CMakeLists.txt`

- Click "Load CMake project" in the upper right

image

Ignore the scary-looking errors and just click the play button (`Run -> Run 'NoH'`)

image

If things go well, NoH will launch. Congratulations!

image

#### If things go wrong

Open CMake tab, click "Reset Cache and Reload Project" (the icon in the upper left of the tab with two arrows)

image

Build -> Rebuild all in Release

image

Run -> Run NoH, or just click the play button

If things still aren't working, [post an issue](https://github.com/shawwn/noh/issues) or DM me on Twitter: [@theshawwn](https://twitter.com/theshawwn)

### Building NoH on Ubuntu

Clone the repo:
```
git clone --recursive https://github.com/shawwn/noh && cd noh
```

Install dependencies:
```
sudo apt update

# Compiler deps
sudo apt install -y build-essential libtool autoconf

# Build deps
sudo apt install -y cmake ninja-build

# K2 engine deps
sudo apt install -y libspeex-dev libspeexdsp-dev libssl-dev libgif-dev libpng-dev libcurl4-openssl-dev libjpeg-dev libxml2-dev libfreetype-dev libncurses-dev libxrandr-dev
```

#### Build without graphics

(Useful for servers)

```
cmake -DK2_NOVID=1 -S . -B build -G Ninja && cmake --build build
```

Now you can run `./NoH -dedicated` to start a server

#### Build with graphics

Install graphics dependencies:
```
sudo apt install -y libgl-dev libglu1-mesa-dev libxrandr-dev xorg-dev
```

```
cmake -S . -B build -G Ninja && cmake --build build
```

Now you can run `./NoH` or `./NoH\ Editor` or `./K2\ Model\ Viewer`

### Building NoH on Windows

##### Install Git for Windows

Install [Git for Windows](https://gitforwindows.org/)

During setup, you can leave everything as default, **except make sure you check "Enable symbolic links"**:

image

##### Install CMake for Windows

[Download CMake](https://cmake.org/download/) (probably choose "Windows x64 Installer")

image

During setup, click "Add CMake to the system PATH for the current user":

image

##### Install Visual Studio

If you have Visual Studio 2019 or later instsalled, you can skip this step.

Install [Visual Studio 2022 Community](https://visualstudio.microsoft.com/downloads/):

image

During setup, choose "Desktop development with C++":

image

(If you want to save around 6GB, you can you can uncheck ".NET desktop development")

Check "Install", then wait awhile.

Eventually you'll see this:

image

##### Install CLion

Install CLion: [https://www.jetbrains.com/clion/download/](https://www.jetbrains.com/clion/download/)

##### Build with CLion

Open CLion and clone the repo:

image

Click "Trust Project"

image

Configure Microsoft Defender:

image

Go to File -> Settings, then "Build, Execution, Deployment" and click "Toolchains". Verify that your settings look similar to this:

image

Open the Project tool window (Press `Alt-1`):

image

Open CMakeLists.txt, then click "Load CMake project" in the upper right:

![image](https://github.com/shawwn/noh/assets/59632/eb0f2eda-3d61-4b32-b529-b1a9ea073d52)

You'll see some errors:

image

Click the Vcpkg tab:

image

Click the plus sign ("Add vcpkg")

image

Verify that "Add vcpkg integration to existing CMake profiles" is selected, then click ok:

image

Vcpkg will now start building the required dependencies:

image

You can click the "CMake" tab to watch its progress:

image

image

Wait awhile (~40 minutes, sorry; luckily you only need to do this once, ever).

Eventually "Loading CMake project..." in the status bar will disappear.

image

Click the run button.

image

The engine will start building:

image

With any luck, it'll launch. You're done!

To get into a game, change the configuration to NoH, then click the run button again. Once NoH starts, click "Local Game" -> Create Game, join a lobby
slot, start game, then choose a hero.