                 **********************************************
                 *                                            *
                 *     _______    _                           *
                 *    |__   __|  | |                          *
                 *       | |_____| |___ _ ___ _ ___ _   _     * 
                 *    _  | |  _  | '_  \' _  \ '_  \ | | |    *
                 *   | |_| | |_| | | | | | | | | | | |_| |    *
                 *   |_____|_____|_| |_|_| |_|_| |_|\__' |    *
                 *                                 __  | |    *
                 *    ______               _       \ \_| |    *
                 *   |   _  \             | |       \____|    *
                 *   |  | \  \      _     | |                 *
                 *   |  |_/  /     (_)    | |     _ ___       *
                 *   |      /  ___  _  __ | | ___| '___|      *
                 *   |  |\  \ /   \| |/ _'  |/ _ | /          *
                 *   |  | \  \| O || | |_|  |  __| |          *
                 *   |_ |  \__\_,__\_|\___'__\___|_|          *
                 *                                            *  
                 *     BY MAD4DOS (c) 1999 Jason Earl         *
                 **********************************************


                         A Game Produced on the ... ...

       ***************************
       *                         *
       * MAD4DOS Platform Engine *
       *_________________________*
       ***************************


   By Jason Earl (c) 1999
   ______________________

This game is freeware on the following conditions

* This game is copyright, it must retain credit to me, Jason Earl and the
  Mad4DOS trademark for all new levels and versions created.
* All new copies of this game must also contain the original version with
  all of its original files unchanged.
* This game must not be altered for distirbution by anybody without my notice
  Although new versions can include credit to their modifiers.
* This game must not be distrubuted for money. THIS IS FREEWARE


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

   Impotant

This guide assumes you have some reasonable knowledge about computers or/and
simple programming. Mad4DOS is not responisable for any damage

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


 ________

 CONTENTS
 ________

1. About MAD4DOS
2. About Johnny Raider
3. Computer Spec needed
4. Technical stuff (level maikng etc)
5. Credts

1. MAD4DOS
__________

 Mad4DOS is a computer trademark of Jason Earl, who programmes 
IBM PC's and builds them as a hobby. My software is made in QuickBASIC 4.5 
for MS-DOS, hence the name, although I will continue to use DOS even when 
Windows NT5 / 2000 comes out and removes the DOS operating system (although
it will probably have a DOS shell in windows) as it remainds people the good
old days of DOS where everything was a damn fag to get things to work but
never used to crash like the newer 32bit versions of Windows. I am only 14 
years of age and have being programming for about 2/3 years.

2. About Johnny Raider
______________________
 Johnny Raider the name given to my platform game as it is based on
and Johnny(condom) that shoots viagra. Do not ask me why it is just a 
stupid idea I had one day when making the engine for this game. You would not 
guessed this when playing the game because of my poor graphics! My aim 
when making this game was to make something based on my first computer I had 
3 years ago; the Amstrad CPC 6128, a computer so crap it was cool. This 
computer was the way I got forced into programming. By learning programming 
to be able to load games using 'RUN ...'. I enjoyed this computer a lot as 
there was nothing else that I could afford at the time! The inpireation came 
to me that I should make a game based on 'TUBARUBA' a really cool platform
game for my AMSTRAD. I was very impressed that TUBARUBA was so powerful, it
wold run so smoothly on this 8bit, 2Mhz machine with 64Kb of RAM. Even more
it was such a large game with amazing graphics (160 x 200 x 16 colors) that
was the best the damn thing could do. Even more this whole game was only 32Kb
in size! The game had music and lots of cool Fx like when you kill something
they explode like lemmings in the colors the baddy was made from, when you
died you would walk to the centre of the screen and lie dowm and some death
tune would play and much more.
 My other aims of this game was to make something that other young
programmers could use as an top notch example for their games, espcially
for QBASIC/Quick Basic programmers. It contained code from things
that I had downloaded from QB45.Com and changed the code for the games
need. I manages to learn new techniques and expand my knowledge about the 
way things worked and about assessbly code. For example BMP
loader told me how to create bitmaps and then load them into QB with the
ability to save the palette and etc. It told me about how off screen 
buffering worked by poking everything into a 64Kb array and coping it to
&HA000:0000 so I can buffer screen 13 graphics to use 256 colors. I learnt
how to directly use BLOAD and BASVE to make sprites and animations load
30 times faster! These are things you can learn for yourself if you don't 
know.
 Another last thing was to be able to let other people be able to make
