*****************************************************************

                     FAST MAP EDITOR

                     By Peter Corbett

*****************************************************************

    Fast Map Editor, or FastME, or even FME, is a neat little map
editor. Is there anyone out there who doesn't know what a map
editor is? Owners of the original AMOS, if it hasn't been
removed, will be familiar with TAME. I don't know about Easy
AMOS, but AMOS Pro lacks a map editor. There's one in SEUCK as
well. OK, for any people who own Easy AMOS / AMOS Pro and don't
use SEUCK, here's a little description.

    In many games, plenty of background images are needed, and
even compacted IFFs might cause severe memory headaches, so a
cunning system is used. The screen is divided into little
squares, in my case 16x16, and in each square a little image,
from a pre-definded selection, is displayed. A tiny file is
needed to show which image (also known as a Tile or Icon,
especially by AMOS programmers) is in each square. A map editor
makes this file. Fast Map Editor is one of these map editors.

    But if AMOS users have TAME, and anyone can buy TOME, why do
you need FastME. The answer is FME's *Unique Selling Point*,
namely Rapid Icon Acess. Instead of flipping to a different
screen every time you want an icon, you simply select one from a
palette of 40 16x16 icons at the bottom. Neat, huh? But there are
a few limitations. Only 40 icons are allowed (often more than
enough) and they must be 16x16 pixel icons. Only 16 colours are
allowed. The screen must be a basic 320x200 screen, 20 icons by
12 (with 8 pixels left at the bottom, your score perhaps?). But
this is often just the setup programmers want. These restrictions
make loading up your maps in AMOS (and AMOS Pro but not Easy
AMOS(Menus!)) far easier. Anyone who has used TAME (all credit
to Aaron Fothergill, but I just could not use TAME maps in my
programs no matter how hard I tried) will know that it is a
tricky beast. With FastME it is a different matter altogether.

    There are also several other neat features availible to the
prospecitve map makers, namely:

    "SCATTER" starfield / sand dune generator
    Open Boxes of icons
    "SCATTER" areas in boxes
    Closed, Open and Scatter boxes defined from any two opposite
angles (not just top left and bottom right, you know)
    Permanent Memory Bank Storage

    All in all, this makes FastME a very neat little program. But
the interersting information about the programmer (Peter Corbett)
can wait to the end, here is the Fast Map Editor User Guide (Cue
fanfare).

*****************************************************************
                 Fast Map Editor Users Guide
*****************************************************************

    Ok, so the trumpets have died down, and you want to know how
to use my program. First, my list of contents of the disk.

    Fast Map Editor (Compiled Version)
    FastME.AMOS (Non-Compiled Version)
    MapView.AMOS (2 Little Procedures to load and display a map 
file)
    IconGrabber.AMOS (Get your icon banks here!)
    Example_Icon_Picture (Or similar, an IFF partialy explaining 
IconGrabber)
    Icon Library Directory (Two sets of 40 Icons for your own 
maps here, and soon to grow!)
    Example Maps Directory
    FastME.Doc (This file!)

    Fast Map Editor
    ***************

    First, a little guide on how to use the thing, then an 
explanation of the menus.

    Load up Fast Map Editor, and soon you will get a file 
requsetor asking for a bank of icons. Choose a file from the 
selector (go into Icon Library if you haven't made any of your 
own), that is an AMOS Icon Bank containing 40 (No more, No Less) 
Icons, all 16 colours and 16x16 Pixels.

    Within a few seconds, the program should start up properly. 
Move the mouse pointer to the bottom section of the map, click on
an icon, move the pointer to the top, and click. See? Repeat
enough times, and you have a respectable map file. Now just save
it using the menus, just about to be described.

    FAST MAP EDITOR MENU GUIDE

    Item by Item, here is a guide to the menus.

PROJECT
    Load Map

    Rather preditctable, this loads a map file. This is NOT
compatible with TAME, this is an honest permanent data bank,
bank 10, with a few bytes of data in it. Be sure to save your
original map file. If you haven't, just select Quit or Cancel
from the requestor.

    Save Map

    A vital little function, this saves your map for loading in 
AMOS, AMOS Pro or FastME. Remember to add .MAP to the end of the 
filename.

    Load Icons

    This loads a different set of icons. Remeber, AMOS / AMOS Pro
standard icon bank, 40 icons, 16 colours, 16x16 pixels per icon.

    Adjust Colour

    I added this option to compensate for a bug in one of my 
