Giter Club home page Giter Club logo

freeaoe's Introduction

freeaoe

screenshot

freeaoe is a project to write a free engine capable of running Age of Empires 2 (and other Genie games like SW:GB eventually).

The project is still in early development. But you can load and play scenarios, show the history screen, move around, attack, build and stuff. There are some screenshots in the doc/ folder.

It (obviously) needs the original data files, but it works with the data files from the trial version (e. g. from Archive.org).

Star Wars™: Galactic Battlegrounds WIP

swgb screenshot

Windows

Automated Windows builds can be downloaded from AppVeyor.

There is no installation, it's just a zip file with a standalone .exe that you run.

NB: If Appveyor says there's no artifact available it's probably because it's building the latest version, just give it a few moments (or click around in AppVeyor to find the older versions).

Caveat emptor; I don't have any Windows installation to test with, but it works fine in Wine.

Running

If you have AoE2 installed it should automatically detect where it is installed and load the data files automatically (looking up in the Windows registry). If that doesn't work for some reason it will pop up a dialog where you can point it to the files manually.

If you don't have it installed there's a nice button in that dialog which opens an URL where you can download the trial version of AoC. It doesn't have the higher resolution graphics e. g. for the UI, though, so I highly recommend getting an original CD with the full version.

On Linux it parses the Wine registry file to try to find the installation, otherwise you get the same dialog (but with a handy button to go directly to the .wine folder). Be aware that it respects WINEPREFIX, so make sure that is set correctly if you use it.

Dependencies

  • SFML
  • Modern C++ compiler

To build

  • Clone with --recurse-submodules (e. g. git clone --recurse-submodules https://github.com/sandsmark/freeaoe.git)
  • mkdir build && cd build
  • cmake .. && make
  • ./freeaoe

I can't get it to build on macOS (and I don't have any Apple machines), so if you manage to get it to build please open a PR. It seems like Apple ships a really outdated version of Clang that doesn't support modern C++.

Legal

Preface: I am not a lawyer (nor a native english speaker), this is just based on my interpretation of local laws to show that everything is done in good faith. If you believe I am infringing on any of your rights please open an issue and I will seek to rectify it as soon as possible.

I am in no way affiliated with Microsoft, Linus Torvalds nor anyone else who own any trademarks that may appear here. Any display of trademarks here is purely to indicate the purpose of this project and in accordance with good business practice, as permitted by relevant laws.

There are no copyrighted works distributed here, nor works derived from copyrighted works, except works with a free and open source license permitting distribution.

In no part of the creation of this is reverse engineering involved. All insight used is based on publicly available knowledge and playing of the game.

My right to gather insight into the functioning and principles of individiual parts of a copyrighted computer program by means of execution, observation, investigation and testing is protected by norwegian law.

Although I also have some rights to reverse engineer works I have the right to use it's more fun to figure out how to do something myself. In addition I'm not familiar enough with the laws governing reverse engineering that Github is subject to, and I don't want to be nuked from Github.

In general I work on this this because it's fun to create a strategy game, I already paid for and own a license to the games. I do not receive nor do I intend to receive any form of compensation for this. I have no incentive or intention to do anything that would infringe on anyones copyright, trademarks or other rights.

Misc

This is mostly a single-person pet project, so if you want a more serious project, try openage.

It uses the same library as AGE (Advanced Genie Editor), so it should be able to handle anything that can be edited by that (and therefore basically all community content created for AoE2). Because of this it doesn't need to unpack or convert anything, all data files are used as is.

This repo is originally a fork of https://github.com/apreiml/freeaoe, but because a lot of stuff doesn't like working on forked repos it is now created as a separate repo.

