Ticket #1 (closed enhancement: fixed)

Opened 6 years ago

Last modified 9 months ago

Player Properties

Reported by: stuart Owned by: historic_bruno
Priority: Should Have Milestone: Alpha 5
Component: Game engine Keywords:
Cc:

Description (last modified by historic_bruno) (diff)

  • Ideally JS variables should be attachable to the Player object (via localPlayer?) to declare and set any properties affiliated with the current player. (eg player.resource.food; modder could alter it to add/remove any resources he wishes.)
  • Civilisation: Celt, Greek, etc ... Chosen from session config. (--> Currently there is a concept of civ, but it's not choosable in the GUI.)
  • Colour: Player colour, chosen from session config.
  • Team: In session config, players can choose to be on the same team (allied at start).
  • Various team settings, such as allowing teams to have "shared control" and being able to command each other's units.
  • Alliance: Diplomatic settings (who's an ally, who's an enemy).
  • array of players matching slot numbers, 1: enemy, 2: ally (Not choosable from GUI yet though.)
  • Phase: The starting "age" for the player (defaults to village). If otherwise, the player begins with the phase upgrade already researched.
  • Resource: Quantities of each of the resources gathered by the player.
    • Currently resources are tracked by the GUI; every player should have their own set of resources and the entity scripts and GUI should be updated to work with this.
  • Start Location: Position on the map where the player will begin.
    • Camera should also start centered on this location.

Change History

comment:1 Changed 6 years ago by stuart

  • Description modified (diff)

comment:2 Changed 6 years ago by stuart

  • Description modified (diff)

comment:3 Changed 6 years ago by Matei

  • Owner set to Matei

comment:4 Changed 6 years ago by Matei

  • Description modified (diff)

comment:5 Changed 5 years ago by Matei

  • Description modified (diff)

comment:6 Changed 3 years ago by feneur

  • Owner Matei deleted

comment:7 Changed 16 months ago by historic_bruno

Some of these are being addressed now.

Discussion

comment:8 Changed 16 months ago by anonymous

  • Milestone Playability Demo deleted

Milestone Playability Demo deleted

comment:9 Changed 16 months ago by wacko

  • Owner set to historic_bruno
  • Milestone set to Backlog

comment:10 Changed 15 months ago by ImG

  • Milestone changed from Backlog to Alpha 4

comment:11 Changed 15 months ago by historic_bruno

  • Description modified (diff)

comment:12 Changed 15 months ago by historic_bruno

  • Description modified (diff)

comment:13 Changed 15 months ago by historic_bruno

  • Description modified (diff)

comment:14 Changed 15 months ago by historic_bruno

  • Description modified (diff)

comment:15 Changed 14 months ago by historic_bruno

  • Description modified (diff)

About the rest of this ticket:

  • Technologies/research/phases are not yet implemented, so there's no use for player phase yet, even though there is a variable for that now (defaults to "village").
  • Team properties, to me, belongs with the concept of diplomacy and perhaps a team/diplomacy manager. Again something we don't have fully implemented yet. But the same interface that a player would use to tribute resources, adjust diplomatic stance, etc, would be convenient to toggle something like cooperative control of units.
  • Start location doesn't make sense to specify for players, because in a scenario all the units are pre-placed, but in a random map the RMS itself will place them according to some algorithm. The player starts wherever they have units.

On the other hand, a per-player starting camera position seems quite logical and would prevent the "hack" we currently use (finding the player's civil centre and focusing the camera on that). It's entirely possible that some maps and game types will not have a starting civil centre, e.g. nomadic games, learning campaigns, etc.

Atlas and the new random map generator would both need to support a starting camera position, which the map reader would use to set the camera accordingly. In Atlas, I envision that placing a civil centre would automatically set this variable for the owning player, but there would also be an option to override that default by selecting an initial camera/view.

comment:16 Changed 14 months ago by feneur

Would it take a lot to set the starting camera position to the "first unit" for a player if there is no civic centre? (By first unit I mean first initialized unit or something similar)

I still think it would be nice to be able to set it manually in Atlas, but for e.g. nomadic game types and for scenarios without civic centres but where it doesn't matter it should be helpful to do something like that.

comment:17 Changed 14 months ago by historic_bruno

That sounds like a good default and seems easy enough to implement:

The map XML reader would be modified so that the first unit matching the player's ID would become the default camera target. Then something like Setup.js would check if a player camera was defined in map settings and if so override the default.

comment:18 Changed 14 months ago by k776

  • Type changed from task to enhancement

comment:19 Changed 11 months ago by k776

  • Milestone changed from Alpha 4 to Alpha 5

comment:20 Changed 10 months ago by k776

  • Milestone changed from Alpha 5 to Alpha 6

comment:21 Changed 9 months ago by historic_bruno

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from Alpha 6 to Alpha 5

I'm going to close this because #55 already contains the one remaining problem (starting camera position).

Note: See TracTickets for help on using tickets.