Free Heroes of Might and Magic II (fheroes2) is a recreation of HoMM2 game engine.

Overview

fheroes2

Free Heroes of Might and Magic II (fheroes2) is a recreation of HoMM2 game engine.

This open source multiplatform project, written from scratch, is designed to reproduce the original game with significant improvements in the gameplay, graphics and logic (including support for high-resolution graphics, improved AI, numerous fixes and UI improvements), breathing new life into one of the most addictive turn-based strategies.

Download and install

To download and install fheroes2 please follow the installation guide.

Github Downloads

Copyright

All rights for the original game and its resources belong to former The 3DO Company. These rights were transferred to Ubisoft. We do not encourage and do not support any form of illegal usage of the original game. We strongly advise to purchase the original game on GOG or Ubisoft Store platforms. Alternatively, you can download a free demo version of the game. Please refer to the installation guide for more information.

License

This project is licensed under the GNU General Public License v2.0.

Initially, the project was developed on sourceforge.

Contribution and Development

This repository is the place for everyone. If you want to contribute, please read more here.

To build the project from source please follow this guide.

Build status Build Status Bugs Code Smells Duplicated Lines (%) Total alerts

Donation

We accept donations via Patreon or PayPal. All donations will be used only for the future project development as we do not consider this project as a source of income by any means.

Donate Donate

Contacts

Follow us on social networks: Facebook or VK. We also have a Discord channel to discuss the development of the project.

Discord Facebook VK

FAQ

You can find answers to the most common questions on our F.A.Q. page.