levels by making a simple data format for rooms and sprites to work in. This 
means you don't need to know what to everything does in my badly programmed
engine. The data is not stored using DATA commands which can be a fag.
 There are may things that could be improved in Johnny Raider,
including the levels, the engine and certain tweaks. You may change anything
for your personal use but main engine changes must have notice by me if you
want to distrubute it (and still will be freeware after modification). New 
engine updates should be e-mailed to me (NOT COMPILED THOUGH) to 
eggins10@yahoo.com. If you make any new levels that are better than mine then
also e-mail them to me if possible. There lots to change, in this game
that would improve it and things that I could not do because of my lack
of knowledge and experiance (do remember I am only 14), there also may
boundries to QuickBASIC 4.5 that I can not find techniques to get around eg:
640Kb RAM limits, speed matters with the BASIC language, grphics and sound.

3. Spec
_______
 This game is very demanding being a BASIC based game, not all of it
is my fault but I am a very good at REMming everything up in the program and
'long-winded' programming. My advise is to blame MicroSoft for their poor
quality operating systems and the BASIC compiler  which does not make a good
clean job of compiling like most ASM compilers.
 
Spec Needed ...
        A Pentium PC would works best (faster the better) 
 VGA Graphics is defantly needed
 400Kb of Base DOS RAM or more and EMS support (about 512 Kb)

Suported ...
 Joystick
 Sound Card, Sound Blaster ( or Sound Blaster clone) 

 I have noticed this runs reasonably on some 486DX/4 - 100 machines 
though I do not recommend it. I have also noticed that due to the need of
screen buffering in conventional memory a graphics card that has a 32 bit
bus bandwidth works the best ie: VESA and EISA on 486's, PCI local bus on
high end 486's and Pentium and Petium clone computers and AGP for the
Pentium II machines and high end Super socket 7 systems, if your system
runs Windows 95 or later then you will not have any problem. It is
recommendended to run this game under the 'DOS shell in Windows' if you
have Windows 95. The game finds the sound card in Windows 95 and if you
have quite a bit of RAM then loading will be quicker than in DOS. 


4. Technical stuff (level maikng etc)
_____________________________________
 There is a lot to change in this game. you can make new levels,
graphics and music etc I will give all the data fromat info...

How to make a new episode/level
+++++++++++++++++++++++++++++++

 1. Draw in the graphics needed.
 2. Pakage animations
 3. Convert drawing/animations to binary
 4. Make episode info file
 5. Make levels
 6. Test it all

To start with every thing in the game is split into
 Baddies/misc
 Blocks
 Energy
 Cash
 Extras (music/backround/room edges)

 You start by drawing in graphics for the baddies, blocks, backround
energy, and cash. The backround can be a bitmap imported using 
'Bmp Converter.bas'. Make sure the bitmap is 320 x 200 and no more than 75 
colors. The rest is drawn in 'Sprite draw.bas'. Each object like baddies
have a certain size limitation. Baddies are 32x32 in size, blocks are 20x20
in size, cash is 10x10 in size and energy is 20x20 in size. This is typed in
at the ...
 x?
 y?
prompt. so for a 20x20 sprite (eg energy) you would type 20 at the x?
and 20 at y?

 You the go into to editing util. The sreen has a grid, color palette
and x,y co-ordinates and color. you will have color 200 (yellow as shown by 
the 200) and cors 1,1 in the top, right of the screen. When you start to
draw the real sized picture will appear below this. The enlarged version
will be on the grid. The keys are ...

 Movement ...
 
 A   Move left one pixel
 D   Move right one pixel
 S   Move down a pixel
 W   Move up a pixel
 
 File ...
 
 O<filename>[enter]   Open (no file = new)(none existant file=quit)
 S<filename>[enter]  Save file

 Ploting ...
 
 [enter]   Plot pixel in color at cors
 F   Fill (needs boundry in same color)
 U   Undo fill
 M   Delete pixel

 Rotation ...
 
 I,K,L    Rotates drawing

 Color ...
 C[a]/[d]  color change. A=down.D=up.[enter]=use color
 

        Yes, it's nice boring, complicated job but you get the hang of it.
soon. This saves pictures in the DAT format. Draw each animation seperatly 
(32x32 in size)

 OKay, now expect you will have drawn all of your pictures and 
