MCPcopy Index your code
hub / github.com/angered-ghandi/OpenAOE

github.com/angered-ghandi/OpenAOE @v0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1 ↗ · + Follow
644 symbols 1,340 edges 127 files 34 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

OpenAOE Build Status

The OpenAOE project is an attempt to re-implement the original Age of Empires (1997) in an open-source manner so that:

  • The game may be ported to any desired platform.
  • Useful features from the sequel, such as build queuing, can be added to bring the original game closer to modern day RTS standards.
  • Enhancements, such as larger screen resolution support, can be made.

The OpenAOE project will strive to be as close to the original as possible.

For obvious reasons, you'll need an original Age of Empires CD to be able to play it. No game data files will be committed to the repository.

Note: This is a work in progress. As of 2016-07-08, there is no game to be played. Just a demonstration of the original game assets being loaded and other proof of concepts. It will be a while before it is playable.

WIP Screenshot

Work in Progress Screenshot

Building and Running

Overview

OS-specific instructions will follow. This section just gives a high level idea of what is required to build OpenAOE. You'll need the following:

  1. A Rust Compiler
  2. GCC (via MINGW if on Windows), or Microsoft Visual C++
  3. LibSDL2

Rust's Cargo program should download and compile all of the other necessary dependencies.

Building on Linux

  1. Install Rust. Documentation for manual install here.
  2. Install SDL2. If you're on Ubuntu, you can use this command: sudo apt-get install libsdl2-dev.
  3. Install GCC. For Ubuntu / Debian use the 'build-essential' package. For Arch linux use 'base-devel'
  4. Build the game with: cargo build --release

Building on Windows

  1. Install MinGW/MSYS2
  2. Install SDL2: pacman -S mingw-w64-x86_64-SDL2
  3. Export the library folder: echo "export LIBRARY_PATH=/usr/local/lib/:/lib/" >> /etc/profile"
  4. Install Rust:
  5. curl https://sh.rustup.rs -sSf | sh
  6. Use the GNU ABI (i686-pc-windows-gnu or x86_64-windows-pc-gnu)
  7. Build the game with: cargo build --release

Building on Mac OS

  1. Install Homebrew.
  2. Install Rust. brew install rust
  3. Install SDL2. brew install sdl2
  4. Build the game with: cargo build --release

Setting up the Game Data

Before you can run the game, you'll need to place the game's data in a place where the program can find it. On the game CD, there is a game directory with a language.dll, empires.exe, and a bunch of directories such as avi, campaign, and data. Either symlink that directory into the root of the project, or copy it over (it should keep the name "game"). Once the data is placed, you can run the game with:

$ cargo run --release

Alternatively, you can specify the location of the game data via command-line:

$ cargo run --release -- -d /media/AOE/game

Note that in these early versions, you may need to specify additional command line arguments, such as a path to a scenario file to load up. These may change over time, but the game should tell you what arguments are required and what to provide.

Contributing

OpenAOE is MIT licensed. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be as MIT, without any additional terms or conditions.

Pull requests, especially pertaining to accuracy/bug-fixes, are always more than welcome! If you're new to the project and want to write some code, checkout the issues list and look for anything tagged A-easy.

IRC

We have an IRC channel setup at #openaoe on Freenode. Most collaborative discussions take place there, so it's a good place to ask where you can help out, or how something should be approached.

Before submitting a pull request

  1. Make sure you've run the tests: ./all-crates-do test
  2. Format any source files you modified with Rustfmt.

Extension points exported contracts — how you extend this code

System (Interface)
(no doc) [12 implementers]
src/ecs/system/system.rs
SdlRenderer (Interface)
Separate so that it's not exported with the crate [1 implementers]
crates/media/src/renderer.rs
ReadResourceCost (Interface)
(no doc) [3 implementers]
crates/file_formats/dat/src/empires/resource.rs
ReadExt (Interface)
All of these methods assume little endian [1 implementers]
crates/io_tools/src/lib.rs
GameState (Interface)
(no doc) [1 implementers]
src/game/state/game_state.rs
Norm (Interface)
(no doc) [1 implementers]
crates/types/src/vector3.rs
RenderSystem (Interface)
(no doc) [5 implementers]
src/ecs/render_system/render_system.rs
SdlTexture (Interface)
Separate so that it's not exported with the crate [1 implementers]
crates/media/src/texture.rs

Core symbols most depended-on inside this repo

into
called by 174
crates/types/src/rect.rs
read_u32
called by 101
crates/io_tools/src/lib.rs
read_i16
called by 84
crates/io_tools/src/lib.rs
read_u8
called by 57
crates/io_tools/src/lib.rs
read_i32
called by 53
crates/io_tools/src/lib.rs
read_f32
called by 51
crates/io_tools/src/lib.rs
read_array
called by 48
crates/io_tools/src/lib.rs
read_u16
called by 45
crates/io_tools/src/lib.rs

Shape

Method 328
Class 145
Function 142
Enum 17
Interface 12

Languages

Rust100%

Modules by API surface

crates/types/src/fixed.rs60 symbols
crates/file_formats/dat/src/empires/unit.rs28 symbols
src/partition/grid.rs22 symbols
crates/file_formats/language/src/language.rs20 symbols
src/ecs/resource/path_finder.rs18 symbols
crates/file_formats/drs/src/drs.rs17 symbols
crates/file_formats/dat/src/empires/mod.rs16 symbols
src/ecs/resource/terrain/terrain.rs15 symbols
crates/file_formats/scn/src/player_data.rs15 symbols
crates/file_formats/dat/src/empires/terrain_block.rs15 symbols
crates/resource/src/render_command.rs14 symbols
crates/media/src/media.rs14 symbols

For agents

$ claude mcp add OpenAOE \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact