Giter Site home page Giter Site logo

freeage's People

Contributors

puzzlepaint 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

Watchers

 avatar  avatar  avatar  avatar  avatar

freeage's Issues

Elevation attack multiplier

Units should get an attack bonus if they attack something that is below them, and get an attack reduction if they attack something that is above them. For details, see:
https://ageofempires.fandom.com/wiki/Attack

Attacking is implemented in Game::SimulateMeleeAttack() in src/FreeAge/server/game.cpp.

It might be useful to add a function to ServerMap to interpolate the elevation at an exact location where a unit stands on, using bilinear interpolation. It might also be useful to define a threshold for a minimum elevation difference for the attack bonus/malus to kick in, otherwise the results for units at a similar height might appear somewhat random.

Implement chatting during the game

  • Upon pressing the Return key, a chat window should appear that allows entering chat messages.
  • The existing ClientToServerMessage::Chat and ServerToClientMessage::ChatBroadcast network messages should be re-used to implement the distribution of the chat message.
  • A text area needs to be implemented to display received chat messages. (Differing from the original game, it might be worth thinking about separating this from in-game messages to improve the visibility of chat messages. For example, the chat could be shown in the top-center part of the screen.)
  • “Playername resigned.” type of messages could be shown in the same area.

Idle Villager button and hotkey

  • If there are idle villagers, the idle villager button should be yellow instead of grayed out. The number of idle villagers should be shown in the bottom-right of the button.
  • Clicking the button (or pressing the corresponding hotkey) should toggle between all idle villagers.

Hints: Iterate over map->GetObjects(), check IsUnit(), GetPlayerIndex() == match->GetPlayerIndex(), and IsVillager() for each entry, and check whether the UnitAction is UnitAction::Idle to find the idle villagers. Use ClearSelection(), AddToSelection(), and SelectionChanged() to modify the selection.

Logging stacktraces on crashes and errors

Is this left in deliberately?

// install_signal_handlers(); // NOTE: CUSTOM CHANGE FOR LIBVIS (commented out)

Also this if condition could be changed in order to print the stack trace also in error level logs:

if (message.verbosity == Verbosity_FATAL) {
auto st = loguru::stacktrace(stack_trace_skip + 2);

In both cases it would be useful in bug reports to also have the stack trace without any additional actions.

Discovered while debugging...

Read original data content instead of hardcoding it

I see in the source files many hardcoded values of the original game mechanics instead of reading it from original data. To circumvent any legal issues you should try to use the .dat file as a data source or export it to a format usable by your engine (e.g. TOML, YAML, ... ).

You could for example use genieutils to extract the data and store it within a nyan container format - just as an idea. ;-)

Regarding e.g.:
https://github.com/puzzlepaint/freeage/blob/master/src/FreeAge/common/type_stats_data.cpp

Cheers

Garrisoning - Remaining Details

@MaanooAk wrote in #17:

  • Mechanics
    • Ungarrison a unit from a unit to empty space around (much easier to implement when there will be a unit with garrison capacity)
    • Town center bell (+ villager ungarrison and go back to work)
  • Gui
    • Add health bars to the garrison units icons
  • Game logic related
    • If relic, keep track of number of relics in PlayerStats
    • Bonus attack to some buildings from garrisoned units
    • Bonus speed to some units from garrisoned units
    • Heal garrisoned units

Gather points for production buildings

With one or more production buildings selected, right-clicking on the map should set the gather point for the selected buildings.

  • The gather point should be stored in the ClientBuilding and should be displayed graphically with a flag sprite when this building is selected. Notice that gather points could be set to a map coordinate, but can in some cases (for town centers) also be set on a resource, for example.
  • The gather point should be sent to the server with a new message type.
  • The server checks the validity of the message and stores the gather point in the corresponding ServerBuilding(s) if valid.
  • If a building that has a gather point set produces a new unit, its target should be automatically set to the gather point (ServerUnit::SetTarget()) or it should attempt to move there in case it is a map coordinate.
  • The building should also attempt to spawn the unit at the point where it is closest to the gather point. This could be done somewhat intelligently; for example, it is possible that a building is built next to a forest, and there is a single free tile between the building and the forest. Spawning a unit on this tile would trap it, which may cause frustration for the player. To prevent this, pathfinding could be used to figure out whether there is a valid path between the gather point and the spawn location. However, care should be taken not to cause too many pathfinding requests in order not to slow the server down too much.

Unit / building icons lack player color after the latest update

After the latest update to the original game, unit / building icons are provided in a way that allows to fill in the player color for the corresponding image parts, rather than always being blue. The game needs to adapt to this to render the icons correctly.

I also noticed that there are new texture atlas files, for example for the in-game UI panels. But the old files still seem to exist as well, so this did not get broken yet ...

Villager behavior: Villagers should try to start resource gathering after finishing construction of a drop-off building

After villagers finished constructing a resource drop-off building, they should attempt to start gathering the corresponding type of resource, if any of it is nearby.

Game::SimulateBuildingConstruction() might be a place to start. Some functionality will need to be added to find all villagers that are targeting a given building while it gets finished (regardless of whether they are currently next to it or not). Then they can be re-targeted to nearby resources.

Full Map Screenshots

I think it could be a nice addition to the toolset of some Map Scripters if they would have a compatible tool at hand to create "screenshots" for map previews for AoE2DE. Could be a nice use case for the beginning. 👍

Ability to build a town center if the player does not have one

In the Dark Age, it should be possible to construct a new town center if the initial town center was lost (or if there is no initial town center, such as on the Nomad map). So, the ability to construct a town center should be added, under the condition that no town center (or town center foundation) exists for the player that wants to build it. (Since the Dark Age is currently the only age that is supported, no check for the age needs to be done yet.)

Edit: The town center presents a special case in the sense that the map area occupied while building differs from the map area occupied while finished. This will need to be handled.

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.