Games/Productive: Difference between revisions

From OLPC
Jump to navigation Jump to search
(→‎Game-play: Reformat for easier reading and editing)
Line 16: Line 16:


== Game-play ==
== Game-play ==

These rules should create a fairly broad range of possible strategies, defending, farming, raiding, road-building and city-building. The parameters and rules will likely need tweaking to keep the game-play fast and fun.

=== Board Setup ===


* Grid playing "field" of a given size
* Grid playing "field" of a given size
Line 24: Line 28:
** All players must join before start-of-play
** All players must join before start-of-play
** Loss of a player stops play (game can be stored and restored by any participant at any time, potentially with other users)
** Loss of a player stops play (game can be stored and restored by any participant at any time, potentially with other users)

* Resource Production
=== Resource Production ===
** Resource production is proportional to the number of productive units with adjacent empty land (regardless of whether the land is within the territory the unit is in or how many units are "farming" it).

** Productive units begin producing when they are adjacent to empty land
* Resource production is proportional to the number of productive units with adjacent empty land (regardless of whether the land is within the territory the unit is in or how many units are "farming" it).
*** They retain their production counter internally until it is used
* Productive units begin producing when they are adjacent to empty land
*** Usage of resources is done evenly across all units in all controlled territories
** They retain their production counter internally until it is used
** If a unit converts allegiance or moves to a new territory then they take their collected resources with them
** Usage of resources is done evenly across all units in all controlled territories
** A player's current wealth is the sum of the wealth of their productive units in those territories that they control. They may dispense this wealth as they see fit (given constraints on unit maintenance)
* If a unit converts allegiance or moves to a new territory then they take their collected resources with them
* Unit Production/Maintenance
* A player's current wealth is the sum of the wealth of their productive units in those territories that they control. They may dispense this wealth as they see fit (given constraints on unit maintenance)
** Unit survival requires resources