Issues
  • German translation

    German translation

    Here's a German translation I wish to contribute, and I'd like to ask everyone to invite German-speaking reviewers they might know. My German is pretty basic, so I just machine-translated most of the phrases, trying to fix them the best I could, especially regarding game terminology and the use of pronouns.

    As with French, I tried to stick to GoG version terminology for:

    • world map locations
    • artifacts
    • monsters
    • spells
    • resources

    German has the same "polite you" feature as French, so:

    • the game addresses the player with polite "you"
    • the player's subjects in the game use polite "you"
    • the enemies and unfriendly event characters use regular "you"

    Now, I suppose my work is filled with all kinds of mistakes. I'd like to ask reviewers to concentrate on recurring issues in the first place, such as:

    • wrong verb tense being used in certain phrase types
    • wrong choice of recurring words, such as creature/monster/unit, view/show, allow/enable, etc

    I'm not trying to sneak poor work in, I just want to say that fixing every single typo in this PR is going to take a very long time, so it would be more efficient to accept a translation with a bunch of mistakes, and then make additional PRs fixing them: that would allow several people to work in parallel, without the need to merge 3000+ lines.

    improvement translation 
    opened by dimag0g 56
  • Extra sounds while playing MIDI music on Xubuntu 20.04

    Extra sounds while playing MIDI music on Xubuntu 20.04

    Your question

    When I start the game, I hear two tunes, one on top of the other - the usual background midi music and some awful pipes on top. Is it possible to turn off these nightmarish pipes? Thank you.

    Additional info

    No response

    bug Linux audio awaiting feedback 
    opened by lua-rocks 52
  • Refine battle pathfinding using a recursive greedy depth-limited approach

    Refine battle pathfinding using a recursive greedy depth-limited approach

    Hi all,

    I don't know if it's really worth it (considering the new (Dijkstra's based?) pathfinding engine from battle_pathfinding.cpp), but here is my proposal of greedy (in the sense of making the locally optimal choice at each stage) recursive pathfinding algorithm as a possible temporary replacement for old GetAStarPath(). This algorithm may be suboptimal in some situations, but it is simple and (at first sight) it shows much better results than old (in my opinion, weird or incorrectly implemented A* based) pathfinding algorithm, especially in the case of wide units.

    Anyway, there is definitely one useful commit in this PR that fixes Board::GetDistance() function. Previous implementation gave incorrect results in a number of cases.

    fix #2951

    improvement logic 
    opened by oleg-derevenetz 51
  • Extended spell/monster info

    Extended spell/monster info

    I don't know if it's by design, but comparing to HoMM 3 there's no extended unit info in troop info dialog. For example, Mummies curse, Liches do attack with death cloud, Griffons always retaliate and so on. For example, this function: https://github.com/ihhub/fheroes2/blob/master/src/fheroes2/dialog/dialog_armyinfo.cpp#L255 can be extended to output all such info and it can made as configurable option (I can make a PR). The real question in this case is, what is the single source of truth for monsters data? XML files seem pretty outdated.

    Same goes for spells – there's no information of damage inflicted, which makes it pretty hard to use...

    improvement question ui 
    opened by lyssdod 50
  • Cursor management cleanup

    Cursor management cleanup

    Cleanup cursor management (mostly, there are still some places that count on the cursor visibility as a redraw indicator). As a continuation of #3402.

    improvement ui 
    opened by oleg-derevenetz 49
  • Luck/Morale effects happen randomly in battle on each re-load.

    Luck/Morale effects happen randomly in battle on each re-load.

    Preliminary checks

    Platform

    Windows

    Describe the bug

    Steps:

    1. Start a battle by hero with some luck/morale bonus (save the game before battle).
    2. Make some moves to make luck/morale effect happened. For example, hero's gargoyles received additional move cause of morale bonus. Then, next hero's unit - centaurs - did not receive it.
    3. Quit battle, load saved game.

    Result:

    • In original Heroes 2 this sequence of events will happen on every re-load (gargoyles received morale effect, centaurs not). Game could be re-loaded million times - you will receive exactly the same sequence (if your moves were the same too).
    • On fheroes2 sequence is random. For example, on first re-load gargoyles will receive morale effect, on second re-load - centaurs will, on third - nobody (or both), etc..

    It is very important to support original behavior.

    Save file

    Experienced this issue in almost every battle.

    Additional info

    fheroes 0.9.6, Win10, GOG dosbox

    improvement logic 
    opened by ivanychag 40
  • WorldPathfinder: implement

    WorldPathfinder: implement "last move" logic, fix wrong penalty calculation algorithm

    fix #1986 fix #2200 fix #2583 fix #4510

    Please note that, while this change applies to AI-controlled heroes too, sometimes AI uses the AIWorldPathfinder apart from the some specific hero (for some strategic planning I believe). In this case "last move" logic will not be used - due to natural reasons.

    bug logic 
    opened by oleg-derevenetz 38
  • Use XDG directories

    Use XDG directories

    Use $XDG_CONFIG_HOME/fheroes2on Linux (~/.config/fheroes2 by default) for fheroes2.bin, fheroes2.cfg. Use $XDG_DATA_HOME/fheroes2 on Linux (~/.local/share/fheroes2 by default) for data, files/save, maps. On other platforms use directory returned by GetHomeDirectory. Close #2860. Close #3118.

    improvement Linux 
    opened by qarkai 38
  • F4 fullscreen hotkey

    F4 fullscreen hotkey

    Related to #605

    Hi, @ihhub I removed extra code, that doubles animation resources in game_mainmenu.cpp, and remake animation to be care to file operations(in render cycle). I have a question, how to get signal about event occurred EVENT_SYSTEM_FULLSCREEN in game_mainmenu.cpp event loop, when event processed in Game::KeyboardGlobalFilter ? My attempts with HotKeyPressEvent are unsuccessful, I think the reason is that key is already released. I think this question mostly about OOP, not SDL.

    bug ui 
    opened by shprotru 35
  • MacOS ARM support

    MacOS ARM support

    Hey,

    Love H2 and very happy to see this project revived. Just wondering if I'll be able to test it on my M1 Mac any time soon? I can't see it mentioned anywhere, so I tried both the binary and compiling from source, but neither ran. Testing on my old intel based Mac, it worked perfectly, so I assume it's unsupported. I'd be happy to test out some betas or whatever.

    bug help wanted 
    opened by aslak01 34
  • AIWorldPathfinder: encourage the AI-controlled heroes to overcome water obstacles using boats

    AIWorldPathfinder: encourage the AI-controlled heroes to overcome water obstacles using boats

    close #4464

    Hi @ihhub here is the test map file: WTRTEST.ZIP. I didn't touch AI part however, but it seems that AI is trying to sail to neighboring islands and even to the island with my castle. I need your advice in regard to further AI-related changes.

    improvement logic AI high priority 
    opened by oleg-derevenetz 32
  • Improving AI castle defenses

    Improving AI castle defenses

    Marking threatening enemy armies and friendly castles under attack as priority targets. AI heroes now have incentives to go to the castle to defend it and switch into sleeper mode to stay there as long as threat persists.

    improvement AI 
    opened by idshibanov 0
  • AI should keep some creatures in reserve for castle defense

    AI should keep some creatures in reserve for castle defense

    Fixes #5304 .

    Now AI could leave some garrison (preferably slow units) behind when reinforcing the heroes if region is not completely safe.

    Fighter heroes should be less likely to leave troops in town than regular ones to avoid players intentionally exploiting the feature by splitting the army on castle recaptures (common OG flaw).

    improvement AI 
    opened by idshibanov 0
  • fheroes2 crashed after moving any hero to the castle

    fheroes2 crashed after moving any hero to the castle

    Preliminary checks

    Platform

    Windows

    Describe the bug

    Game crashed after moving any hero to the castle. Map name's - ARRAX.

    Save file

    AUTOSAVE.zip

    Additional info

    No response

    bug crash 
    opened by darkhorror1984 12
  • Playing music track from the beginning

    Playing music track from the beginning

    Preliminary checks

    Describe the problem requiring a solution

    After the latest implementation of new audio code all music themes started playing from the place they've stopped. I think in some rare cases we should force engine to start music theme from the beginning, as it looks quite weird, when we start new game, for instance, but music theme of terrain and even castle is played not from the beginning.

    Describe the possible solution

    I think we should implement some sort of timer to force engine to start music theme from the beginning in such cases like:

    • AI turn. When we skip our turn within a minute or so, it looks natural, when the composition continues from the place it stopped before. But when we play a long turn, fighting neutrals etc, starting AI turn composition from the beginning would make "end turn" event look more like a separate phase of gameplay.
    • Main Menu. Returning back to main menu after long time of gameplay often happens when player finishes some scenario or is ready to start new game or exit. In such cases I believe starting main menu theme from the beginning looks more relevant. But I think, music should be reset after a longer period of time, comparing to previous point.
    • Castle music. The same as the first point: in two different days and after a few minutes without entering into particular castle type it would be quite natural to reset theme. Castle theme should also start from the beginning after restarting scenario.
    • Terrain theme. At scenario restart it should also start from the beginning.

    Additional info

    No response

    improvement audio 
    opened by Branikolog 2
Releases(0.9.16)
Owner
Ihar Hubchyk
Computer vision researcher and developer
Ihar Hubchyk
Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World.

OpenXRay OpenXRay is an improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. S

null 2k Jun 29, 2022
CLUSEK-RT is a complex game engine written in C++ and the successor of the CLUSEK game engine

CLUSEK-RT is a complex game engine written in C++ and the successor of the CLUSEK game engine. This engine has been designed with a cross-platform design in mind. Thanks to Vulkan API it delivers a next-gen experience with ray tracing to both Linux and Windows platforms

Jakub Biliński 27 Jun 12, 2022
Ground Engine is an easy to use Game Engine for 3D Game Development written in C++

Ground Engine is an easy to use Game Engine Framework for 3D Game Development written in C++. It's currently under development and its creation will b

 PardCode 51 Jun 10, 2022
Free, open-source, game engine and a 3D sandbox.

Work-in-Progress The official "early alpha" release should be available around April 2021 SGEEngine SGEEngine is an open source (MIT License), C++ cen

ongamex 65 Jun 13, 2022
Free, cross-platform 2D game engine powered by Haxe and OpenFL

flixel | addons | ui | demos | tools | templates | docs | haxeflixel.com Links Here are the most important links to get you started with HaxeFlixel: G

HaxeFlixel 1.6k Jun 28, 2022
Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.

Amazon Lumberyard Amazon Lumberyard is a free, AAA game engine that gives you the tools you need to create high quality games. Deeply integrated with

Amazon Web Services 1.9k Jul 1, 2022
A powerful free cross-platform RTS game engine

Spring RTS game engine README Spring (formerly TASpring) is an Open Source Real Time Strategy game engine. Visit our project homepage for help, sugges

Spring RTS 2.6k Jun 25, 2022
SameBoy DX is a Qt-based interface of SameBoy, a free, highly accurate Game Boy and Game Boy Color emulator.

SameBoy DX SameBoy DX is a Qt-based interface of SameBoy, a free, highly accurate Game Boy and Game Boy Color emulator. Build requirements: CMake Pyth

Snowy 8 Jun 4, 2022
The Atomic Game Engine is a multi-platform 2D and 3D engine with a consistent API in C++, C#, JavaScript, and TypeScript

The Atomic Game Engine is a multi-platform 2D and 3D engine with a consistent API in C++, C#, JavaScript, and TypeScript

null 2.7k Jul 3, 2022
Godot Engine – Multi-platform 2D and 3D game engine

Godot Engine 2D and 3D cross-platform game engine Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unifie

Godot Engine 50.4k Jul 3, 2022
Flax Engine – multi-platform 3D game engine

Flax Engine – multi-platform 3D game engine

Flax Engine 3.4k Jul 1, 2022
MAZE (My AmaZing Engine) - 🎮 Personal open-source cross-platform game engine

MAZE (My AmaZing Engine) is the self-written open-source cross-platform game engine in the active development stage. At the moment it is my main pet project, developed for the purpose of learning and preserving different game dev technologies.

Dmitriy Nosov 11 Jan 9, 2022
Rogy-Engine- - My 3D game engine source code.

Rogy-Engine Development My 3D game engine. (NOT THE FINAL VERSION- Windows only) Features: PBR shading and reflection probes with parallax correction.

AlaX 92 Jun 18, 2022
Hyperion Engine is a 3D game engine written in C++

Hyperion Engine About Hyperion Engine is a 3D game engine written in C++. We aim to make Hyperion be easy to understand and use, while still enabling

null 130 Jun 28, 2022
Minetest is an open source voxel game engine with easy modding and game creation

Minetest is an open source voxel game engine with easy modding and game creation

Minetest 7.3k Jul 3, 2022
Stealthy way to hijack the existing game process handle within the game launcher (currently supports Steam and Battle.net). Achieve external game process read/write with minimum footprint.

Launcher Abuser Stealthy way to hijack the existing game process handle within the game launcher (currently supports Steam and Battle.net). Achieve ex

Ricardo Nacif 75 Jun 29, 2022
Game Boy, Game Boy Color, and Game Boy Advanced Emulator

SkyEmu SkyEmu is low level cycle accurate GameBoy, GameBoy Color and Game Boy Advance emulator that I have been developing in my spare time. Its prima

Sky 60 Jun 19, 2022
Niagara UI Renderer | Free Plugin for Unreal Engine 4

Niagara UI Renderer | Free Plugin for Unreal Engine 4 Niagara UI Plugin adds Niagara Particle System Widget that allows you to render Niagara particle

null 122 Jun 5, 2022
Free in the Dark, a Alone in the Dark engine reimplementation.

FITD Free in the Dark, a Alone in the Dark engine reimplementation. Long overdue source code update from the version that was released on source forge

null 34 Jan 3, 2022