Looking to get into development? Have a soft spot for old console based RPG games? Why not build Umoria! A Rouge clone created in a day of limited graphics - but nevertheless a very addicting game for the time. I would say one of the more memorable games that got me interested in coding (game was so hard I wanted to reverse engineer the save format).
Setting up for Windows development
Visual Studio IDE or Visual Studio Build tools (compiler/linker/libs/etc). Which ever option you go for, will need to enable C++ workflow - basic x86/64 tools/libs/command tools. CMake will be installed with either installer as long as you enabled C++. If you forget to check those options, you can go to Add/Remove programs and modify your choices. For this, w3e will be using the command prompt, so again, either product will work.
GIT: If you chose Visual Studio, you have the option of including GIT tools when you install that. In either case, you can get the latest GIT Bash for windows from here. When installing, you should use mostly all the defaults. Though, unless you are familiar with vim text editor, you should select a different editor when prompted. If wanting Notepad++ (a good choice) - Will need to install that first.
Most importantly, some Coffee or Soda and a little bit of time - more if you are a complete stranger to development.
1. From the Windows start menu, you will want to find and run "Developer Command Prompt for VS 2019". This will bring you to a console window with the C++ dev tools available.
You'll need a good place to put your code & build. For this example, we will use your documents folder. Follow along with these commands to checkout and build...
cd %HOMEPATH%\Documents
mkdir umoria
cd umoria
git clone https://github.com/pjcast/umoria.git
Now, umoria uses curses to interact with the terminal... we need to get a windows version. Either download and extract this pdcurses zip file to umoria\PDCurses-3.8 or if on Windows 10, you can run:
curl -L https://downloads.sourceforge.net/project/pdcurses/pdcurses/3.8/PDCurses-3.8.zip --output pdcurses.zip
tar -xf pdcurses.zip
After you have the sources for pdcurses you'll need to build the support library:
cd PDCurses-3.8\wincon
nmake -f Makefile.vc
Configure and build umoria
cd ..\..\umoria
set CURSES_LIBRARY=%HOMEPATH%\Documents\umoria\PDCurses-3.8\wincon\pdcurses.lib
set CURSES_INCLUDE_PATH=%HOMEPATH%\Documents\umoria\PDCurses-3.8
mkdir out
cd out
cmake -DCURSES_LIBRARY="%CURSES_LIBRARY%" -DCURSES_INCLUDE_PATH="%CURSES_INCLUDE_PATH%" -G "Visual Studio 16 2019" -A Win32 ..\
cmake --build .
Hopefully you had no errors along the way. In which case, you are ready to copy the exe to where the data files live, and start the app.
copy umoria\Debug\umoria.exe umoria\
explorer umoria\
Once Windows Explorer opens, double click umoria.exe - You could have ran it in the terminal, but Windows terminals and pdcurses do not resize very well - at least, not umoria with pdcurses. So better to start it outside command prompt.
Setting up for Linux development - Easy!
Linux development is super easy nowadays. In this article, will be using Ubuntu, but any modern distro will do.
Getting tools, getting umoria, building and running in a few lines... open a terminal and run the following commands:
sudo apt-get install build-essential git cmake libncurses5-dev
git clone https://github.com/pjcast/umoria.git
cd umoria
mkdir out && cd out
cmake ../
make
Done! Just execute the binary and enjoy:
cd umoria
./umoria
Creating the "out" directory (on both Windows and Linux) keeps CMake generated content outside the build tree - and doesn't pollute your code/repository. And if you mess up, you can simply delete the out directory and start over.
Basic Game Guide