ciplogic / fheroes2enh

Free Heroes 2 - Enhanced
Other
133 stars 19 forks source link
2d cpp14 engine heroes2

FHeroes 2 Enhanced

What is it?

Free Heroes 2 is an engine recreation of game Heroes 2 (of Might and Magic) with UI and coding enhancements.

Work is suspended

Some people notice that issues are untouched and sadly they will remain as such. As for now, I have lost the interest to strongly go into code and fix issues, for various reasons, including a heavier setup. Though I will not close it, as people can contribute simple fixes as PRs and if they kind of work on my machine, I will incorporate and make a new release.

Now I am trying to redo the game in Java (basically a port of C++ code, but with some easier to debug/contribute, and it will run eventually on a Mac!, 4K screens, it supports 2X and 4X scaling) using JavaFX.

If you are interested into contributing and make Free Heroes 2 "Great again" (sorry, I dislike some guy making things great again), and you like a modern up-to-date Java (meaning you can use "var" keyword, enhanced switch, etc), a full map loading is working with game that supports multiple scalings and a working game on Linux/Windows/Mac (it should work even on Mac/Big Sur). I didn't try it on R-Pi, but it should work on a R-Pi3 or alike with a modern OpenJDK install

https://github.com/ciplogic/TilePainter

Version 1.0 was launched!

Download (on Windows)

Last release

Releases are here:

https://github.com/ciplogic/fheroes2enh/releases/

You can also install it via Chocolatey:

choco install fheroes2enh --version 1.1.0

What do you mean by enhancements?

Features:

Screenshots:

Semi transparent popups

Updated Dialogs

If you want to see what is it about, and you have an Windows machine, why not try it?

The Releases page contains the latest version from here: https://github.com/ciplogic/fheroes2enh/releases

More details

Over time there will be mostly usability changes and improvements over modernizing the code. (i.e. C++ 11)

You can see a demo of how it runs and how it is enhanced here: (feel free to build it and make a more pleasing intro!) https://youtu.be/A8KwfSmW0G4

For now CMake is supported with Linux/Mac OS X only, but please help us to move the code to other platforms (MacOS, Windows and not only).

The editor will not be the target of this project.

How to start?

Identify your operating system and if is not Windows do the following:

Building on MacOS/Linux

Install:

Copy the content of Heroes 2 Demo or Heroes 2 (especially the folders as DATA or MAPS) into your source folder

Building the code:

At the end of building, you should find fheroes2 binary in the cmake-build-target folder. By default, the Release build uses LTO which can take some time on lower spec machines.

Building on Windows

Windows support will be always a secondary target from the point of the project but if you feel like supporting the Windows build, especially to integrate nicely with CMake, we will be able to make it work with you.

The long-story short is:

How to contribute

Things to do:

  1. Play the game and promote it if you like it!
  2. Fix things that are annoying to you. Don't go to a big item. To do:

    • make a simpler code to read settings (the code is really bad)

    • improve battle's AI with one item at a time: make for example that black dragons will try to attack most enemies units if are two in lines (the same is with Phoenixes)

    • improve AI one item at a time: AI should attack troops when it is very likely it cannot lose troops (let's say the life of the hero stacks is 5x bigger than the estimated target troop)

    • improve displaying of popups: provide "trivial/easy/medium/hard/very hard/impossible" ratings to enemy troops

    • improve the way a dialog is written

    • delete code that is not used

    • rewrite code hard to understand to an easier code

    Don't:

    • rewrite the AI fully, this is a 1 year task to be done well enough

    • rewrite dialogs to use an XML representation (or Json)

    • rewrite code to use Qt/Gtk/whatever framework you love best

    When you see big rewrites, don't do them: they are very risky