Menu

Tree [898b09] master /
 History

HTTPS access


File Date Author Commit
 build-helper 2011-01-21 Melvin Melvin [515390] Merge branch 'master' into hidden_info
 components 2011-03-20 Niels Thykier Niels Thykier [898b09] Addedd INodeList as a simplier version of an IN...
 graphs 2010-03-08 Niels Thykier Niels Thykier [a71640] Added suggestion for model-player interaction.
 old-src 2011-01-13 Melvin Melvin [5ba3ed] Merge branch 'master' of ssh://thyvin.git.sourc...
 resources 2011-03-23 Melvin Melvin [198ca2] The GoFish game's resources (images of cards).
 scripts 2010-02-17 Niels Thykier Niels Thykier [274ec8] Compiler:
 src 2011-03-11 Niels Thykier Niels Thykier [302ec0] Moved some old net Classes into Thyvin game whe...
 .gitignore 2011-01-10 Niels Thykier Niels Thykier [2420c4] Merged .gitignore files
 LICENSE 2011-01-26 Melvin Melvin [79b75d] Merged master into hidden_info.
 LICENSE.ATTRIBUTION-3 2011-01-11 Melvin Melvin [08ba5a] Added license files.
 LICENSE.CC-BY-SA-3 2011-01-11 Melvin Melvin [08ba5a] Added license files.
 LICENSE.GPL-2 2011-01-11 Melvin Melvin [08ba5a] Added license files.
 LICENSE.GPL-3 2011-01-11 Melvin Melvin [08ba5a] Added license files.
 LICENSE.MIT 2011-01-11 Melvin Melvin [08ba5a] Added license files.
 README 2010-09-03 Niels Thykier Niels Thykier [c3704c] Removed Multiplay protocol support.
 build-helper.xml 2011-01-21 Melvin Melvin [515390] Merge branch 'master' into hidden_info
 build.xml 2011-01-21 Melvin Melvin [515390] Merge branch 'master' into hidden_info
 component.xml 2011-01-21 Melvin Melvin [515390] Merge branch 'master' into hidden_info
 update-component-pot 2011-01-13 Melvin Melvin [5ba3ed] Merge branch 'master' of ssh://thyvin.git.sourc...

Read Me

This document describes how to compile and start the sample game built
on top of the Thyvin game engine.

Dependencies
============

To compile the game and the engine you will need the following
tools and libraries:

  * cup (>= 0.11a+20060608)
  * jflex (>= 1.4.3)
  * ant (>= 1.8)
  * jogl (>= 1.1.1)
  * JRE 1.5 or 6
  * JDK 1.5 or 6 [for compilation only]
  * java readline (>= 0.8.0.1) [for optional text support]
  * junit (>= 4.8.2) [for optional unit testing]


It is quite possible earlier versions than listed; these are merely
the versions used during the development. On a recent Debian-based
(incl. Ubuntu) system you can get all of the needed libraries and
tools by installing the following packages:

  cup jflex ant libjogl-java default-jdk libreadline-java junit4


Compiling everything
====================

To compile simply run ant and it will compile the entire contents of
the game and the engine into dist/thyvin.jar except tests.

There are a number of properties together with their default values
that can be used:

  The location of various jar files during the build/testing:
    classpath.build.cup="/usr/share/java/cup.jar"
    classpath.build.jflex="/usr/share/java/JFlex.jar"
    classpath.build.jogl="/usr/share/java/jogl.jar"
    classpath.build.readline="/usr/share/java/libreadline-java.jar"
    classpath.test.junit4="/usr/share/java/junit4.jar"

  The location of various jar files at run time:
    classpath.run.cup="cup.jar"
    classpath.run.jogl="jogl.jar"
    classpath.run.jogl.glue="gluegen-rt.jar"
    classpath.run.readline"libreadline-java.jar"

These properties and a few others can be overriden to fit your system
and your needs. See the ant documentation for how to set these
properties.


Compile without $feature
========================

Currently there is no support in the build file to compile the project
without a given feature. The easiest way to build without a given
feature is simply to remove its source.

  * java readline - remove src/org/net/mp/TextClientReadlineSupport.java
  * jflex/cup     - possible at the moment without modifying build.xml
  * junit4        - do not run the test ant target.


Running the game
================

The game can be run with the command:

  java -jar dist/thyvin.jar

The game needs JNI libraries of jogl to be locatable by the JVM. This
can be done by passing -Djava.library.path=/path/to/folder/ to the
java command or use of environment variables such as LD_LIBRARY_PATH.