TODO (this is probably going to get outdated)

  • Proper victory screen.
  • Unit grouping/formations.
  • Patrolling.
  • Campaign cinematics (mainly just parse the .mm files).
  • Random map RMS script parsing and generating.
  • Performance (especially the path finding).
  • Various refactoring (move VisibilityMap out into separate file, rendering of units out from UnitManager, etc.)
  • Fix edges of walls when dragging.
  • Rest of AI script actions and conditions:
    • town-under-attack
    • cc-players-unit-type-count (AI cheat)
    • game-time
    • timer-triggered
    • difficulty
    • dropsite-min-distance
    • resource-found
    • players-stance
  • Angle of arrows
  • Arrows stuck in the ground
  • Upscale shaders (WIP in the martin/lolshaders branch)
  • Video support, intro videos etc. (WIP in the martin/video branch)

Wishlist/low priority:

  • Proper support for new terrain graphics (Rise of the Rajas stopped shipping the old ones).
  • Map analysis stuff (for RMS and AI).

Done

Not exhaustive list, mostly in addition to "normal" RTS things, or things not available in other re-implementations.

Compared to other reimplementations as much as possible is fetched from the data files as well, and I try to avoid hardcoding anything, though some is hardcoded in the original game.

  • HD Support.
  • Scenarios:
    • Loading and parsing old and new scenario files (.scn and .scx)
    • Loading and parsing old and new campaign files (.cpn and .cpx)
    • All scenario trigger conditions and effects necessary to play the William Wallace tutorial scenario.
  • Villagers:
    • Automatic switching between builders, lumberjacks, etc.
    • Carrying resource tracking.
  • Units:
    • Dying animations.
    • Creating corpses on death.
    • Decaying corpses.
    • Visibility tracking.
    • Default actions on right click.
    • Garrisoning.
    • Ungarrisoning.
  • Buildings:
    • Construction of buildings.
    • Training units.
    • Dragging wall construction.
  • Actions types:
    • Melee attacks.
    • Ranged attacks.
    • Building (buildings).
    • Moving (on land and arrows/missiles).
    • Gathering, with automatic dropoff.
    • Construction.
    • Flying (birds).
  • Technology:
    • Research.
    • Automatic research of implicit technologies.
    • Unique technologies.
    • Ages with list of techs.
  • Actions:
    • Automatic actions (attacking nearby etc.)
    • Fetching actions for the action panel at the bottom from data files.
    • Queueing.
  • Terrain rendering:
    • Slopes/hills.
    • Blending terrain between tiles.
    • Fog of war.
  • Unit rendering:
    • Animations.
    • Angles.
    • Unit outline when behind buildings (needs improvement).
    • Health bar.
    • Selection outline.
    • Player colors.
    • Construction available/unavailable graphics.
    • Shadows.
    • Fog of war shading.
    • Dopplegangers (i. e. persist last seen buildings. etc in fog of war).
  • Sound:
    • Sound on selection.
    • Sound when attacking.
    • Sound when dying.
    • Sound when training units.
    • Positional.
    • Streaming sound (scenario voices, music, etc.).
    • MIDI support, for music in the trial versions.
  • Civilizations:
    • Starting resources.
    • Different UI interface graphics.
    • Names.
  • Players:
    • Civs.
    • Colors.
    • Ages.
    • Techs.
    • Alliances.
    • Per player visibility.
  • Game assets:
    • Graphics.
    • Palettes.
    • Sounds.
    • Campaign files.
    • Scenario files.
    • Terrain blending files.
    • Terrain hill shape/lightning files.
    • UI interface files.
    • Fog of war graphics.
    • AI script parsing.
    • Support for loading basically everything.
    • Use only original files, don't convert.
  • Game data files:
    • Graphic info.
    • Sound info (randomness of sounds etc.)
    • Unit tasks.
    • Player colors.
    • Techs.
    • Terrain info.
    • Maps.
    • Civilizations.
    • UI info files (button colors etc.)
    • Random map files (not .rms).
    • Automatic location of game files if installed (Windows and Linux).
  • UI interface:
    • Unit info panel.
    • Unit actions panel.
    • Resource info labels.
    • In game buttons/menu.
    • Home screen.
    • History screen.
    • Dialog when starting to find game data.
  • Minimap:
    • Terrain colors.
    • Unit colors.
    • Unit outline types (rectangles vs. diamonds etc.)
    • Unit outline sizes.
    • Fog of war.
    • Camera moving.
  • AI scripts (partial)
    • Can fully parse scripts, with all tokens recognised.
    • Most conditions implemented.
    • Most actions implemented.

