Giter Club home page Giter Club logo

curseofwar's Introduction

                                        __                      
           ____                        /  ]                     
          / __ \_ _ ___ ___ ___    __ _| |_  /\      /\___ ___  
        _/ /  \/ | |X _/ __/ __\  /   \   /  \ \ /\ / /__ \X _/ 
        \ X    | | | | |__ | __X  | X || |    \ V  V // _ | |   
         \ \__/\ __X_| \___/___/  \___/| |     \ /\ / \___X_|   
          \____/                       |/       V  V            

        Curse of War -- Real Time Strategy Game for Linux.
        Copyright (C) 2013 Alexey Nikolaev.

Summary
=======
  This is a fast-paced action strategy game for Linux implemented using 
  ncurses user interface.

  Unlike most RTS, you are not controlling units, but focus on high-level 
  strategic planning: Building infrastructure, securing resources, 
  and moving your armies.

  The core game mechanics turns out to be quite close to WWI-WWII type of 
  warfare, however, there is no explicit reference to any historical period.

  See "How to play" section for more details.

Build, Install, Uninstall
=========================

  1. Build with make (Linux)
  --------------------------
      Ncurses version:
        $ make

      SDL version:
        $ make SDL=yes

      To install, "make install" with defined variable DESTDIR. 
      See file INSTALL for details.

  2. Build with CMake (Linux or Windows)
  --------------------------------------
      See COMPILE-WITH-CMAKE for details.

Command line arguments
======================
  -W width
    Map width (default is 21)

  -H height
    Map height (default is 21)

  -S [rhombus|rect|hex]
    Map shape (rectangle is default). Max number of countries N=4 for 
    rhombus and rectangle, and N=6 for the hexagon.

  -l [2|3| ... N]
    Sets L, the number of countries (default is N).

  -i [0|1|2|3|4]
    Inequality between the countries (0 is the lowest, 4 in the highest).

  -q [1|2| ... L]
    Choose player's location by its quality: 1 = the best available 
    on the map, and L = the worst. Only in the singleplayer mode.

  -r
    Absolutely random initial conditions, overrides options -l, -i, and -q.

  -d [ee|e|n|h|hh]
    Difficulty level (AI) from the easiest to the hardest (default is normal).

  -s [p|sss|ss|s|n|f|ff|fff]
    Game speed from the slowest to the fastest (default is normal).

  -R seed
    Specify a random seed (unsigned integer) for map generation.

  -T 
    Show the timeline.

  -E [1|2| ... L]
    Start a server for not more than L clients.

  -e port
    Server's port (19140 is default).

  -C IP
    Start a client and connect to the provided server's IP-address.

  -c port
    Clients's port (19150 is default).

  -v
    Display the version number

  -h
    Display help information

How to play
===========

  A good and easy mode to start playing:
    $ curseofwar -i4 -q1 -dee

  Or, on a smaller map:
    $ curseofwar -i4 -q1 -dee -W16 -H16

  Normally, the game starts with 4 small countries in the corners of the map. 
  You start as the ruler of the Green country, and your goal is to conquer 
  the whole map.
 
  Tiles
  -----

  The map is made of hexagonal tiles. They are: 
        
  /\^   Mountains, cannot be populated

  /$\   Gold mines, cannot be populated too.
        This is the source of gold for your country.
        To control a mine, surround it with your army


   n    Villages, have the slowest population growth (+10%)

  i=i   Towns, average population growth (+20%)

  W#W   Fortresses, high population growth (+30%)

    
   -    Grassland, normal habitable territory

  People
  ------

  People are your primary resource. Thriving population is essential for your
  victory.
  
  Every tile can support at most 499 people from each country.
  When people from more than one country occupy the same tile, they fight.
  The country that has the highest population at the tile is called the tile
  owner.

  The population of the tile owner is shown on all grassland tiles as follows:

   .      1 - 3    citizens
  ..      4 - 6
  ...     7 - 12
   :     13 - 25
  .:     26 - 50
  .:.    51 - 100
   ::   101 - 200
  .::   201 - 400
  :::   400 - 499

  People migrate from highly populated tiles to less populated tiles.

  Population grows only in cities. In villages by 10%, in towns by 20%, and 
  fortresses by 30% every simulation step. By controlling cities, you control 
  their surrounding territory.

  Flags
  -----

  Every country can put flags on the map. Flags change migration rates, 
  so that people of your country start gathering at the tiles with flags. 

  Player's flags are shown as white "P" on the right side of a tile.
  Flags of the computer opponents are shown as "x" on the left side of a tile.

  The flags can be used to increase population of your own cities, as well as
  for conquering foreign territories.

  When countries are fighting for a city, and if the damage to the defender's 
  army is significant, the city can be destroyed: A fortress becomes a town, 
  a town becomes a village, and the village gets completely burnt by the invaders.
  
  Countries
  ---------

  Computer opponents differ in personality, and it affects the way they fight.

