Giter Club home page Giter Club logo

war1's Introduction

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

Windows

  1. Download and install MinGW (or MinGW-w64 for 64 bits builds).
  2. Get the DATA.WAR file and place it in the assets folder.
  3. Run build-gcc-win32.bat (or build-gcc-win64.bat for 64 bits builds).

Raspberry PI

  1. Install gcc (usually comes with the build-essential package).
  2. Install libx11-dev package.
  3. Run build-gcc-linux.sh.

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.

Libraries used

  • GLFW: An Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop. It provides a simple API for creating windows, contexts and surfaces, receiving input and events.
  • nanovg: NanoVG is small antialiased vector graphics rendering library for OpenGL. It has lean API modeled after HTML5 canvas API. It is aimed to be a practical and fun toolset for building scalable user interfaces and visualizations.
  • Miniaudio Audio playback and capture library.
  • 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

war1's People

Contributors

acoto87 avatar kurikai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

war1's Issues

error: too many arguments to function ‘getDirFromMousePos’

/build-gcc-linux64.sh
In file included from ../../src/war1.c:139:
../../src/war_map.c: In function ‘updateMapCursor’:
../../src/war_map.c:1903:24: error: too many arguments to function ‘getDirFromMousePos’
1903 | vec2 dir = getDirFromMousePos(context, input);
| ^~~~~~~~~~~~~~~~~~
In file included from ../../src/war1.c:81:
../../src/war.h:87:6: note: declared here
87 | vec2 getDirFromMousePos(WarContext* context)
| ^~~~~~~~~~~~~~~~~~
In file included from ../../src/war1.c:147:
../../src/war_ai.c: In function ‘createAI’:
../../src/war_ai.c:6:26: warning: passing argument 1 of ‘WarAICommandListInit’ from incompatible pointer type [-Wincompatible-pointer-types]
6 | WarAICommandListInit(&ai->currentCommands, WarAICommandListDefaultOptions);
| ^~~~~~~~~~~~~~~~~~~~
| |
| WarAICommandQueue * {aka struct *}
In file included from ../../src/war1.c:64:
../../deps/include/shl/list.h:114:37: note: expected ‘WarAICommandList *’ {aka ‘struct *’} but argument is of type ‘WarAICommandQueue ’ {aka ‘struct ’}
114 | void typeName ## Init(typeName
list, typeName ## Options options)
../../src/war_types.h:1977:1: note: in expansion of macro ‘shlDefineList’
1977 | shlDefineList(WarAICommandList, WarAICommand
)
| ^~~~~~~~~~~~~
In file included from ../../src/war1.c:147:
../../src/war_ai.c:7:27: warning: passing argument 1 of ‘WarAICommandQueueInit’ from incompatible pointer type [-Wincompatible-pointer-types]
7 | WarAICommandQueueInit(&ai->nextCommands, WarAICommandQueueDefaultOptions);
| ^~~~~~~~~~~~~~~~~
| |
| WarAICommandList * {aka struct *}
In file included from ../../src/war1.c:65:
../../deps/include/shl/queue.h:87:37: note: expected ‘WarAICommandQueue *’ {aka ‘struct *’} but argument is of type ‘WarAICommandList *’ {aka ‘struct *’}
87 | void typeName ## Init(typeName queue, typeName ## Options options)
../../src/war_types.h:1974:1: note: in expansion of macro ‘shlDefineQueue’
1974 | shlDefineQueue(WarAICommandQueue, WarAICommand
)
| ^~~~~~~~~~~~~~
In file included from ../../src/war1.c:147:
../../src/war_ai.c: In function ‘createAICommand’:
../../src/war_ai.c:22:5: warning: implicit declaration of function ‘WarAIRequestQueuePush’; did you mean ‘WarAICommandQueuePush’? [-Wimplicit-function-declaration]
22 | WarAIRequestQueuePush(&ai->nextCommands, command);
| ^~~~~~~~~~~~~~~~~~~~~
| WarAICommandQueuePush
../../src/war_ai.c: In function ‘processAICurrentCommands’:
../../src/war_ai.c:209:34: warning: initialization of ‘WarAICommandList *’ {aka ‘struct *’} from incompatible pointer type ‘WarAICommandQueue *’ {aka ‘struct ’} [-Wincompatible-pointer-types]
209 | WarAICommandList
commands = &ai->currentCommands;
| ^
../../src/war_ai.c: In function ‘processAINextCommands’:
../../src/war_ai.c:229:41: warning: initialization of ‘WarAICommandList *’ {aka ‘struct *’} from incompatible pointer type ‘WarAICommandQueue *’ {aka ‘struct ’} [-Wincompatible-pointer-types]
229 | WarAICommandList
currentCommands = &ai->currentCommands;
| ^
../../src/war_ai.c:230:39: warning: initialization of ‘WarAICommandQueue *’ {aka ‘struct *’} from incompatible pointer type ‘WarAICommandList *’ {aka ‘struct ’} [-Wincompatible-pointer-types]
230 | WarAICommandQueue
nextCommands = &ai->nextCommands;
| ^
../../src/war_ai.c:227:10: warning: unused variable ‘processNext’ [-Wunused-variable]
227 | bool processNext = true;
| ^~~~~~~~~~~

warning: ‘ GOLD & LUMBER’ directive writing 14 bytes into a region of size between 0 and 4

after pulling your changes into my branch, then doing a pull to my computer to compile for linux I'm getting the below error(unfortunately, I'm not a programmer so I'm not sure how to fix it)

From https://github.com/KuriKai/war1
1113819..0a15262 master -> origin/master
Updating 1113819..0a15262

In file included from ../../src/war1.c:137:
../../src/war_map.c: In function ‘updateStatus’:
../../src/war_map.c:1599:75: warning: ‘ GOLD & LUMBER’ directive writing 14 bytes into a region of size between 0 and 4 [-Wformat-overflow=]
1599 | sprintf(statusText, "FULL REPAIRS WILL COST %d GOLD & LUMBER", repairCost);
| ~~~~^~~~~~~~~~

../../src/war_map.c:1599:25: note: ‘sprintf’ output between 39 and 49 bytes into a destination of size 28
1599 | sprintf(statusText, "FULL REPAIRS WILL COST %d GOLD & LUMBER", repairCost);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Generating ctags - Start
Generating ctags - Done

License?

I noticed that a license text in a file / README / source code is missing. Can you also clarify that?

Status?

Hi,

I'm following this neat re-implementation engine. The screenshots look great so far, but it is a little unclear from the README what elements from gameplay are implemented (there is a TODO list, but it is hard to follow, if you are not working in the code). Can you add a few lines in the README on what to expect if you want to test this engine?

Thanks!

Feature request: original and enhanced

Is it possible to have two options for the gameplay style for war1?
One being as close to the orignal gameplay as possible. e.g. max four units at a time, shift/ctrl click/drag to multi select
One being enhanced options, e.g. up to 9 units selected at a time, just drag over units to select

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.