openage icon indicating copy to clipboard operation
openage copied to clipboard

Needed engine gamelogic features

Open TheJJ opened this issue 8 years ago • 4 comments

We should come up with a list of things the engine has to be capable of to properly simulate the games we want to support. This includes every detail that the engine has to calculate differently.

Basically this is what we need to implement and what the nyan API will provide then for the games.

This collection should go into doc/features.md.

TheJJ avatar May 01 '17 00:05 TheJJ

I'll start with a few:

The ones with a checkmark are more or less implemented for the old engine architecture. All need a proper reimplementation for the integration into #740.

  • [x] Animation display

  • [ ] UI integration (tech buttons, displayed unit stats, ...)

  • [ ] Resources

  • Units

    • [x] Unit creation
    • [ ] Creation cost (resources)
    • [x] Health points
    • [ ] Defence and boni
  • Abilities ("a unit can do this (with conditions, ...)")

    • [x] MoveAbility (if an unit can move)
    • [x] SetPointAbility (if an unit can set a gather point)
    • [x] GarrisonAbility (can this unit garrison somewhere?)
    • [x] UngarrisonAbility (can this unit leave a garrison place?)
    • [x] TrainAbility (can this unit train/create others?)
    • [x] BuildAbility (can this unit build buildings?)
    • [x] GatherAbility (can this unit gather resources?)
    • [x] AttackAbility (can this unit attack others?)
    • [x] RepairAbility (can this unit repair others?)
    • [x] HealAbility (can it heal others?)
    • [ ] ResearchAbility (can this unit perform research?)
    • [ ] PatrolAbility (can this unit go on patrol?)
    • [ ] ConvertAbility (can it convert other units?)
  • Actions ("a unit does this")

    • [x] TargetAction (actions that target another unit, i.e. gather, attack, heal, ...)
    • [x] DecayAction (rotting of units)
    • [x] DeadAction (dying animation)
    • [x] FoundationAction (idle action until building is complete)
    • [x] IdleAction (standing there doing nothing)
    • [x] MoveAction: Unit movement
      • [x] fixed target
      • [x] in range to another unit
      • [ ] Underground movement cost and restrictions
      • [ ] Movement behaviors (wildlife fleeing, target following, waypoint following, ...)
      • [ ] Formations
        • Line
        • Staggered
        • Box
        • Flank
      • [ ] Flying
    • [x] GarrisonAction (garrison inside another unit)
    • [x] UngarrisonAction (leave the other unit)
    • [x] TrainAction ("generate" a new unit)
    • [x] BuildAction (construct a building)
    • [x] RepairAction (repair a building)
    • [x] GatherAction (get resources from a gatherable unit)
    • [x] AttackAction (capt'n obvious)
      • [x] Melee attacks (with target restrictions)
      • [x] Ranged attacks -> ProjectileAction
      • [ ] Bonus against some targets
      • [ ] Attack stances (suicide, defensive, stand_ground, do_nothing)
    • [x] HealAction (heal a unit)
    • [ ] ConvertAction (convert a unit's team)
    • [x] ProjectileAction (move in a parabolic shape)
    • [ ] Unit transport (e.g. transport ship)
  • Unit types

    • [ ] Buildings (they are handled differently in the obstruction)
    • [ ] Moving units
    • [ ] Type conversion
      • villagers, trebuchets, ...
      • death
      • wildlife -> ResourceSpot
  • Unit owners, i.e. teams

    • [ ] Owner conversions (monks)
  • Tech Research

    • [ ] Age advancements
    • [ ] Unit upgrades (e.g. blacksmith stuff)
    • [ ] Team research (e.g. marketplace)
  • Limits

    • [ ] Only n units of some type
    • [ ] Maximum resources depending on storage buildings
  • Unit type tags (same for all units of this type):

    • AttackTypes: What kind of Attack can this Unit perform RangedAttack, CloseAttack, ContinuousAttack, PoisonAttack,
    • Weaknesses What are the Weaknesses? WeaknessRanged, WeaknessPike, ...
    • Targetability: Is this targetable by the player? TargetPlayer, TargetWorld
    • Ressources: Is this a ressource? IronRessource, GoldRessource, ...
    • Core Engine Abilities: Core features the above can be reduced to Damage, MovementCommand, Patrol, Follow, Construct, ...
  • Unit individual properties:

    • [converted, buffed, immortal] etc

Related: #640

You'll surely come up with many more!

TheJJ avatar May 01 '17 01:05 TheJJ

If I remember properly in Age Of Mythology, some units (heroes) can be created only once or cannot exist more than once in your army.

So maybe a property is needed to decide how many unit of each type can be created/owned by a single player.

elnabo avatar May 01 '17 08:05 elnabo

I've got more abilities:

  • StopAbility (if a unit can stop)
  • StanceAbility (can this unit have a stance? [villagers, trade carts, fishing ships can't])
  • GuardAbility (can this unit guard others?)
  • FollowAbility (can this unit follow others?)
  • FormationAbility (can this unit be part of a formation?)
  • ProvideGarrisonAbility (can this unit be a garrison for units?)
  • DeleteAbilty (can this unit be deleted? [Idk if this could be useful in custom scenarios])
  • AttackGroundAbility (can this unit fire at a place on the ground? [onagers, trebuchets])
  • ProvideBoardingAbility [for sea units, could inherit from ProvideGarrisonAbility with extra condition only_at_coast]
  • UnloadAbility [for sea units with extra condition to ungarrison only at the coast]
  • OpenGateAbility (can this unit open a gate?)
  • CloseGateAbility (can this unit close a gate?)
  • SetWaypointAbility (can this unit set waypoints?)
  • SellAbility (can this unit sell resources?)
  • BuyAbility (can this unit buy resources?)
  • TradePostAbility (can this unit be traded with?)
  • TradeAbility (can this unit trade with a trade post?)
  • PickupRelicAbility (can this unit pick up a relic/item?) or PickupItemAbility and let PickupRelicAbility inherit from it
  • DropRelicAbility or DropItwmAbility (can this unit drop a relic/item?)
  • TownbellAbility (can this unit ring a townbell?)
  • SendBackToWorkAbility (can this unit send garrisoned villagers back to work?)

and I would rename SetPointAbility to SetRallyPointAbility to avoid confusion with waypoints.

heinezen avatar Sep 06 '17 02:09 heinezen

https://pad.stusta.de/p/openage-components

heinezen avatar Jan 01 '21 20:01 heinezen