freeaoe's People

Contributors

arialwhite avatar bigbossbro08 avatar danielhousar avatar sandsmark 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  avatar  avatar  avatar  avatar

freeaoe's Issues

CMake does not find SFML

My system passed cmake's checks, but it did not compile so I had to get the latest versions of cmake, gcc, g++. Then even though I had installed SFML (sudo apt install libsfml-dev) I got this error message:

CMake Error at CMakeLists.txt:121 (find_package):
By not providing "FindSFML.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "SFML", but
CMake did not find one.

So I had to download the latest version of SFML (https://www.sfml-dev.org/download/sfml/2.5.1/) and add this to CMakeLists.txt to make it work:

set(SFML_INCLUDE_DIR "~/sfml/include")
set(SFML_LIBRARY_DIR "~/sfml/lib")
set(SFML_DIR "~/sfml/lib/cmake/SFML")
link_directories(SFML_LIBRARY_DIR)
include_directories(SFML_INCLUDE_DIR)

Why didn't it find SFML automatically on the standard installation directories?

String too big, trailing characters truncated

I have this issue when building the project:

Severity	Code	Description	Project	File	Line	Suppression State
Error	C2026	string too big, trailing characters truncated	freeaoe_common	F:\Programs\freeaoe\build\grammar.gen.tab.hpp	3285	

Anyone know how to solve this?

macOS 12.2.1 build fail

HELLO.

I try to build it on macOS 12.2.1 apple silicon and got error. I have installed c++ compiller and sfml.

[ 20%] Linking CXX executable resgen
ld: library not found for -lstdc++fs
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/tools/resgen/resgen] Error 1
make[1]: *** [src/tools/resgen/CMakeFiles/resgen.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....

Any idea how to fix this issue ? Thank you so much.

macos support

apple doesn't ship a modern c++ compiler with proper c++17 support so genieutils won't build, and I assume they don't support c++20 so freeaoe won't build.

once apple enters the modern era of 2017 I can set up github actions to publish prebuilt macos binaries.

How do I get it to accept my aoe2 installation? :D

Now I might be stupid, but even though I'm running it in my aoe2 folder, it won't accept it as a valid installation, and complains about no Data Path being set ...

←[01;33mFailed to get key InstallationDirectory from SOFTWARE\Microsoft\Microsoft Games\Age of Empires II: The Conquerors Expansion\1.0 ←[0m←[2;37m(getRegistryString C:\projects\freeaoe\src\global\Config.cpp:69)←[0m ←[01;33mFailed to resolve game path '' ←[0m←[2;37m(Config::setValue C:\projects\freeaoe\src\global\Config.cpp:363)←[0m ←[01;33mFailed to resolve game path 'G:\Program Files\age2\Voobly' ←[0m←[2;37m(Config::setValue C:\projects\freeaoe\src\global\Config.cpp:363)←[0m ←[01;33mfailed to load: No data path set No error ←[0m←[2;37m(main C:\projects\freeaoe\src\main.cpp:216)←[0m

This is the log output ... which tries to pull something out of my voobly aoe2 dir? Which still doesn't work, even if I put the exe in there.

Any ideas?

Make appveyor build both release and debug

I tried to compile the project with Visual Studio. It seems Visual Studio is failing to compile such big line. Tried to small string by different lines but no real luck.

Log output:
grammar.gen.tab.hpp(2833): error C2026: string too big, trailing characters truncated [F:\freeaoe\build\freeaoe_common.vcxproj

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.