Thread: ASCII Warcraft (was Graphics using C)

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    5
    ok its looks like we're stuck with ASCII implementation.

    here are the rules my partner has come up with:

    Populations grow, and then they expand to seek the resources they need to support themselves. The player needs to be clever in how/where he spreads his population, so that as few as possible starve.

    When the playing area is mostly covered, opposing populations fight for the land, namely by populating the land with more people than the opposition. Cities can be built, effectively setting the population of the region as a constant and denying access to the land by the opposing populations... unless they mass and assault the city.

    Each player starts with one population in the territory of his/her choice. Players start with 5 points and bid to go first.

    Growth – Every pop is doubled (but with max of 2 pop added per territory)
    Territory with 1 goes to 2, 2 goes to 4, 3 goes to 5, 4 goes to 6, etc.
    Taxation – Can be simultaneous; Each player earns points for having cities:
    points = x! (factorial), such that x = #cities
    Buy/Upkeep Ships – A player must spend 1 point to keep each ship.
    A player may spend 2 points to add a ship to the fleet.
    Expansion – Reallocate pops in order of smallest pop to largest (at last census).
    Ties in population are resolved in favor of initial placement order.
    A pop may be moved to an adjacent territory (OR) from one water-side territory to another.
    Create Cities – Can be simultaneous; 6 pop must occupy the territory first, and are removed from play when the city is formed.
    Census – Count how many free population each player has (cities don’t count)
    There must be 2 free pops for every city. If there is not, the player loses 5 points.
    Resolve Battles – can be simultaneous (See “Battles” below)
    Starvation Effects – Remove any population beyond what the territories can support

    Play lasts 10 turns, or until any player has no points or no pops.

    Battles: Two opposing populations will cohabitate if, when combined, they do not exceed the population limit of the territory they are in.

    Example: A territory with 4 max pop may be inhabited by 2 green and 1 red and 1 blue, with no battle resulting.
    If the combined population exceeds the max pop rating for a territory, population is subtracted from play until the combined population is again acceptable. The populations are reduced one at a time, starting with the smallest population group and continuing in order of population group size.
    Example A: 4 red and 3 blue occupy a size 3 territory. After battle, 2 red and one green remain.
    Example C: 5 red and 2 blue occupy a size 3 territory. After battle, 4 red remain, but then the one extra red is removed at the end of the turn.




    so those are the rules, now i have to make the map , show land and bodies of water. just make a creative map. thing is i dont have a clue about how to do this. How do i use ASCII? what im trying to say is, im daft, incompetent and under a time limit lol, where do i start?


    thanks

  2. #2
    customized user title!
    Join Date
    Mar 2005
    Posts
    24
    For *nix based systems you can use ncurses or curses. I'm not sure about Windows though.

    You can google plenty of ncurses tutorials and you can check out the source code for rogue-like games.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Example map, the + are land, and the ~ are the waves of the sea
    You could use say ^ for mountains, dots(.) for deserts and * for forests.
    Code:
    ~~~~~~~~+++++++++++++++++++++++++
    ~~~~~~~~~++++++++++++++++++++++++
    ~~~~~~~~~~~++++++++++++++++++++++
    ~~~~~~~~~+++++++~~~~+++++++++++++
    ~~~~~~~~+++++++++~~~~~+++++++++++
    ~~~~~~~++++++++++~~~~++++++++++++
    ~~~~~~~~+++++++~~~~~~+++++~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Create using a text editor.

    Read that file in when your program starts.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User samGwilliam's Avatar
    Join Date
    Feb 2002
    Location
    Newport
    Posts
    382
    You can't knock good ol' text mode games. It's how I cut my programming teeth in my teens.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    <mis-spent youth>
    Rogue
    </mis-spent youth>
    Classic game, very playable.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Beginning Game Programming Type Books
    By bumfluff in forum Game Programming
    Replies: 36
    Last Post: 09-13-2006, 04:15 PM
  2. Replies: 11
    Last Post: 03-24-2006, 11:26 AM
  3. Graphics Programming :: Approach and Books
    By kuphryn in forum Windows Programming
    Replies: 4
    Last Post: 05-11-2004, 08:33 PM
  4. IDEA: ASCII graphics engine
    By ygfperson in forum Contests Board
    Replies: 5
    Last Post: 09-30-2002, 06:10 PM
  5. Graphics Devices and Cprintf clash
    By etnies in forum C Programming
    Replies: 6
    Last Post: 05-09-2002, 11:14 AM