programs somewhere, causing colour 3 to go funny. The bug has 
been ironed out, but if colour 3 turns out strange, note what it 
should be like in hexadecimal, and select this option.

    About

    Semi-compulory blurb about the program. Hardly worth 
selecting.

    Quit

    The last option on this menu, this quits FastME. BE 100% 
CERTAIN THAT YOU HAVE SAVED YOUR MAP FILE.

EDIT

    Clear Screen

    This clears the screen with the icon you have selected. There
is no "ARE YOU SURE?" requestor, you can always use UNDO.

    Scatter

    This turns some of the squares on the screen into the 
selected icon. To make a starfield or sand dune, make or load 
icons with four or more different star/sand images, clear the 
screen with one of them, and use scatter with the rest.

    Do Box

    Makes a solid rectangle of icons on the screen. Select your 
icon, select this, click on one corner of the area where you want
your rectangle to be, then click on the opposite corner. UNDO is 
ready if you make a mistake here.

    Open Box

    The same as do box, but it makes an outline of the icons 
rather than a filled rectangle

    ScatterBox

    A combination of Do Box and Scatter. Select an area like Do 
Box, and a proportion of the images will be changed to the 
current icon. If you don't understand, try it and see.

    Undo

    A last-minute feature, and well worth it. This undoes any of 
the above options in the edit menu, or all the icons changed 
since you last changed icon.

PREFS

    Set Scatter Power

    When you use Scatter or Scatterbox, there is a certain 
probability that each icon will or won't be changed. This option 
adjusts the probability.
    Just select this option, and enter a number from 1 to 10. 1 
gives a 1 in 1, or certain, chance of each icon being changed. 2 
gives a 1 in 2, or 50/50, chance of each icon being changed. 10 
gives a 1 in 10 chance of each icon being changed. My advice is 
to set this to the number of different icon images in your 
star/sand field.

    USING FAST MAP EDITOR MAPS IN YOUR OWN PROGRAMS
    ***********************************************

    For this purpose, a file called MapView is provided. The 
screen is set up, the icons are loaded, and two procedures are 
used.

    MAPLOAD loads a map bank, transfers the infomation to the MAP
array (predimensioned) and erases the bank.
    MAPDISP displays the map from the MAP array.

    Easy? If you want to write your own procedures, here is 
information on map bank structure.

    Map banks are ordinary AMOS permanent data banks, 241 bytes 
long. The bank is usually bank 10. The first byte is blank, 
possibly to hold a bytesworth of data in your own program. The 
next 240 bytes hold the map data. They are held in rows along the
x-axis of 20 icons length, and after 20 bytes the next row 
starts. So, in other words, the block at map co-ordinates X,Y is 
at Start(10)+x+y*20+1.

    This information will let you write your own procedures for 
map display. But who wants 1001 procedures and two icon sets?

    MAKING NEW ICON SETS FOR FAST MAP EDITOR
    ****************************************

    Basically, 40 icons, 16x16 pixels, Lowres non-interlaced, 16 
colours. Easy? But if you don't like sprite editors and sprite to
icon converters, I have provided a much better method.

    Stage 1: Draw your icons in a paint program.
Set up your screen in DPaint X, or other paint program as 
16-colour lowres. Set up your colours, making the difference 
between 0 and 1 highly noticable, and move the display so you can
see the top left hand corner. 
    Now draw a grid. A line across the very top, one 16 pixels 
down from the previous one, and one 16 pixels down from that. 
Then downwards lines, at 16 pixel intervals, starting at the very
left edge. The grid function on DPaint (All versions of DPaint),
set to 16 pixels, is very handy.
    Then, using the magnify function, draw each icon in its slot 
in the grid. Go over the lines on the top and the left of each 
icon's "slot", and use every slot. Once you have done this, the 
image should look like Example_Icon_Picture. Save your IFF, and 
boot up AMOS.
    Once in AMOS, load up IconGrabber.AMOS, and run it. Type in 
40 at the promt, and load up your IFF picture at the requestor, 
and wait a few seconds. A requestor will pop up. Choose your 
directory, enter the name (ending in .ABK) and you now have an 
icon bank.

    Easier than the sprite editor, wasn't it?

    OK, that just about wraps it up. Look at the example maps to 
see how the icons are used, try using your maps in your own 
games, and above all, enjoy using the editor. OK, now comes the 
interesting bit. No use at all, however.

