puzzlepaint / freeage Goto Github PK
View Code? Open in Web Editor NEWAn open-source reimplementation of the game engine of Age of Empires 2: Definitive Edition.
An open-source reimplementation of the game engine of Age of Empires 2: Definitive Edition.
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.
ClientToServerMessage::Chat
and ServerToClientMessage::ChatBroadcast
network messages should be re-used to implement the distribution of the chat message.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.
Is this left in deliberately?
freeage/third_party/loguru/loguru.cpp
Lines 594 to 596 in 1c6e375
Also this if condition could be changed in order to print the stack trace also in error level logs:
freeage/third_party/loguru/loguru.cpp
Lines 1207 to 1208 in 4789ae6
In both cases it would be useful in bug reports to also have the stack trace without any additional actions.
Discovered while debugging...
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
- 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
With one or more production buildings selected, right-clicking on the map should set the gather point for the selected buildings.
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.ServerBuilding
(s) if valid.ServerUnit::SetTarget()
) or it should attempt to move there in case it is a map coordinate.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 ...
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.
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. 👍
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.