animations, lets move on and compile the animations. This is done using 
'Animation Packer.bas'. This will ask the packed filename. Then how many 
sprites there (num of objects) eneter how many files/animations there are.
then the arraysize, this is how  big the sprite is, this is worked out by
 X times Y + 4 eg a 32x32 sprite would be 32*32+4=1028. here is a list of 
arraysizes
 10x10 = 104
 20x20 = 404
 32x32 = 1028

 Now all you have to do is type in all of the animation filenames of 
each stilol picture in the animation. Note all animations must be of the
dat format

 Now binary-ising everything. Make sure that animations are seperate 
from the sprites (make sure the are in seperate folders). Run the
'pakage to binary.bas' file and type in the locate and wildcards/filename
for the animations/pakage files. Do the same with the sprites using
'sprite to binary.bas'. It will also ask for destination for putting the 
converted files. (no file names needed as it will use filename of DAT/PAK
file)
NB: DRAW2562 WILL MAKE A BIN FILE IN PICS-256\new\bin\
and IN PICS-256\new\

 Each episode will have a episode header file to say how may rooms 
there are etc. Here is the data format

data format version (put '1.11')
rooms in x width (eg '20') 'so 20 and 20 equals up to 400 rooms
rooms in y depth (eg '20') 'because 20x20=400
x position at game start 
y position at game start 
tenrgy energy to start with
quota how mush cash is needed
max dim ... bad blocks cash energy back
pictures folder (binary)
saves folder 'put any thing here, you cannot save thought
the data folder 'level data for rooms

for example

1.11   'version
2   'rx
2   'ry
40   'start x
130   'start y
300   'tenergy total/start
2000.00  'cash needed
10,5,5,5,3  'ingore (max dim thing so just put 5 numeric valules)
2,2   'starting room
pics\   'pics folder
saves\   'saves folder
data\   'data folder

if you have a prototype version of jr call this episode1.dat
this must be in your main JR folder no matter what version.
Check your version of episode1.dat as it may be more upto
date.


The data format ...

 Example .... (from start room of the demo)

"[midi]"
"SONGX",48
"[blocks]"
5
"block220",2
"block920",1
"block720",3
"block520",4
"block320",5
52
1,1,5
21,1,5
41,1,5
61,1,5
81,1,5
101,1,5
121,1,5
161,1,5
181,1,5
201,1,5
221,1,5
241,1,5
261,1,5
1,179,1
21,179,1
41,179,1
61,179,1
81,179,1
101,179,1
121,179,1
141,179,1
161,179,1
181,179,1
201,179,1
221,179,1
241,179,1
261,179,1
1,21,2
1,41,2
1,61,2
1,101,2
1,121,2
1,141,2
1,161,2
301,21,4
301,41,4
301,61,4
301,81,4
301,101,4
301,121,4
301,141,4
301,161,4
301,181,4
1,81,4
21,81,4
41,81,4
61,81,4
81,81,4
241,81,3
221,81,3
121,101,5
141,121,2
"[coins]"
5
"coin1",1
"coin2",2
"coin10",3
"coin50",4
"coin2",5
4
50,8,5,50
60,100,3,20
90,30,2,10
60,100,4,45
"[energy]"
5
"Food1",1
"food2",2
"food3",3
"food4",4
"food5",5
3
21,21,1,110
21,51,2,20
51,51,3,30
"[backround]"
"2"
"[edges]"
"up"
1
121,141
"down"
0
"left"
0
"right"
0
"[bad]"
7
"bad6",1
"bad4",5
"bad3",6
"bad5",7
"bad8",8
"bad2",14
"bad9",15
11
10,50,7,-4,0,-1,8,5,10,20,270,150,0,3,1
90,10,8,-10,0,0,7,0,10,20,270,150,1,5,2
100,13,7,-4,0,-1,1,3,10,20,270,150,2,10,3
150,50,4,-4,-1,-1,5,0,10,20,270,150,0,1,1
80,90,6,-4,0,-1,6,0,10,20,270,150,0,2,1
250,13,4,-4,0,-1,7,0,10,20,270,150,0,5,2
260,50,7,-4,0,-1,15,5,10,20,270,150,2,6,2
90,90,8,-4,0,0,8,5,10,20,270,150,1,7,3
140,13,1,-4,0,-1,8,5,10,20,270,150,0,8,3
190,70,3,-4,0,-1,8,5,10,20,270,150,1,3,2
100,90,6,-4,0,0,1,3,10,20,270,150,2,3,2

