Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

305 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

War1

A remake of Warcraft: Orcs & Humans written in C.

This is a remake of the Warcraft: Orcs & Humans game created and published by Blizzard Entertainment in 1994. It pretends to be a complete implementation of the game using only the assets (*.WAR files) from the original game.

War1 is not an official Blizzard Entertainment product. It intent to be an enhancement of the original product with modern RTS features. You will need a copy of the original Warcraft: Orcs & Humans MS-DOS (or shareware) version be able to play War1. You can get it here Warcraft: Orcs and Humans. Warcraft and all graphics you see in the game are a registered trademark of Blizzard Entertainment.

Current features (this list is not complete):

  • Path finding and collisions detection
  • Unit movement with animations
  • Unit training
  • Building construction
  • Resources gathering by peasants and peons
  • Features specification for maps (this is specify if the player can train, build or research certain units, buildings or spells)
  • Win/lose condition checking
  • Fog of war
  • Basic behavior for enemies (it will attack your units if you get near enough, it will chase your units)
  • Spells
  • Typing commands for cheats and other stuff that could be activated by it in the engine

Still to develop (this list is not complete):

  • AI (I'm planning to do a basic one first and build from that more complex ones)
  • Cinematics (I've the code for reading FLIC files just need to integrate it into the engine)
  • Save/Load

You can check videos of gameplay and features as they are built here.

How to build

  1. Clone the repository git clone https://github.com/acoto87/war1
  2. Get the DATA.WAR file and place it in the assets folder.
  3. Bootstrap the nob build entry point with your C compiler of choice:

Bootstrap with GCC

gcc -std=c99 -Wall -Wextra -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -o nob nob.c

Bootstrap with Clang

clang -std=c99 -Wall -Wextra -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L -o nob nob.c

Bootstrap with MSVC

cl /nologo /std:c11 /W4 /D_CRT_SECURE_NO_WARNINGS /Fenob.exe nob.c
  1. Build the project with nob:

Linux 64-bit

./nob build --cc gcc --target linux64
./nob build --cc clang --target linux64

Windows

nob.exe build --cc gcc --target win32
nob.exe build --cc gcc --target win64

MSVC currently supports compile validation with --check:

nob.exe build --cc msvc --target win64 --check

Raspberry Pi

./nob build --cc gcc --target arm32

The legacy build-gcc-*.sh and build-gcc-*.bat scripts are still available, but nob.c is now the main build entry point.

How to run

Since I'm not able to distribute the DATA.WAR file, which contains the original assets, there is a little process to get the game working properly (this applies if you don't own a copy of the game that you can purchase here Warcraft: Orcs and Humans).

If you own an original copy of the game, or just bought the game on GOG, find the file DATA.WAR and just copy and paste it into the War 1 folder, and execute war1.exe.

Or just start the game and there is an option within the game to download the file.

If you don't own the original game and want to try it with the demo version, just download the demo version of DATA.WAR. Or just start the game and there is an option within the game to download the file.

If you want to check were that file comes from, it's from here: https://archive.org/details/WarcraftOrcsHumansDemo. If you click SEE ALL in the DOWNLOADS section you will see a WCRFT.ZIP (View Contents) entry, just click on View Contents and there is a line with the DATA.WAR file of the demo version.

Direct mission launch

Start a campaign mission immediately, skipping its briefing. The race is random when omitted:

nob.exe run -- --race human --mission 3
nob.exe run -- --mission 3

Start a predefined custom game:

nob.exe run -- --mission custom --map forest_1
nob.exe run -- --race human --enemy-race orc --mission custom --map forest_1 --gold 1000 --wood 1000 --seed 42

For predefined custom games, --race and --enemy-race accept human, orc, or random and both default to random. --gold and --wood set the same starting amount for both players. --seed makes the random races, starting configuration, and goldmine amounts reproducible.

Predefined map names are forest_1 through forest_7, swamp_1 through swamp_7, and dungeon_1 through dungeon_7. Each also has a _big_enemy variant, such as forest_1_big_enemy.

Without --mission custom, --map keeps its existing meaning and loads an external .w1m file:

nob.exe run -- --map maps/example.w1m

Libraries used

  • SDL3: A cross-platform development library designed to provide low-level access to audio, keyboard, mouse, joystick, and graphics hardware.
  • TinySoundFont SoundFont2 synthesizer.
  • shl: Single header libraries with commonly used data structures.
  • stb Single-file public domain libraries for C/C++

Here is my TODO list.

Other Warcraft 1 re-implementations:

  • War1gus: War1gus is a re-implementation of "Warcraft: Orcs & Humans" that allows you to play Warcraft with the Stratagus engine.
  • OpenWar: OpenWar is an alternative Warcraft: Orcs & Humans game engine.
  • Warcraft Remake: Warcraft Remake is a remake of the classic Blizzard game.
  • WinWar: WinWar is a multiplatform (Windows, WindowsStore, OSX, Linux, iOS) port of the original DOS WarCraft: Orcs & Humans PC Game.

Screenshots

Gifs Images

About

A remake of Warcraft: Orcs & Humans written in C

Topics

Resources

Stars

150 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages