

                             G R A V I T Y  W A R S
                             ======================

                                      v1.0


             "A Gravity Force clone for the Linux operating system"

                            THIS PROGRAM IS FREEWARE!


                                    Credits:

                         ...Programming by Sami Niemi...

                        ...Graphics by Pr Johannesson...

                     ...Title picture by Mattias Johansson...


    INTRODUCTION
    ------------

	
      Gravity Force is based on Gravity Force, one of the greatest games
   for the Amiga. This version is a little different, with a much higher
   resolution, and better graphics.  It also includes  some new features
   like water, exploding doors, bonus objects, fans (ie. wind), and some
   other special effects like exploding bullets, and splashing water..
   
      Gravity Wars has been developed from scratch by Sami Niemi in June
   1995.  The game comes with a DOS based level editor which is coded by
   Pr Johannesson.  The level editor  hopefully means a longer lifespan
   for the game,  since everybody can now design  their own levels after
   completing these.  I've also included  a C source for  converting the
   editor  output to an  object map.  More about  that in the  technical
   section.  The game also gives a level code, so you can start from the
   last level.

      The goal of the game is to  gather all the keys in  a certain time
   with limited fuel. After all the keys are gathered,  a stargate opens
   to the next level. You have only three lifes  to complete  the  level
   with. To  encourage you, I can tell you  that I've completed everyone
   of the levels with only one life...  There are  also different  bonus
   objects in the game.  Some of them give you just extra points, others
   give you extra life, fuel, and time.




    REQUIREMENTS
    ------------

      A 486+ running Linux (You could try it on a 386, but be aware.. It
   will flicker. I could make a 386 version with the score bar in a spl-
   it screen, but I just don't have enough time..). A graphics card whi-
   ch works with the SVGALIB. A nice keyboard...
 


    USAGE
    -----

   GravityWars [code-to-a-given-level] [beam-adjustment]

     You'll receive the codes after a completed level.  The beam-adjust-
   ment  is a  number somewhere  between 0 and 30000, which  adjusts the 
   rasterbeams position while drawing the graphics. It should be  higher
   on fast computers, and lower on  slow ones (If it's wrong, the screen
   might flicker a bit). The default is 5000.

     I've used the same keys as Doom,  ie. the left/right arrowkeys turn
   the ship, the forard arrowkey pushes it forward,  and CTRL launches a
   bullet. ESC kills the game.The linux console switching keys also work
   (atleast with SVGALIB 1.2.6) so you can pause the game by throwing it
   into the background by pushing Alt-F1. You shouldn't start any progr-
   ams that use the whole videomem, because that seems to clear to Grav-
   ityWars screen.  I have allocated the whole videomem, so it shouldn't
   happen.. Bug in svgalib?   


    POLICY
    ------

     The programs  are freeware, but the  graphics are  copyrighted. The 
   game was just put together for fun, and because I haven't really seen
   any quality  games for Linux  yet. (Ofcourse this  one would've  been
   even better if I didn't have to go into the military  service in only 
   two weeks). There are no registered versions of Doom for linux..

     We would  really appreciate  if we could get some response from you
   through snailmail, or something, the email is just so very temporary.
   If you like the game, the graphics, or something else, send me or Pr
   a postcard of your city or something! It'd be really fun!




    TECHNICAL 
    ---------

      The game uses a 640*1440 256 color virtual screen, which leaves no
   space for a doublebuffer.  The graphical mode is a  normal NON-Linear
   640*480 screen. I decided to use a NON linear mode(What a sacrifice!)
   to make it possible for people with NON linear gfx cards to also play
   the game. Unfortunately, the NON linear memory is more than ten times
   slower to access, and with it's complex structure even slower to wri-
   te to! (and a LOT harder to code a fast 'blitting' routine for!).

      Because of the  slow MEM->VIDEOMEM copying,  it would've been  too
   slow to do a real hardware-software  scrolling, with a double buffer.
   This  means that everything  has to be drawn to the  screen while the
   rasterbeam is far away from the drawn object.. Problems.. As you mig-
   ht know - this is not fully possible...  Atleast not on any slow con-     
   figurations. Sorry about that, but you have to admit that playing the
   game on a standard VGA screen would've been boring compared to this..

      As you know, Linux is a multitasking OS, which means  that someti-
   mes the OS just wants to do it's little disk access, and 'gives a da-
   mn' about eventual undubbelbuffered games running on it.. (No offence
   on the OS!  I love it,  even though it seems like  it's running a bit
   unevenly, with occational peaks. Any comments from the OS development
   team?) This means even more problems for an undubbelbuffered game, so
   to get the best results (smoothness, with no flicker), you should use
   a fast computer! There is also a  parameter that'll change  the  beam
   tracking position. The default value is 5000. If you have a fast mac-
   hine, you should use a higher value, otherwise same or smaller. 

      The game hasn't been through much beta testing, since I just don't
   have time to supervise the hole thing. My military service in Finland
   starts in 12 days... This also means that the eventual second  better
   version won't be  released for a while,  and that the bugs  won't get
   fixed unless someone living in HELSINKI (where I'm  doing th e manda-
   tory service) with a nice Linux machine let's me use it.. ;)




   
    THE LEVEL EDITOR
    ----------------

      The level editor saves a map containing internal an external infor-
   mation about the level.  The last part  contains the information  that 
   the  Converter.c reads  and processes.  That data contains 900 (20*45)
   block numbers.  The blocks are  contained in the  data/blocks.gw in my
   own raw image format: 

      768 bytes - first palette
      768 bytes - second palette
   254080 bytes - data

     data: 
        x size      - 320 pixels
        y size      - 792 pixels
        block_size  - 32*32, separated with a grid to the north-west.
              
        (This means that there are four 320*198 screens attached
        to eachother, with 32*32 blocks starting from the (1,1)
        position, not from (0,0), due to the grid) 

     Some important blocks are: (You'd have to use the same colors, be-
   cause of the way the collision controll works.. Ofcourse you can have
   a different palette.)

    36-38        background

    18-20        Start

    41           End

    45-50        Ship Explotion

    51           Key

    54,60,61     Game Over

    67,76,85     Out Of Time

    68,69,70     Level, Get Ready
    
    67,105,154   Out Of Fuel
    
    108,109,117,
    119,120,122,
    127,130,136,
    139,144,146,
    147,153      Congratulations message

    112-116      Water Splash

    123-125,
    132-134,
    141-143,
    150-152      Fan Anims   

    157-161      Ship Implotion 
    
    170          Water Key

    204          Water Background

    207          Ship with thrust
    208          Ship
    
    
    So, if you decide to change the graphics to the game, you have to keep
  these objects  in these blocks, and change  the Converter.c,  so that it
  adapts to the changes. IMPORTANT!!!  THE GRAPHICS IN THIS GAME ARE COPY-
  RIGHTED, YOU ARE NOT ALLOWED TO USE THE GRAPHICS IN ANY OTHER GAMES. But
  you are allowed to replace the blocks.gw file and write your own levels,
  or maybe a new Linux level editor. Only thing you have to do is to noti-
  fy that, when you distribute the files.You are not allowed to change the
  titlepicture without asking for permission from me (Sami Niemi) first.If
  you feel like your titlepicture, levels,  or graphics is better,  please
  send it to us!

    The level maps consist of three things:

    1. level??.gfx, which contains 900 (20*45) block numbers starting from
       0, meaning the upperleft corner of the blocks.gw
    
    2. level??.obj, which contains the objects, water, red walls,  etc in-
       formation. Check out the Converter.c source.  The only things  that
       are not handled by the converter are the wind motions:

        Q  W  E   If the ship flies into a block with one of the letters, 
         \ ^ /    it'll be accelerated into the given direction. The Con-
          \|/     verter places an 'S' to the place  where the fan is ro-
       A<--o-->D  tating, so the designer can edit the file easily with a
          /|\     text editor.
         / v \
        Z  X  C

    3. level??.dat, which consist of the remarks  on the level, amount of
       fuel, and time at the start, and after explosions.  It also conta-
       ins the animation information:

       Starting with 'anim', followed by: (numbers)

       - X coordinate,
       - Y coordinate,
       - Start frame multiplied by eight,
       - Stop frame multiplied by eight,
       - Actual frame multiplied by eight,
       - Speed (1,2,4,8,16,32,...)  Small numbers are slow,  and require 
                                    less processor power.


       Current animations consist only of these: 
       (plus different explosions)

       animation           start   stop 
       -----------------   -----   ----
       Fan blowing down    984     1007
       Fan blowing left    1056    1079
       Fan blowing right   1128    1151
       Fan blowing up      1200    1223

    Well, I hope this  is enough of information  for y'all to get star-
  ted..  I hope to see more levels,  a new editor,  and why not a level
  to post-script converter too.. So you could print out  your favourite
  levels. I don't have time to code anymore on the game, and the source
  is not really ready for release, so just hang on.. I'll be baeck..



       

    TO DO, BUGS
    -----------

   Oh.. There are thousands of things to do.. The best thing is that the
 source supports all these features, me and Pr just haven't had time to
 implement/draw all that.  The source supports for  example two players,
 and I've coded working network  routines for other projects already, so
 it wouldn't be hard, it also supports things like a magnet object which
 pulls the ship towards itself etc.. If you'll get me encouraged enough, 
 I might write a new and better version,  and try to get the double buf-
 fering to work somehow...





    THANKS
    ------

 - Linus Torvalds, for the kernel.

 - Harm Hanemaayer, for the svgalib.

 - All the other people behind the Linux, and the GNU software.





   CREDITS
   -------

 - Sami Niemi:        Coding, Design, Graphics, Levels

 - Pr Johannesson:   Graphics, Design, Levels

 - Mattias Johansson: Title Picture

 - Paul Fritzsche:    Levels





             
    CONTACT ADDRESSES
    -----------------




        Sami Niemi (Coding, level design)
        ---------------------------------

          Address:      Sandvgen 4b
                        374 53 Asarum
                        Sweden

          Voice:        +46-454-84704
          Fax:          +46-454-84992

          email:        sniemi@kuai.se
          WWW:          http://hofors.kuai.se/~sniemi
          fido:         2:200/701.8






        Pr Johannesson (Graphics, level design)
        ----------------------------------------

          Address:        Knpparestigen 6
                          374 51 Asarum
                          Sweden.
    
          Voice:          +46-454-87249
          email:          madster@portal.gate.vhc.se






        Mattias Johansson (Raytraced title picture) 
        ------------------------------------------

          FAX:            +46-8-330892
          BBS:            +46-8-54062686
          email:          mjoh@kuai.se