here is the listing

"[midi]"
<"filename + entension">,<length of music> 
"[blocks]"
<num>
<"filename">,1
<"filename">,2 'repeated 'num' times (see example)
<object num>
<objext x cor>,<objext y cor>,<sprite num>, 
'repeated 'num' times (see example)
"[energy]"
<num>
<"filename">,1
<"filename">,2 'repeated 'num' times (see example)
<object num>
<objext x cor>,<objext y cor>,<sprite num>,<value (300=max)> 
'repeated 'num' times (see example)
"[cash]"
<num>
<"filename">,1
<"filename">,2 'repeated 'num' times (see example)
<object num>
<objext x cor>,<objext y cor>,<sprite num>,<value (100=1)> 
'repeated 'num' times (see example)
"[backround]"
<"filename">
"[edges]"
"up"
<num>
<x1 cor>,<x1 cor>
'repeat times num
"down"
<num>
<x1 cor>,<x1 cor>
'repeat times num
"left"
<num>
<x1 cor>,<x1 cor>
'repeat times num
"right"
<num>
<x1 cor>,<x1 cor>
'repeat times num
"[bad]"
<num>
<"pakage filename">,1
<"pakage filename">,3 'repeated 'num' times (see example)
<object num>
<objext x cor>,<objext y cor r>,<movement>,<value>,<killable?(0/-1)>,
<shoot?(0/-1)>,<startframe>,<number  of frames - 1>,<left boundary>,
<top boundary>,<right boundary>,<bottom boundary>,<type>,
<animation delay>,<speed>
'repeated 'num' times (see example)

to find out the actions of these things then edit a pre-existant room data
file. You can make the baddies give you energy by making them value
and negive value. The <type> parameter can be 0, 1 or 2. 0 Makes the the
baddies give/take energy. 1 makes baddies give/take money/cash and 2 makes
a resisteance when trying to walk throgh the baddies as well as giving/
taking energy away. For movement the values are 1 to 8. 1 means then
baddies go up until the x cor is euual to the 'up boundry'. 2 is the
opposite(down). 3 is like 1 and 2 but the baddies goes left. 4 is right. 5
is still. 6 is a bounce around the screen within the boundaries. 7 is up
and down bounce. 8 is left and right bounce. <value> is the amount of
energy taken off/put on (or cash). <killable> can be -1 (true) or 0 (false)
which determains whether the baddy can die by shooting or contact. <shoot>
is not used, put any numeric value in for that. the boundaries determain
how far the baddy can move left/right etc. <animation delay> is how long it
takes to animate the sprite (3=normal ani.). <speed> is how fast the baddy
moves. You could do a fire by drawing in the graphics and compiling it, then
set it so it does not die by setting killable to 0, setting movement to 5 or
speed to <0.5, type to 2 and value to a positive vaule, object x cor and
object y cor to top x,y of sprite and delay to 2 or 1 for fast smooth
animation. You can also do big, animated energy or cash pickups (instead of
using "[cash]" or "[money]"). You could even do a friendly baddy who does
not die and gives energy! 

 Now test all of your levels. If you have any black screens then the
room file has a bug, probably the wrong num of parameters for that object
type or something is out of range or a file does not exist. The newer 
versions of JR will have a level editor (though not that good, things will
be easier.)

Start JR by changing changing the command tail if raider.bat to the .dat
file used. eg  raider test.dat instead of raider or raider episode1.dat

 Have fun with making your levels and if you can extend this document 
about level making (as I so damn lazy) then e-mail me at...

eggins10@yahoo.com

 I know this is not the easiest of documentations to understand but
common sence sholud explain what I have not included if fiddle about.

5. Extra credits and tied up knots ...
______________________________________
 Thanks for ...

      BLAST!          A 256 color support, buffering and sprite commands
      QMIDI           A Backround MIDI player
      BMP loader      For BitMaP knowledge and support
      FUTURE library  From Future software, lots of cool stuff from QB45.com
      FONTs           By DarkDread, just quite useful font graphics
      QB-PALETTE      Useful palette stuff

 Most can be found at Qbasic.com or QB45.com

 Though I have used a lot of libraries for this game, The main engine
