Code Monkey home page Code Monkey logo

hydra-battles's Introduction

Hydra Battles

RTS (real-time strategy) game for 2 players, with some twists. Players gather resources and attack the other player, also drawing lines to hinder the other player movement.

The compiled game versions are available on

http://michaliskambi.itch.io/hydra-battles

From here you can download the source code (compile using Castle Game Engine, http://castle-engine.sourceforge.net/ and it's build tool: https://github.com/castle-engine/castle-engine/wiki/Build-Tool ). Also, this document is right now the only game manual, and contains instructions and hints how to play (and win!:).

Playing

Both players play on the same screen (no scrolling). Each player has 10 seconds for move (it is also possible to configure the game in "simultaneous" playing mode).

The game can be played on PC (each player then takes the mouse for 10 seconds), or Android (two players drag on a single touch screen; multi-touch works, so drag as you like).

Buildings

Build buildings by dragging them from the sidebar.

  1. Headquarters (HQ). Cost 1000 wood. Can train a peasant, for 2 wood. You have to build HQ before placing other buildings on the map.

  2. Barracks. Cost 10 wood. Can train a warrior, for 6 wood.

At the beginning, you do not have any buildings or units. Your only move is to build a Headquarters (drag the "Build HQ" icon), and then train a peasant (click on HQ). Then you can instruct the peasant to gather wood, and eventually you will be able to train more peasants or build barracts (that in turn will allow to train soldiers).

Units

Train units by clicking on a building (HQ train peasants, barracks train warriors).

  1. Peasants. Send them to the forest, to cut down trees, to gather wood. Cutting down a tree increases your resources. The "hemp" trees are higher quality wood (you gain 2 wood for a tree), other trees are lower quality (you gain 1 wood for a tree).

  2. Warriors (knights for human, minotaurs for monsters). Send them to attack other buildings or units. Kill warriors or peasants of other player.

The ultimate game goal is to destroy your enemy: kill all his units and destroy his buildings.

Commands

When you command a unit (a peasant or a soldier) to go somewhere, you draw a line on the screen. This line cannot be crossed by other commands. This way you may make it difficult for other player (and yourself) to make other commands (to gather resources or attack you).

By drawing correct, long lines, you not only direct your units, but also make it more difficult for other player to win. Line drawing works very nice with a mouse or a multi-touch touch screen (like on Android).

Level editor

Editor is included.

Editor keys:

  • E - on/off editor
  • S - save edited maps to file
  • arrows keys - move editor cursor
  • use the names of props (see data/game.xml for editor_shortcut), like "t" for tree, 1-8 for mountains
  • 0 - random mountain
  • space - clear
  • N - random unit (npc)

To design a proper map, place only "normal" neutral props on a map. Do not place NPCs or player buildings (headquarters, barracks). The code is not ready now to handle them Ok in initial positions.

Generally useful keys:

  • F5 - save screen
  • G - on/off grid

Author

Design and programming: Michalis Kamburelis

Created during a 48h gamejam on https://www.facebook.com/tsgcompo

Using Castle Game Engine, http://castle-engine.sourceforge.net/

Graphics: isometric graphics, using assets mostly from http://opengameart.org/ . See AUTHORS.txt file for links. See sources on https://github.com/castle-engine/hydra-battles

hydra-battles's People

Contributors

michaliskambi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.