                   PEACEFIGHTER - Fight for peace

                        A Speehack 2005 game

                            by Miran Amon

							 version 1.0


Created (almost) from scratch in 72 hours by Miran Amon for the 2005 edition of
the Speedhack game making competition. All code except for the basic framework,
as well as all game content was created between 12:00 UTC, August 12 and 12:00
UTC, August 15 2005!

Story:

War is raging outside. In order to restore peace you must survive the battles
and kill everything that moves. Only when there is no one left in the world
but you can there be peace. All battles take place underground in tunnels
and caves. This environment is extremely volatile as tunnel walls constantly
cave in and new ones are built in their place. So every time you go into
battle you are faced with a completely new, seemingly random environment
filled with bloodthirsty enemies who are out there to get a taste of your
blood. But don't worry, there are many useful items scattered throughout the
caves which will help you prevail.

Controls (redifanable in the menus):

   UP ARROW   walk forward
 DOWN ARROW   walk back
 LEFT ARROW   turn left
RIGHT ARROW   turn right
   ALT+LEFT   step left
  ALT+RIGHT   step right
    CONTROL   fire
        TAB   next weapon
      ENTER   confirm, continue
        ESC   back, cancel
        F12   take screenshot

Weapons:

     Pistol   medium rate of fire, medium accuracy, low damage
    Shotgun   slow rate of fire, low accuracy, medium damage
      AK-47   high rate of fire, high accuracy, medium damage
   Grenades   slow rate of fire, low accuracy, high damage
    Rockets   slow rate of fire, medium accuracy, high damage
   Lasergun   slow rate of fire, high accuracy, high damage

Items:

health pellet   increases helath by 1, goes up to 200
        heart   increases helath by 25, goes up to 100
  armor shard   increases armor by 1, goes up to 200
       shield   increases helath by 25, goes up to 100
      bullets   pistol bullets, 24 in a box, can carry up to 200
       shells   shotgun shells, 16 in a box, can carry up to 100
   AK-47 ammo   bullets, 24 in a box, can carry up to 400
     grenades   pack of 10 grenades, can carry 50
      rockets   pack of 10 rockets, can carry 50
        cells   energy cell pack with 15 units of enery, can carry 100

Winning:

In order to win the game all enemies must be dead. You don't necessarily have
to kill all of them, but most likely they won't kill themselves.

Contact:

You can contact me at: miran.amon@gmail.com
Updated versions as well as binaries may become available in the
future at http://ferisr5.uni-mb.si/~ma0747.

-------------------------------------------------------------------------------

SPEEDHACK 2005 info:

Rules and game compliance to them:

 >  1. GENRE REQUIREMENTS
 >
 >    Survival
 >
 >    The objective of the game must be to stay alive. Ideally there will
 >    be difficult situations that must be overcome. The game could be
 >    unbeatable, only ending when the player dies, or it could have an
 >    achievable endit doesn't really matter :). As long as staying alive
 >    is a priority...
 >

 The game is clearly survival oriented. You must survive in the arena as long
 as possible. The ultimate goal of the game is to achieve world piece by
 being the only person to survive the war.

 >
 >  2. TECHNICAL REQUIREMENTS
 >
 >    There are two technical requirements:
 >
 >     1. Make it a Classic
 >
 >       You must implement at least one of the following:
 >         * Maximum of 320x200 game resolution and maximum of 16 simultaneous
 >           colors. For compatibility reasons, the screen resolution may be
 >           whatever you want to use. For instance, you could use a 160x120
 >           internal resolution that is stretched to 640x480. If your graphics
 >           are scalable, it is fine to include higher native resolutionsbut
 >           the default settings must be no higher than 320x200 and the game
 >           must be designed to play well at that resolution.

 The game runs at 320x200. For convenience and compatibility reasons it also
 supports modes where the screen is stretched. It can run in a 640x400 or a
 1280x800 window (and 320x200 of course) or in fullscreen modes with screen
 resolutions of 320x240, 640x480 and 1280x960. In the first the game screen
 is simply stretced to fit the window, in the latter it is stretched to fit
 the nearest multiple of 320x200 with black band at the top and bottom of
 the screen.

 >
 >         * A palette of six gray scale colors. You must use a single hue
 >           with up to six different combinations of saturation and brightness.
 >           Don't worry, we aren't going to have the fashion police analyze
 >           your colors. The key is to use a single color, like all blues or
 >           all greens or all grays.

 The game uses a palette of 6 colour, all with the same hue and saturation
 but varying brightness. Hue and saturation as well as minimum brightness
 and contrast (difference between the darkest and brightest shade) can be
 defined in the game menus.

 >
 >         * Four button joystick with no mouse or keyboard support. The only
 >           way to control the game is via a NES style joystick: start, select,
 >           A, B. Only two of the buttons can be action / core game play
 >           buttons. You may (and should) emulate the joystick via the
 >           keyboard. The mapping is up to you, but the arrow keys could be
 >           used as the digital pad, CTRL and ALT for the fire buttons, and
 >           Tab and Enter for select and start. For example, if you have a
 >           high score list, the user must enter his name by selecting a
 >           letter via the cursor keys and then pressing a fire button to
 >           select it.

 I did not imeplement this rule.

 >
 >     Again, you only have to implement one of the above restrictions. If you
 >     want to be adventurous, try all three.

 I implemented two out of the three rules.

 >
 >     2. Randomness
 >
 >       Games that play exactly the same every time quickly get boring.
 >       Considering you only have 72 hours to complete your game, you won't
 >       have much time to design huge sets of levels.
 >
 >       Some part of the game must be generated randomly and be different
 >       every time you play. It should noticeably affect the game (like a
 >       randomly generated landscape or maze), but it could be as simple as
 >       a random color scheme.

 The game level is always generated randomly. Also weapons, ammo and other
 powerups are placed randomly. The initial position of the player and each
 enemy, as well as their initial orientation is random. Enemies move in
 random directions when they have nothing better to do. Bullets are fired
 in the direction which is varied randomly, depending on the weapon. There
 are probably one or two more things that are random, but that's all I can
 remember right now.

 >
 >
 >  3. ARTISTIC REQUIREMENTS
 >
 >     There are two artistic requirements:
 >
 >     1. Dichotomy
 >
 >       Dichotomy is defined as "division into two usually contradictory
 >       parts or opinions." Incorporate opposites into the game.

 Goal of the game is to kill in order to achieve peace. I hope that's
 contradictory enough.

 >
 >     2. World Map
 >
 >       Implement some type of world map, if applicable to your game. You may
 >       opt out of this rule if your game has no concept of location. However,
 >       if you think hard enough you should be able to come up with something.
 >
 >       It could be in the street-fighter style where you are shown flying to
 >       the next country. You could also have a world map that allows the
 >       gamer to pick from a list of challenges. If the game has a linear
 >       path, you could show how far the gamer has progressed.
 >

 A small map of the entire game worl is displayed in the top right corner of
 the screen during gameplay.

 >
 >  4. BONUS RULES
 >
 >     There is one bonus rule:
 >
 >     1. Act of IP
 >
 >       You may opt out of one other rule if you choose to implement
 >       networking. It must dynamically affect the game play. Simply having
 >       your entry download a static file or doing something trivial does not
 >       count. If you have any questions, ask before you get working on it!

 I did not implement Act of IP.


Compiling the source:

The game was developed with Allegro 4.2.0 beta 3 and DUMB 0.9.2. Included is
a makefile for building a statically linked binary with MinGW. Allegro and
DUMB can be found at the following sites:

  Allegro   http://alleg.sourceforge.net
     DUMB   http://dumb.sourceforge.net


Note: I used my game framework written for the new Allegro 4.2.0 demo game
competition. I hope that's OK. All other code was written during this
Speedhack weekend.


-----------------------------------EOF-----------------------------------------