*** Each existing unit requires a certain amount of resources to survive
=== Unit Production/Maintenance ===
**** this value is comparatively low for productive units (say 1/10 of a unit's production)

**** this value is comparatively high for military units (say 2/10 of a productive unit's production)
* Unit survival requires resources
** All units must be fed (starvation)
** Each existing unit requires a certain amount of resources to survive
*** No unit production possible if starvation (insufficient food for all units) occurs
*** this value is comparatively low for productive units (say 1/10 of a unit's production)
*** In process unit production is canceled, 50% of resources are lost, 50% recovered to feed units, oldest production is stopped first, until all units are fed or all in-process production is canceled
*** this value is comparatively high for military units (say 2/10 of a productive unit's production)
*** If no units in-production, non-productive units are lost
* All units must be fed (starvation)
**** Non-productive productive units (most dense area first)
** No unit production possible if starvation (insufficient food for all units) occurs
**** Military units (those without empty squares in their area first (random), then any (random))
** In process unit production is canceled, 50% of resources are lost, 50% recovered to feed units, oldest production is stopped first, until all units are fed or all in-process production is canceled
**** Maybe start off with simple random kill-off (easy to program)
** If no units in-production, non-productive units are lost
**** (Note: I'd rather have the units switch allegiance that are in the other-player-controlled territories, but that's probably too involved for now)
*** Non-productive productive units (most dense area first)
** Controlled territories can produce new units
*** Military units (those without empty squares in their area first (random), then any (random))
*** If there is no controlled territory, no new units are possible
*** Maybe start off with simple random kill-off (easy to program)
*** New unit production requires significant resources
*** (Note: I'd rather have the units switch allegiance that are in the other-player-controlled territories, but that's probably too involved for now)
**** Setting for each unit-type, along with other requirements (e.g. city status, control of territory)
* Controlled territories can produce new units
**** Maybe 500% of unit's production for a productive unit
*** Wealth remains with the productive unit until a controlled territory begins producing a unit
** If there is no controlled territory, no new units are possible
** New unit production requires significant resources
**** if you do not create units your productive units become targets for takeover
*** Setting for each unit-type, along with other requirements (e.g. city status, control of territory)
*** If a territory is taken over (control shifts to another player) while it is producing a unit, the unit becomes the unit of the controlling player (the unit is assigned to the controlling player at the moment the unit is created, but the cost is borne at the moment the unit is ordered)
*** Maybe 500% of unit's production for a productive unit
** Cities
** Wealth remains with the productive unit until a controlled territory begins producing a unit
*** Very dense population centres, (i.e. those which occupy every point in a territory), will produce more mobile units which do not produce resources when occupying, but which contribute to controlling/occupying territories (military versus productive units)
*** if you do not create units your productive units become targets for takeover
*** Larger cities will produce ever more mobile units (i.e. two adjacent city territories)
** If a territory is taken over (control shifts to another player) while it is producing a unit, the unit becomes the unit of the controlling player (the unit is assigned to the controlling player at the moment the unit is created, but the cost is borne at the moment the unit is ordered)
**** e.g. one-territory city, 2-unit military, two-territory city, 3-unit military

*** Military units require exponentially more resources to produce for each level (e.g. a unit that can move 2 squares at once would cost 4 times as many resources as a farmer, those moving 3 squares, 9 times).
==== Cities/Technology ====
* Territoriality

** Territories are controlled by having the largest population in a territory (equal population results in no-one controlling the territory)
* Very dense population centres, (i.e. those which occupy every point in a territory), will produce more mobile units which do not produce resources when occupying, but which contribute to controlling/occupying territories (military versus productive units)
*** Military units have a multiple of the weight of productive units when determining control, i.e. a level-2 military unit counts as productive unit, a level-3 as 3 productive units.
* Larger cities will produce ever more mobile units (i.e. two adjacent city territories)
** Territories provide access to the controlling player to the resources of that player's units in the territory
** e.g. one-territory city, 2-unit military, two-territory city, 3-unit military
*** Players use resources of all of their controlled territories to start production of units and to feed their population
* Military units require exponentially more resources to produce for each level (e.g. a unit that can move 2 squares at once would cost 4 times as many resources as a farmer, those moving 3 squares, 9 times).
** Territories are YxY grid fragments, marked visually, so that users can see the territory "boundaries" (it would be nice to allow overlapping, shifting boundaries, but not likely to be feasible)

* Conversion
=== Territoriality ===
** Each territory has a balance of power represented by a simple count of the total number of units within it, with the maximum count being the power in control (equal counts == no controlling balance)

*** Each unit retains an internal counter of "allegiances" (one for each player)
* Territories are controlled by having the largest population in a territory (equal population results in no-one controlling the territory)
*** Time within a territory controlled by another player increases the unit's allegiance to that power (without upper bounds, so a very old farmer is going to be far harder to sway than a young one)
** Military units have a multiple of the weight of productive units when determining control, i.e. a level-2 military unit counts as productive unit, a level-3 as 3 productive units.
**** Military units are less affected, but still affected
* Territories provide access to the controlling player to the resources of that player's units in the territory
*** Units start with reasonably high allegiance to the player that created them, enough to withstand 2 minutes or so in a foreign-controlled territory (enough time to "mount a defense", but not enough time to build new units to mount it)
** Players use resources of all of their controlled territories to start production of units and to feed their population
*** Units belong to (respond to the commands of, provide resources for) the player to whom they have the greatest allegiance
* Territories are YxY grid fragments, marked visually, so that users can see the territory "boundaries" (it would be nice to allow overlapping, shifting boundaries, but not likely to be feasible)
*** Unit conversions will be reported to the user, individual unit's allegiances can be viewed one-by-one by hovering over the unit

** Player with balance of power for a territory can use the resources of their units in that territory to produce new units in any of their controlled territories
=== Conversion ===
* Motion

** Movement is instantaneous, that is, it occurs at a discrete time
* Each territory has a balance of power represented by a simple count of the total number of units within it, with the maximum count being the power in control (equal counts == no controlling balance)
*** All units can move across un-occupied spaces in response to commands by user
** Each unit retains an internal counter of "allegiances" (one for each player)
*** Productive units can only move slowly through un-occupied space (e.g. 1 square at a time, every 15 or 20 seconds)
** Time within a territory controlled by another player increases the unit's allegiance to that power (without upper bounds, so a very old farmer is going to be far harder to sway than a young one)
*** "Military" units can move farther/faster through un-occupied space (e.g. 2 squares at a time, on the same period)
*** Military units are less affected, but still affected
** Controlled square motion
** Units start with reasonably high allegiance to the player that created them, enough to withstand 2 minutes or so in a foreign-controlled territory (enough time to "mount a defense", but not enough time to build new units to mount it)
*** Units can travel instantly through a chain of their own units
** Units belong to (respond to the commands of, provide resources for) the player to whom they have the greatest allegiance
*** Productive units cannot move through opposing units' occupied squares
** Unit conversions will be reported to the user, individual unit's allegiances can be viewed one-by-one by hovering over the unit
*** Military units can move across opposing unit's squares if there is an empty square within their movement range (i.e. a 3-square military unit can jump two opposing player's squares, but a 2-square unit can only jump one)
* Player with balance of power for a territory can use the resources of their units in that territory to produce new units in any of their controlled territories
*** Military units can combine a move through a chain of their own units and a jump over an adjacent opponent.

** Player can move as many units as they want as often as the units are allowed to move (real time operation)
=== Motion ===
*** New units appear at the closest un-occupied square to the center of their creating territory

* Goals
* Movement is instantaneous, that is, it occurs at a discrete time
** Report "success" at any point in time along various measures:
** All units can move across un-occupied spaces in response to commands by user
*** Territoriality (Conquest, number of territories occupied/controlled)
** Productive units can only move slowly through un-occupied space (e.g. 1 square at a time, every 15 or 20 seconds)
*** Resource Base (Money, total income over time)
** "Military" units can move farther/faster through un-occupied space (e.g. 2 squares at a time, on the same period)
*** Technology (Maximum "tech" level (military distance), number of cities)
* Controlled square motion
*** Population (Simple count)
** Units can travel instantly through a chain of their own units
*** Loyalty (Average allegiance of population)
** Productive units cannot move through opposing units' occupied squares
**** Conversions (Ratio of conversions to/from player)
** Military units can move across opposing unit's squares if there is an empty square within their movement range (i.e. a 3-square military unit can jump two opposing player's squares, but a 2-square unit can only jump one)
** Military units can combine a move through a chain of their own units and a jump over an adjacent opponent.
* Player can move as many units as they want as often as the units are allowed to move (real time operation)
* New units appear at the closest un-occupied square to the center of their creating territory

=== Goals ===

* Report "success" at any point in time along various measures:
** Territoriality (Conquest, number of territories occupied/controlled)
** Resource Base (Money, total income over time)
** Technology (Maximum "tech" level (military distance), number of cities)
** Population (Simple count)
** Loyalty (Average allegiance of population)
*** Conversions (Ratio of conversions to/from player)


== Implementation Ideas ==
== Implementation Ideas ==

Revision as of 21:04, 29 October 2007

Productive

This is a straw-man proposal for a simplified real-time strategy game, tentatively named "Productive". We may attempt to implement the game during the upcoming OLPC Toronto Game Sprint (Nov 16-18, 2007).

Simplifications from "normal" real-time strategy games:

  • Just two unit-types
  • Single-tech tech-tree (military units of varying grades)
  • Just two commands (territory-create-unit, unit-move)
  • No battle system (no battles per-se, just shifts of allegiance to controlling powers)
  • Single resource type
  • Constrained map structures

Those changes put Productive somewhere between chess or checkers and traditional computerized RTS games. All of the complexity of game-play is emergent from the simple rules, but the style-of-play is real-time.

Game-play

These rules should create a fairly broad range of possible strategies, defending, farming, raiding, road-building and city-building. The parameters and rules will likely need tweaking to keep the game-play fast and fun.

Board Setup

  • Grid playing "field" of a given size
    • To start with, a simple grid
    • Might allow for adding "dead areas" to the grid eventually
    • To start with, regular territories within the grid
  • Each player gets X starting units and places them on the board one after another until the units are all placed
    • All players must join before start-of-play
    • Loss of a player stops play (game can be stored and restored by any participant at any time, potentially with other users)

Resource Production

  • Resource production is proportional to the number of productive units with adjacent empty land (regardless of whether the land is within the territory the unit is in or how many units are "farming" it).
  • Productive units begin producing when they are adjacent to empty land
    • They retain their production counter internally until it is used
    • Usage of resources is done evenly across all units in all controlled territories
  • If a unit converts allegiance or moves to a new territory then they take their collected resources with them
  • A player's current wealth is the sum of the wealth of their productive units in those territories that they control. They may dispense this wealth as they see fit (given constraints on unit maintenance)

Unit Production/Maintenance

  • Unit survival requires resources
    • Each existing unit requires a certain amount of resources to survive
      • this value is comparatively low for productive units (say 1/10 of a unit's production)
      • this value is comparatively high for military units (say 2/10 of a productive unit's production)
  • All units must be fed (starvation)
    • No unit production possible if starvation (insufficient food for all units) occurs
    • In process unit production is canceled, 50% of resources are lost, 50% recovered to feed units, oldest production is stopped first, until all units are fed or all in-process production is canceled
    • If no units in-production, non-productive units are lost
      • Non-productive productive units (most dense area first)
      • Military units (those without empty squares in their area first (random), then any (random))
      • Maybe start off with simple random kill-off (easy to program)
      • (Note: I'd rather have the units switch allegiance that are in the other-player-controlled territories, but that's probably too involved for now)
  • Controlled territories can produce new units
    • If there is no controlled territory, no new units are possible
    • New unit production requires significant resources
      • Setting for each unit-type, along with other requirements (e.g. city status, control of territory)
      • Maybe 500% of unit's production for a productive unit
    • Wealth remains with the productive unit until a controlled territory begins producing a unit
      • if you do not create units your productive units become targets for takeover
    • If a territory is taken over (control shifts to another player) while it is producing a unit, the unit becomes the unit of the controlling player (the unit is assigned to the controlling player at the moment the unit is created, but the cost is borne at the moment the unit is ordered)

Cities/Technology

  • Very dense population centres, (i.e. those which occupy every point in a territory), will produce more mobile units which do not produce resources when occupying, but which contribute to controlling/occupying territories (military versus productive units)
  • Larger cities will produce ever more mobile units (i.e. two adjacent city territories)
    • e.g. one-territory city, 2-unit military, two-territory city, 3-unit military
  • Military units require exponentially more resources to produce for each level (e.g. a unit that can move 2 squares at once would cost 4 times as many resources as a farmer, those moving 3 squares, 9 times).

Territoriality

  • Territories are controlled by having the largest population in a territory (equal population results in no-one controlling the territory)
    • Military units have a multiple of the weight of productive units when determining control, i.e. a level-2 military unit counts as productive unit, a level-3 as 3 productive units.
  • Territories provide access to the controlling player to the resources of that player's units in the territory
    • Players use resources of all of their controlled territories to start production of units and to feed their population
  • Territories are YxY grid fragments, marked visually, so that users can see the territory "boundaries" (it would be nice to allow overlapping, shifting boundaries, but not likely to be feasible)

Conversion

  • Each territory has a balance of power represented by a simple count of the total number of units within it, with the maximum count being the power in control (equal counts == no controlling balance)
    • Each unit retains an internal counter of "allegiances" (one for each player)
    • Time within a territory controlled by another player increases the unit's allegiance to that power (without upper bounds, so a very old farmer is going to be far harder to sway than a young one)
      • Military units are less affected, but still affected
    • Units start with reasonably high allegiance to the player that created them, enough to withstand 2 minutes or so in a foreign-controlled territory (enough time to "mount a defense", but not enough time to build new units to mount it)
    • Units belong to (respond to the commands of, provide resources for) the player to whom they have the greatest allegiance
    • Unit conversions will be reported to the user, individual unit's allegiances can be viewed one-by-one by hovering over the unit
  • Player with balance of power for a territory can use the resources of their units in that territory to produce new units in any of their controlled territories

Motion

  • Movement is instantaneous, that is, it occurs at a discrete time
    • All units can move across un-occupied spaces in response to commands by user
    • Productive units can only move slowly through un-occupied space (e.g. 1 square at a time, every 15 or 20 seconds)
    • "Military" units can move farther/faster through un-occupied space (e.g. 2 squares at a time, on the same period)
  • Controlled square motion
    • Units can travel instantly through a chain of their own units
    • Productive units cannot move through opposing units' occupied squares
    • Military units can move across opposing unit's squares if there is an empty square within their movement range (i.e. a 3-square military unit can jump two opposing player's squares, but a 2-square unit can only jump one)
    • Military units can combine a move through a chain of their own units and a jump over an adjacent opponent.
  • Player can move as many units as they want as often as the units are allowed to move (real time operation)
  • New units appear at the closest un-occupied square to the center of their creating territory

Goals

  • Report "success" at any point in time along various measures:
    • Territoriality (Conquest, number of territories occupied/controlled)
    • Resource Base (Money, total income over time)
    • Technology (Maximum "tech" level (military distance), number of cities)
    • Population (Simple count)
    • Loyalty (Average allegiance of population)
      • Conversions (Ratio of conversions to/from player)

Implementation Ideas

  • Screen Layout
    • Orthogonal grid playing field (easy to program quickly in PyGame)
      • Wide bars on edge for scrolling window
    • Statistics side-bar/bottom-bar (portrait layout below, landscape beside)
      • Overall map (clickable to move to another area)
      • Hover information display
    • Notifications (click to zoom to the unit/territory)
      • Territories being invaded (entry of foreign unit into player-controlled territory)
      • Territories lost (conversion of territory to another player's control)
      • Units being converted (units who are allied to the player which are becoming more allied with another player)
      • Units converted (units whose allegiance has switched to another player)
      • Units created (local-player creation only)
    • Statistics/readouts
    • Resource Meter (three part, background production, two overlays of usage, highlight on danger and more so on crises)
      • Current resource production (rate)
      • Current maintenance resource usage (rate)
      • Current unit-production resource usage (rate)
  • Interactivity
    • Unit-selection (single-only)
      • Hover to see unit details (including timers) in HUD
        • Unit should display it's planned route (to the player who controls them) as a path on the screen
      • Click and click empty square to issue movement command
      • Click on unit, or another unit (of any player), to cancel movement command (or escape key on keyboard), on the first click planned motion is stopped, so clicking on a moving unit then clicking on them again stops their motion
      • Movement blockage will be reported back as flashes or the like highlighting a blocked move
    • Territory Icon (single-selection-only)
      • Hover to see territory details including unit production progress
      • Click to create new unit, if the territory hasn't begun production yet, click again to abort production and retain all resources
    • Tablet Operation
      • Gamepad/arrows to move cursor, accelerate on long hold-down, auto-scroll to follow selection
      • Navigation rocker-down to "click"
      • Navigation rocker-up to switch to side-bar and back
      • "Hover" by not moving
      • Other rocker directions for e.g. bringing up save or option overlays
  • Miscellaneous UI Features
    • Store/restore UI (later)
    • Initial setup screens (later)
    • History viewer? (later)
    • Observer view? (later)
  • Simulation code as a separate engine (i.e. not directly connected to the display code, so that we can replace the display should we need to)
    • Speed control (new users wanting to play slow, to learn, experienced to play fast, very experience to play slowly and chess-like)
  • Host will run the simulation (for now we won't worry about "cheats")
    • Use whole-board-updates from the server to the clients (reduce synchronization problems)
    • Allow anyone to save off the board at any time (and potentially resume it later with different players, share it with others, etceteras)
    • Updates should be first-come-first served, but keep in mind that many updates will be constrained by the unit/territories counters regarding e.g. frequency of movement and/or production
    • We may want to introduce an arbitrary delay into the host child's updates (to prevent them having an edge)
  • Keep the various simulation parameters as controllable parameters so that we can tweak game-play through development, a few of these might be exposed to the player
    • Board size (e.g. start with 30x30 for 2-player)
    • Territory size (e.g. start with 3x3 for 2-player)
    • All periods/rates
      • Resource-collection rate per productive unit
      • Production rate per unit/distance
      • Period before auto-placement
      • Cost per unit
      • etc.
    • Will need some basic path-finding algorithm for the units

Art Required

We'll need quite a few art pieces to polish the game. Likely need at least one graphic and one auditory artist to participate.

Graphics

  • Territory Icons
    • Uncontrolled Territory
    • Controlled Territory
    • Territory Lost
    • Territory Threatened (other player moves into your territory)
  • Unit Icons
    • Productive
    • Military (multiple levels, likely composed from a base icon)
    • "Moving" versions of each
    • "Moving Blocked" versions of each
  • Movement Icon
    • Conflict Icon (Move Blocked)
  • Resource Icon
  • Allegiance Icon
  • Unit-Allegiance
    • Each player gets their XO colours assigned to their icons
    • Need to look into colour-reliance issues, may need to provide different icon sets so that black-and-white mode is playable, alternately, use player "badges" added to the base icon-set
  • Resource Meter

Sounds

  • Action sounds
  • Event/notification sounds