*****************************************************************
      Why, How and Who? The truth behind FME and its author
*****************************************************************

    This is now OPTIONAL READING ZONE. You've taken me seriously 
up until now, and keep it up. I'm Peter Corbett, and 14 years 
old. I wrote Fast Map Editor for 4 reasons.

    a) I couldn't get the hang of TAME
    b) I wanted to do something fairly impressive
    c) I didn't want to do a game
    d) I couldn't think of anything else

    It was only after I got it to a reasonable state that I 
realised that it was PD quality. 
    I didn't go in much for flexibility. I knew what sort of spec
I needed, and worked to them. The icons at the bottom were 
inspired by, would you believe it, MacPaint. MacPaint had 
patterns at the bottom, and I cottoned onto the idea. I realised 
that this was quicker than a seperate screen, and Fast Map Editor
- the name - followed logically on.

    From there I grew the program to state where you made a map 
from scratch, and then pressed the right mouse button to save 
then quit. This wasn't exactly flexible, so I made some menus to 
handle loading and saving.

    The neatest idea was scatter. I was fed up of manual 
starfields in my ventures into SEUCK, so I wrote code to do it 
automatically. The box options followed on, and in a matter of a 
few days FME was ready.

    FME was written relatively quickly, on and off, depending on 
how much homework I had and how bored I was.

    Enough about Fast Map Editor was written, now for my credits 
list.

    My Friend, David Lay. He didn't actually get involved in 
FastME, but he inspired me with his enthusiasm for programming. 
He was also responsible for breaking my collar bone in the first 
rugby lesson in the school year (Sept 92). I hate rugby, so a 
broken bone ended up being pretty handy.

    My father, Neil. He programed our Spectrum when we had it 
(Upgrade path: ZX81 - Spectrum 16K - Spectrum+ - Amstrad CPC 664 
- Amiga A500), and constantly keeps me coding rather than gaming.
A great help!

    Terry Pratchett for his excellent Discworld series. He is the
funniest author alive, and you should go down your local bookshop
NOW!

    Mike Oldfield for Tubular Bells and Tubular Bells II.

    Sid Meier and Bruce Shelly for CIVILIZATION, the best 
strategy game ever, bar none. Plenty of months in it.

    Dave Smith for Act Of War, 17 Bit 2197. A great game, lots of
tactics and big, loud explosions. The map editor in the 
registered (V1.4) version won't save though, it just quits to 
WorkBench. Does anyone know why?

    Francois Linoet and co. for AMOS and AMOS Professional.

    Commodore for the AMIGA. Best creative computer by a long 
shot.

    AMIGA COMPUTING for the Tunes of The Month on the coverdisk. 
Edd209&Friends is excellent.

    AMIGA FORMAT and CU AMIGA and AMIGA COMPUTING, very close 
rivals for best Amiga mag. I think FORMAT is winning with me at 
the moment.

    I think that just about wraps it up.

    HELP-A-POOR-PROGRAMMER-TO-BUY-A-COMPILER-WARE NOTICE

    Fast Map Editor is freely distributable. You can use the map 
display procedures freely, and any bits from the map editor 
itself can be used with a rem in noting that Peter Corbett wrote 
the procedure/other bit.

    Fast Map Editor is Optional Shareware. I'm working on FME II 
at the moment, and it will be AMOS Pro Only. If you own ordinary 
AMOS, you will need me to compile it. I am saving up for the AMOS
Pro Compiler (The ordinary one was used this time), and a fiver 
or two would help. So if you feel inclined to aid future works 
from me, send me a little money. Even a letter giving me a few 
good ideas / noticed bugs / Games involving FME maps PD numbers 
will help. FME II will use lots more icons (optional), and make 
maps of variable size, often bigger than a screen. If you want 
this program to see the light of day, send me something 
constructive. To this adress:

    Peter Corbett
    21 Swaledale
    Bracknell
    Berkshire
    RG12 7ES.
There are two things to remeber.

1) Just One or Two interesing letters / fivers will significantly
ease along the programming process.
2) Hardly Anyone sends money to PD authors. One contribution is 
worth a lot to me as opposed to none.

    OK, so watch out for Fast Map Editor II, help me along and 
just generally enjoy FME.

*****************************************************************
                           The End
*****************************************************************

Well done for reading through that lot. I must stop now, its a 
bit late and I've run out of things to say.

                                            Peter Corbett. 