of the game is totally and originaly mine. I have used these libraries to
give me support and save time to bits I can not program. Though I could have
programmed thing like the font routine and some of the future libary my-self,
it saved time for me as I am so lazy. Though I could never program something
like the BLAST libary because of the assembler involved, I do understand the
way it works and some of the assembler (although it was annotated).
        In my Config, Hiscores and intro page I used the Blast library for
screen buffering and a modified version of the fonts rountine (the fonts are
ones I made up using draw and then writng a program which loads up the 8x8
fonts and readind a pixels color, writing it, and moving on to another pixel
etc ....) I also used the future library for the fading, melting and sound
effects.
        The game reads the command tail for a episode config file and loads
the data. The rooms files describe how things react and lists the files are
loaded using a binary dump method. The game uses BLAST for ficker free fast
animation and QMIDI for music. The Bitmap loader was used to convert Bitmaps
into quick loading screen dumps with palette file. The future library is
used for sound FX and melting etc.

Things to look forward to for Johnny Radier ... (if I ever bother!)
 * Load and Save game support,
 * More levels
 * Easier level editors
 
6. Problems and Bugs

 E-mail me at eggins10@yahoo.com with an subject name like Mad4DOS
        games if you have any problems.

If you are running low on RAM a out of memory command or out of string space
can be annoying. If you disable sound and MIDI this will help as well as
Unloading TSR's and loading stuff into the HMA and UMB in Config.sys (See
DOS manual or Windows Help) If JR crashes the you may need to set up your
sound drivers (see sound card manual) or disable MIDI music and sound.
QMIDI doesn't always like certain sound cards/driver settings.

 Hangs and subscript out of range is normally a bug in the level/
room data files you will have manualy debug them if they are ones that you
have made with the level editor. I find it normally is to do with the
baddies so rem out that line.

****************************
IF YOU ARE STILL RUNNING LOW ON MEMEORY THEN CHANGE THE RAIDER/GO BATCH FILE
TO STOP SOUND AND MIDI TSR's FROM LOADING. IF NOTHING ELSE WORKS THEN MAKE A
BOOT DISK. SEE PART B
**************************** 


 I have tried to get rid of major bugs in Johnny Raider's main Engine
program and I think that the intro is fairly crash proof although I know
there are minor bugs to fix. I hope to do diffrent hardness and levels etc
but this is just an early release. Althouh the levels and that are fairly
naff, the engine is quite powerful and the data formats are fairly simple.
This is one of the reasons I have included the source code for the game.
You may modify the code to suit you but don't put it on public domain
without giving credit to me, although I would like to see the modifications
to see how widly used this game has being. I know that the level editor is
not at all really at all good, its a fag to use and the open command is not
complete and it does not save the baddy details correctly so you have to
rem out the "[bad]" header in the room ( named test.dat ) when in testing.
Also do not use the back feature of level edit as that neither works
properly. If possible could someone else make a better level editor. It
would be nice to have some simple mouse commanding with a GUI. I know how
to use the INTERRUPT commands to poke values into the processor resisters
ie: poke the service number of the mouse function into the AX reg.
I also know that its is INT 33 hex for the mouse driver functions and I
have a list of the, various services to call etc, although I just can't be
bothered. I would also like to write a simple standard GUI routine although
as you may guess,' I can't be bothered right now.' I know that the GUI and
mouse commands would help for the level editor and even for setup programs/
intro programs for other games. Anyway if anyone comes up with a new level
editor which is fairly bug free then I will throw it in with JR and put
credits to you.
  Again please report bugs to my e-mail address and I will try to
update these fixes if I do them.
 

Part B
______

Making a boot disk ...
======================

One in Windows 95 format a clean system disk as 'SYSTEM' with the system
files, or in DOS type 'FORMAT A: /S' to do the same.

copy the following files ... to that disk
these will be found in your windows folder or DOS folder (this maybe the
'command' sub folder if in Win95)... (you can use Find in Win95)

HIMEM.SYS
EMM386.EXE
SMARTDRV.EXE

then create a file called CONFIG.SYS and add the following

DEVICE=A:\HIMEM.SYS
DEVICE=A:\EMM386.EXE NOEMS
DOS=UMB
DOS=HIGH
STACKS=9,256

then create a file called AUTOEXEC.BAT and add the following

SMARTDRV.EXE 1024

Now use this disk to boot your system when you want to boot JR.

Jason Earl 1999

NB: There are some cheats in the game, You will find them in the source code,
so go on find 'em out!
