An open source implementation of dota.
Cross platform; multiplayer; lobby system; map editor; replay system; semicolon. Builds in 3 minutes flat on an M1 Air.
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 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.
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.
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.
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.
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.
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.
Install Homebrew:
/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 openssl@1.1 freetype fswatch fileicon
--recursive
is important!)git clone --recursive https://github.com/shawwn/noh
cd noh
mkdir build
cd build
cmake ..
cmake --build . -j12
Things you can do:
./K2\ Model\ Viewer
and play with some effects./NoH
and click "Local Game" to start a game./NoH\ Editor
cd noh
clion .
Open Project view (press Cmd-1
)
Open CMakeLists.txt
Click "Load CMake project" in the upper right
Ignore the scary-looking errors and just click the play button (Run -> Run 'NoH'
)
If things go well, NoH will launch. Congratulations!
Open CMake tab, click "Reset Cache and Reload Project" (the icon in the upper left of the tab with two arrows)
Build -> Rebuild all in Release
Run -> Run NoH, or just click the play button
If things still aren't working, post an issue or DM me on Twitter: @theshawwn
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
(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
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
Install Git for Windows
During setup, you can leave everything as default, except make sure you check "Enable symbolic links":
Download CMake (probably choose "Windows x64 Installer")
During setup, click "Add CMake to the system PATH for the current user":
If you have Visual Studio 2019 or later instsalled, you can skip this step.
Install Visual Studio 2022 Community:
During setup, choose "Desktop development with C++":
(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:
Install CLion: https://www.jetbrains.com/clion/download/
Open CLion and clone the repo:
Click "Trust Project"
Configure Microsoft Defender:
Go to File -> Settings, then "Build, Execution, Deployment" and click "Toolchains". Verify that your settings look similar to this:
Open the Project tool window (Press Alt-1
):
Open CMakeLists.txt, then click "Load CMake project" in the upper right:
You'll see some errors:
Click the Vcpkg tab:
Click the plus sign ("Add vcpkg")
Verify that "Add vcpkg integration to existing CMake profiles" is selected, then click ok:
Vcpkg will now start building the required dependencies:
You can click the "CMake" tab to watch its progress:
Wait awhile (~40 minutes, sorry; luckily you only need to do this once, ever).
Eventually "Loading CMake project..." in the status bar will disappear.
Click the run button.
The engine will start building:
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.