Note that on openjdk-6-jre on Debian-based systems will automatically
find the jogl JNI libraries if you install the distribution versions
of these packages (default-jre/default-jdk and libjogl-java).


Starting a new game
===================

When starting a new game you will be presented with a "Lobby" with two
"drop down" boxes, two join buttons and a text-field. The drop down
boxes list the available players which are:

  "Open" - no player here yet.
  <username>/Human - a human player
  AI: Standard - the AI player "Standard"
  AI: Influence - the AI player "Influence"

The lobby is generally not a very good part of the game and
unfortunately you have to work around its flaws and lack of
development. Always make the player on the left join first before
joining as the player on the right. Note it is not possible to
chance the names of the players - known limitation.

The text field is the name of the map you want to play. Type in the
name of the map. All maps are placed in tmp/stratac/rooms/ in the
resource folder and are called room_<number>_units. As an example
map 7 is called:

  tmp/stratac/rooms/room_7_units

Since this is incredibly boring to type; the game currently translate
$<number> to tmp/stratac/rooms/room_<number>_units for you; so for
now you can just write $7 instead of tmp/stratac/... and so on.

Note these have to be relative to the resources folder and if you
modify or create a map you may have to rebuild the jar unless you run
the game from the unpacked source root.

Playing the game
================

The goal is to either eleminate all enemy units or have the most
points when the time is up.

Points are earned by controlling "monuments"[1]; in case of a
tie, you earn additional points for every 50 gold you have
available (rounding down). Gold is earned by controlling
"resources"[2].

Gold can be used for a hiring new troops at a fortress[3] or
be used to pay for research; which grant you some advantage.

Fortresses cannot be captured by the enemy; nevertheless you cannot
hire units on a fortress if there is a unit on it (regardless if it is
a friend or a foe), so it is possible to prevent your opponent from
training new troops. To hire a new unit, select one (or more)
fortress(es) and click "Produce units". Each unit costs 10 gold.  Note
that new troops cannot move in the same turn they are built.

To research, select a technology from the drop-down box and click
"Research". You can read more about a technology by selecting it from
the drop-down box and click "Info". Technologies each have a price and
a research time. The research time is the amount of turns it takes to
complete the research; however a turn only counts if you have enough
gold to pay the price at that turn.  Note that the research cost is
deducted after calculating your earnings, so it is possible to pay the
research cost even if you do not have enough gold on you, as long as
you capture enough resources to pay when your turn ends.

You cannot directly attack an enemy; instead you move your troops next
to the enemy and then when your turn ends all units adjacent to an
enemy will attack the enemy. Each unit spreads its damage to all
enemies it can reach and the damage is based on the amount of health
it has left. It is therefore very effective to surround your enemies.
When the health of a unit drops below 500, it flees from combat.

If a unit survives the combat phase and it ends it turn on a resource
or an monument, it will capture it. You will receive the bonus from
owning it in the same turn. These buildings remain under your control
until an enemy takes them from you.

When you are done moving your units, buying units and planning your
research you click "End turn" and watch the enemy do their turn.

[1] Looks like a church with a green roof.

[2] Looks like a house with white walls.

[3] Looks like two towers with a wall between them.


Mini-FAQ
========

Q: Who is who?

The red player is team 0 and is always the player on the left hand side
in the Lobby. Unsurprisingly that makes the blue player team 1 and the
player listed on the right hand side in the Lobby.

Q: Why do my units flee when they have 500 or less Health left

Because they are bloody cowards!

Q: What does "Influence map" do?

It makes pretty colours on your map that displays you and your enemy
"area of control" when you enabled the map. We used it to debug the
influence mapping algorithm used behind the AI: Influence player.  You
can disable the map by clicking the button again.

Q: What does the text-field in the bottom do?

It is a small "terminal"-like control system; it is possible to do
every thing the graphical interface does via commands. Quite awesome
in fact. It has a help command to list all the commands it can and 
help <cmd> gives more information about the command.

Here is a fun little thing you can try:

  selection-type 4
  highlight 0 1 2
  selection-type 5
  highlight 3 4 5 

Yeah, we know - it is totally awesome. To undo it run:

  selection-type 4
  highlight
  selection-type 5
  highlight

Note not all commands can be used, since some of them needs to be run
before the game starts (e.g. start, join, debug-ai). They are only
usable in the headless version of the game, but that is rather
unplayable.

Also note that some commands, if used wrong will kill your game due to
lack of proper error handling.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.