Controls
========

  Arrow keys and H, J, K, L are for moving the cursor

  R or V   build village -> town -> fortress
  
  Space    add/remove a flag
  X        remove all your flags
  C        remove a half of your flags
  
  S        slower
  F        faster

  Q        quit

Multiplayer
===========
  
  To start a server for two players:
    $ ./curseofwar -E 2

  To start a client and connect to the server:
    $ ./curseofwar -C <server's IP> 

  To specify ports, use -e option for server's port, and -c option for 
  client's port. By default, servers are using port 19140, and clients are 
  using port 19150.

    Examples:
      Start a server for a single client using port 11111
        $ ./curseofwar -E 1 -e 11111

      To connect to it:
        $ ./curseofwar -C <server's IP> -e 11111
      
      Alternatively, to connect to it using port 12345 on the client's side:
        $ ./curseofwar -C <server's IP> -c 12345 -e 11111

  Note that all needed map options must be setup when you start a server, 
  the map and other data are transmitted to clients, once they are connected. 
  
    Example:
      Server for 3 clients, no computer opponents, hexagonal map, and equal 
      conditions for all:
        $ ./curseofwar -E3 -l3 -S hex -i0 
  
  Game speed cannot be changed by a client, so it must be set initially by 
  the server. Not all data is sent to clients (e.g. info about population is 
  not sent in full).

  Multiplayer mode is at relatively early development stage. Changes may occur
  at any moment. When you play with other people, make sure that you are using
  the same version of the game. Hopefully, game's client-server communication 
  protocol will be improved in future. All communication is made via UDP. 

  Please, report you problems with multiplayer.

License
=======
  Curse of War -- Real Time Strategy Game for Linux.
  Copyright (C) 2013 Alexey Nikolaev.

  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.

Source code
===========
   
   https://github.com/a-nikolaev/curseofwar

Contact
=======

  Dev:
    Mail:   [email protected]

  General:
    IRC:    #curseofwar on irc.freenode.net


curseofwar's People

Contributors

a-nikolaev avatar dmikis avatar fgaz avatar nsajko avatar sicness avatar smcameron avatar winterheart avatar yquemener 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

curseofwar's Issues

Make curseofwar -h more compact

Hi, it seems that curseofwar -h is cover my whole terminal, I hope that it can be shorten.

Good luck and have a nice day!

You are best dude

You are crazy genius! This game is one of the best strategy which i've played. Please create more ascii games for linux terminal. You have a talent.

Key for exit

Please add a shortkey for exit of the game with confirmation.
And block ctrl+c

thx!

A way to jump to different spot in the map?

If im fighting 2 or more players, i would like to save a position and hit a hotkey to jump to that spot. Instead of using holding down hjkl to move.

Maybe like
Alt+number = save spot
number = jump

Uncertainty in curseofwar -H text

From curseofwar -H:
-l [2|3| ... N]
Sets L, the number of countries (default is N).

I think that N is too small and must be increased up to M.

Mountain blocks players

notice this one when i was playing a 4player game.
the player on the top left is blocked by mountains

$ curseofwar -R 1806242879

memory leak in conflict()

Hi, I'm participating in hacktoberfest 2021. I found a memory leak and I have a patch to fix it. Could you add "hacktoberfest" tag to your project? (Click the gear icon next to about, and add hacktoberfest to the Topics.) I'll send you the patch regardless.

SDL branch: Naming the executable

To build the graphical version:

make SDL=1

(i.e. the variable SDL must be defined)

To run:

./curseofwar-sdl [usual args]

Don't try to install. It does not work correctly.

I have the following problem: Do we need to call the SDL executable "curseofwar-sdl" or "curseofwar"?

On one hand, I would like to name two executables differently, so you will be able to make and install both. On the other hand, what should we do with the manpage, changelog, and probably other things that are called "curseofwar" already? Do we install them as is for both versions? Do you have any experience with issues like this. It looks like the Doungeon Crawl Stone Soup Makefile builds executable "crawl", no matter what version you want to build.

Automate server restart

Make the following thing:

When:

  • All clients leave, or
  • There is a winner, or
  • all clients are defeated

the server continues running for extra 5-15 seconds, and then restarts the game.

This automated restart can be the default behavior, or turned on with a command line argument (say, -L for loop, or something like this). It is good to have this option for single player too. The format can be -L seconds-to-wait.

AI competition

I have a request that you may find interesting.
Many people are applying AI to games, as a sort of benchmark for comparing AI.

The game of chess is long gone, as the branching factor is small enough that you don't need AI to make a chess engine.
Go comes along and it has a huge branching factor, and an intuition is required.
Another game, diplomacy, is also quickly developing to be one of the next competing games.
COW would be another great addition.
It differs from diplomacy in that it is not deterministic, so it adds a new factor.
I think curseofwar has sufficiently many degrees of complexity to make it a good battle ground for AI competitions.
The only thing that is needed is a way to communicate with a central server which provides the current state of the board and receives actions. Seeing as this already exists for COW it should be easy to make it user friendly.

Interested?

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.