home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 1
/
ARM_CLUB_CD.iso
/
contents
/
education
/
a
/
bookbinder
/
BookBinder
next >
Wrap
Text File
|
1995-02-24
|
29KB
|
605 lines
Acorn User April 1995
BOOKBINDER MANUAL
copyright Musbury Consultants
5 Helmshore Rd.
Haslingden,
Rossendale,
Lancs.
BB4 4BG
BookBinder is an application for the Acorn Archimedes computer
that enables you to create books which are multi-tasking interactive
texts/graphics. They can be used as multiple choice quizzes,
programmed learning sessions, interactive fiction, interactive graphical
display databases or presentation software. This is achieved simply by
dragging icons; there is no need to write any code. Despite this
simplicity, BookBinder is a powerful specialised programming
language capable of producing a wide variety of books. Once finished
the book may be copied to any disc and sold, or freely distributed. In
the true spirit of the desktop, many books may be opened at the same
time.
Books can have many uses. For example one simple use is to present
the user with a multiple choice question, if he clicks the correct answer
he goes to the next one, if incorrect you can show him some revision
material. Children are often encouraged to read by stories presented in
interactive book form, given the right book structure they can decide on
the outcome of the story. A graphical database might consist of a
picture of some object like a map. Clicking on various sections of the
map bring up more detail or information about that region. Presentation
software can be used for exhibitions and open days to explain some
part of the exhibit. The interactive nature of the program makes it a
great attraction.
In education too, the development of a book is a great class activity
that can be extended to cover all parts of the National Curiculum.
Finally, give vent to the power of your imagination and produce that
best selling story in an interactive form, be famous in the world of
shareware or start out selling your own software.
Basically a Book is a collection of pages created using the !Draw
application that comes as standard with the Archimedes computer. This
allows you to create pictures using objects, bit mapped images and text.
The applications !EDIT and !Paint can be used to make up a !Draw
file. If you are not familiar with these packages and generally finding
your way around the desktop then see the Archimedes application
guide that came with your computer.
The pages of the book are stitched together using BookBinder, this
process involves deciding what page will be shown at any time. When a
page is being displayed, clicking on different objects can take you to
different pages. In this way the sequence of pages a user sees depends
upon where on the page he clicks. By the layout of the page this can be
made obvious or obscure, depending upon your need. At its simplest
each page can have a message saying something like, "Click Here to
get to the next page". At the other end of the complexity scale, a user
could click on a picture of, say, a cup in order to indicate he has picked
it up.
BookBinder follows the recommended guidelines for the RISC OS
user interface. If you are not familiar with the way this works then see
the Archimedes User Guide for how to operate the !Draw application.
Before we look at a sample session we need to be aware of a few
terms:-
Page :- Displayed picture consisting of a !Draw file.
Link :- The next page to display after the current one.
Button :- The object to click that moves you onto the next page.
Planner :- The data file produced by the !Binder application that
contains the editable plan of your book.
Each page may have up to five links leading from it that can be
accessed using different buttons.
The BookBinder icon represents an open ring binder, the symbols
associated with the !Draw format files are on the cover of the binder.
BookBinder's data icon represents a bound book again with miniature
!Draw symbols connected by an arrow representing links. Inevitably,
due to the size of the icon these representations are rather stylised.
The finished book is read by an application called !BookRead which
is customised to become your final application. All the pages used
must be inside a desktop directory called "Pages" which in turn is
normally inside the !BookReader directory.
Preparing to use BookBinder:-
Due to legal reasons all the files needed to operate BookBinder can't
be distributed with the application but you will have them anyway.
Therefore you will need to make a set of working disks. This is a good
idea as you should always make a backup of any working system. If
you have a hard disc or network then it is advisable to go through this
tutorial section using floppy discs and then read the section on using
other filing systems.
If you only have a single drive then you can prevent a lot of disc
swapping when copying files by using the task window to allocate
some Ram disc space. Then copy the applications into the Ram filing
system and then out to your destination disc. This is especially time
saving where there are lots of small files to copy over like in the
System or the Fonts folder.
First format two discs, name one disc "Drawing" and the other
"Binder". Onto the Drawing disc copy the BookBinder application
!Binder and your !System file along with !Paint, !Draw and !Edit. Onto
the Binder disc copy the other files from the disc along with the !Fonts
folder. Use the spare labels supplied to label these working discs. You
are now ready to make your first book. Remove all discs and then turn
the computer off and then on again, this resets the system so that we
are starting with a blank slate.
First we are going to set up the system for a working session. Use
the task display to make sure you have some Font cache memory, about
32K will do. Now, insert the Drawing disc and click the drive icon,
when the disc directory is displayed double click the !Binder icon, after
a short time this will appear on the icon bar. Close down the Drawing
disc window and insert the Binder disc.
Now, we are going to create our book. Click the drive icon to display
the contents and make a copy of the !BookRead application and name
it "!Simple". Note its icon will be different from !BookRead. Now
open up !Simple, this is done by double clicking the icon whilst
holding down the shift key. You will see several files inside, open the
"Pages" folder by double clicking it, if you use the right hand adjust
button then !Simple will be closed at the same time as Pages is opened,
as you will not need to access the inside of this application, again this
keeps the desk top tidy.
Next we will fill our book with the pages it will use, to do this copy
the folder "SimplePage", found in the Examples folder, into the Pages
directory by dragging it in.
The next step is to define how these pages are to be displayed. Click
the !Binder icon on the icon bar and a window will open up with two
boxes labelled START and END; this is the plan for your book.
Open up your copy of "SimplePage" by double clicking using the
adjust (right hand) button. You will see it contains just two !Draw files
called "Page_1" and "Page_2" Drag these files into the newly opened
window and place them between the START and END boxes. As you
drop them in the window you will see boxes appear with the file names
in them. We now have all the pages in the plan window.
Now we are going to create the links between the pages, the book
will, not surprisingly, start from the START box and terminate when it
reaches the END box. Move your pointer over the START box and
press the menu (middle) button. You will see START as the second
menu item move to this and to the right to open up the menu
concerning this box. Select the first menu item "Create Link", you will
see the START box highlighted showing a link is to be made from this
box, you will also notice that the pointer has changed shape to a
downward pointing arrow attached to two links. This pointer shape
indicates that a link will be made between the selected box and the next
one you click on. Note the hot spot of the pointer is the point of the arrow,now pointing down, this part of the pointer has to be in the box when you
click. Move this new pointer to the box Page_1 and click the select (left
hand) mouse button. The pointer will revert to the default, the START box
will not be highlighted and a black line will connect START to Page_1.
To make the other links move the pointer to the Page_1 box and
again press the menu button and select "Create link", this time move the
link pointer onto "Page_2" and press the adjust (right hand) mouse
button. You will see the link is made as before (except it is red) but the
destination is now the new highlighted box, this is a useful short cut
when making a lot of links. Move the pointer to the END box and
again click. If at anytime you are in the create link mode (with the link
pointer showing) clicking on an empty space will restore the normal
pointer shape. You will notice that the point where the link meets the
destination box will be rounded. Think of it like a sucker sticking to the
box.
We can now arrange the boxes in the plan window by simply
dragging them around. The links will automatically be drawn in the
new places. This can be used to make the plan look neat, or if you want,
very messy.
Having created the plan of the book, in this case mind bogglingly
simple, we have to define what click sends us on to the next page.
Move the pointer over to the Page_1 box and hold down the menu
button move over to the Page_1 menu and from that move over to the
Define button menu. Now you will find there is only one item you can
select, Page_2, click on this item.
A new window will open up showing the contents of Page_1, you
might have to scroll the window or enlarge it to see everything. Each
time you click in this window a !Draw object will be highlighted. Move
onto the box that says "Next Page" and click it. Make sure the whole
box is highlighted not just the text inside it. When it is, hold down the
menu button and select the only item "Set button". You will notice that
the line denoting the link has changed from red to black. A red line
connecting the boxes indicated the link is undefined, when it has been
defined it will be black. Note you can only define one link from the
START box, this will always be considered defined as it indicates the
first page to show.
Now go back to the plan window and do the same thing for Page_2,
this time select the "Goodbye" box. To save this plan move the pointer
into the plan window and press the menu button, select the "Save"
option, name it SimpleP and drag the icon to a directory.
Finally we have to store this plan inside our book, to do this select
"Bind" from the menu. This will create two files inside the Pages
directory, one the binding information and the other the book mark.
We are now ready to read our book so close down the plan window
(and any others you like) and double click the !Simple icon. A box will
appear asking you if you want to open the book at the beginning or at
the book mark. The first time you read a book the bookmark is at the
beginning, however, this allows you to keep your place if you don't
complete the book in one sitting. Click either box and the first page of
your book will appear. The window can be resized and scrolled like any
other window. Notice when you move the pointer into this window it
changes into a hand indicating the page may be turned. Click on the
"Next page" box to do this and you will see, surprise surprise, the next
page. Click on "Goodbye" and the book will close.
We have just seen how to create a book and how it is read. Despite
the simple structure BookBinder is capable of producing quite a
sophisticated book. We will see in later sections how to customise our
book further and also look at some advanced features of book
planning.
Just to recap what we have done:-
1) Prepared a new blank book. (Made a copy of !BookRead)
2) Defined the pages we are going to use. (Dragged the page icons
into the planner window)
3) Defined the links between pages. ( Used the Link pointer to draw
lines between the boxes)
4) Defined the buttons associated with each link. (Highlighted the
desired object in the display window and then used the "Set Button"
option in the menu.
5) Finally bound the book. (Used the Bind menu option)
Working
If you have a single drive system you will find the way of working
described in the tutorial section will be the best. That is:- have one disc
with your system folder and applications. Then use this to load up
those applications you want to use in a session. On the other disc have
your Font folder and a copy of the reader program and use this to store
your !Draw pages, it's also a good place for the planner file. Remember
if you have enough memory the Ram disc can be used to speed things
up. On an Archimedes with only 1M of memory you will probably not
be able to have all the applications on the icon bar at once. In this case
!Draw and !Edit are the most useful combination when preparing a
page with text areas. You can transfer the text file directly into !Draw
by saving the text directly into the open !Draw window.
BookBinder can only work with one book plan at a time, if a plan
file is double clicked with a plan window already open then a new copy
of BookBinder will be loaded, placed on the icon bar, and that file's
contents displayed.
To merge two planner files, open up one file and simply drag the
other file into the open window or onto the Binder icon on the icon bar.
The new file will be added to the right of the existing one. There will be
no link from the second files START box but it will share the first file's
END box. This allows you to work on separate sections of a story and
then merge several books together with a minimum of effort.
The planner window has "shy" borders, that is if anything is placed
close to them they retreat and make the maximum area bigger. When
this happens all you will notice is that the scroll bars get bigger. Note
that this does not apply to the top of the page which remains fixed.
Customising your book
There are various operations you can perform in order to make your
book unique. You will not always want to carry out all of them, in fact
some operations require an intimate knowledge of the computer as well
as access to other software tools.
Icon
When a book is first created it will have the generic application icon.
In order to change this you will need to load the !Paint program. Now
open up your book (Double click while holding down the shift key)
and drag the !Sprites icon onto the !Paint icon on the icon bar. You will
see three icons, rename the larger one the same as your book. Rename
the smaller one the same as your book but starting with the letters
"sm". At this stage do not alter the pointer icon. Now, if you wish,
double click on the sprites and alter them as you see fit. Save the
changes and close the file. You will not see the change reflected in the
desktop immediately. To see the changes either turn the computer off
and then on again, or else dismount the disc, take it out of the drive,
push it back in and click the drive icon.
About box
When reading your book if you press the menu button (middle)
then a menu will appear with three items. To comply with the
conditions of sale the "Info" item must always be the same. However
the "About" option can be customised to explain a little about your own
book. This menu item opens up a window containing text icons. The
definitions for this window are held in the "About" template file. If you
have a copy of the template editor you can change the contents of this
window to explain your book.
Windows
The initial size and position of all the windows may be changed by
altering the "Templates" file using the template editor. However do not
change the other characteristics of the windows unless you know what
the consequences will be. In all events work on a copy of your book
just in case.
!RUN
In the !RUN file inside your book there are a number of lines that
are preceded by a |, this indicates it is a comment and is ignored by the
computer. If you use the !Edit application to remove these you can
include various checks that will be made before running your book.
If you use fonts other than the system font in your pages you can
test to see if the operating system has "seen" a font folder.
Again using fancy fonts, if you have the MemAloc module in your
!System folder then you can ensure that you have sufficient font cache
memory allocated. This will speed up the drawing of new pages and, if
your fonts are on a different disc to your book, will minimise disc
swapping.
Techniques
When creating a book you can use various different types of
structures, the examples on the disc supplied are meant to show you a
few.
Remember that BookBinder works with an object's bounding boxes
rather than with the object itself so you must take care if this bounding
box overlaps another bounding box. When creating the button you will
see the entire bounding box highlighted so you should be able to tell if
you get into any trouble.
When the user is given the choice of answer one is correct and
requires one link, all the other choices are incorrect and require another.
Rather than use a separate link for all the incorrect answers draw a box
around all the choices and make it invisible by choosing the pen colour
to be the same as the background. Make sure this box is "sent to the
back" in !Draw. Then the correct answer can have the correct link and
this box the incorrect link. As this hidden box also covers the area of
the correct box you may wonder how it is discriminated by the
program. Well, the reader program looks at the position of the pointer
when it is clicked and returns the top object pointed at. Therefore if the
hidden box is at the back if will not be used even if it totally surrounds
the correct box.
One unobvious technique is that pages may appear many times in the
book. Each reappearance of the page can have its own unique set of
buttons and links. You could use this to split the narrative of your book
at some place but not make the reader aware of this until some pages
after the decision has been made. This is done by carrying the narrative
on two sets of parallel identical pages until you reach the point where
an earlier decision matters.
For example, suppose you have an adventure type story with a key in
a room. If the reader clicks on the key you can move to a page with a
link from a closed door, otherwise you can move to the same page but
with no link from the door.
Mazes, much beloved of adventure games, can be easily constructed.
Simply use the same page several times with a different link out of each
appearance of the page. An incorrect click can send the reader back to
the start of the maze or simply not advance him. This technique can be
used anywhere where you want the reader to input a specific sequence
rather than just indicate a specific item, for example when cracking a
combination lock or dialling a telephone number.
!Draw pages
When creating art work for use in BookBinder use the "Paper limits"
option set to the A5 size. In this way the available size of the drawing
will match the size of the book reader window. If it can be helped keep
the page to within a full screen and don't have the user scroll the box to
get at some detail that is not obviously connected with the rest of the
picture.
One of the most difficult things about writing BookBinder was to get
it to display !Draw files in exactly the same way !Draw does. This is
made more difficult by the fact that !Draw contains some bugs and I
have attempted to recreate those bugs. This has not always been
possible in regard to text areas, because of the method BookBinder
uses to draw them. This new method is more efficient and much
quicker during redraw. However, only two slight inconsistances might
be noticed. The first is that text areas always use the same default
setting for the margin and the second is that the line spacing does not
always come out the same as !Draw. In practice this has not caused any
difficulty.
Hard Discs & File Servers
BookBinder will work in any filing system environment, simply copy
it onto a hard disc in any directory you like. Note however that it is not
possible to view the example planner files in a new environment
without first converting them, see the section on pathnames.
Pathnames
The Archimedes desktop system does not recognise the concept of a
"current directory" so all files must be referred to by their full path
name. This presents a difficulty for a program like BookBinder where
you would like the finished collection of files (the book) to be run from
any filing system or any name of disc. The way BookBinder gets
round this problem is to require that all !Draw files used must have
"Pages" somewhere in its pathname. Then, conveniently, this Pages
folder can be inside your finished book, making a complete package.
When the binder information is being written in this Pages folder, all
the path names of the files to used are passed down to the "Pages"
folder. This folder, or directory, may contain as many sub-directories as
you want to help in neat organisation. When the book is being read the
first part of the file's path name is taken from the current path name of
the book, and the latter part from the binding file. This arrangement
ensures that your book can be read anywhere it happens to be.
The planner file however contains the full pathname of each of the
pages, this is not normally a problem as you will normally develop a
book using just one disc name or filing system. However, if, during
development of a book, you decide to re-name the working disc, or
copy it onto a new disc or hard disc, the planner file will still be looking
for the pages on the old disc. The operating system will then ask you to
insert that disc when you want to edit or create a button.
To cover this rare event a simple Basic program Convert has been
added to the BookBinder disc. To use it simply double click from the
desktop and specify the file you want to change. You will be asked for
a name of a file to store the amendments and then be presented with the
full path name of your first page. Use the copy key to enter the part of
the path name you want to change, and then type in what you want to
change it to. The planner file will then be scanned and a new file
produced which contains the same information but altered pathname.
Note if you want to change just the disc name you must also specify
the filing system in both the removal and replacement inputs. Having
tested that the new planner file is correct you can delete the old one.
Limitations
Ideally an application should present the user with no limitations.
However the practicalities of writing a program unfortunately by
necessity assume some limits. This is especially important in a
multitasking environment as you want to strike a balance between
memory usage and application capability. The following is a list of
assumptions made in the BookBinder applications. If any one
restricts your intended applications then it can be altered. Requests
for alteration should be made in writing to Musbury Consultants, a charge
of £15.00 inc. VAT will be made for any extra work that has to be done.
Total number of pages in a book - 200
Maximum size of any !Draw file - 32K
Maximum size of total text areas in the !Draw file - 2000
characters
Printing
The plan of a book may be printed using a standard printer driver.
However some vertical resolutions available as an option are so low
that they do not result in every pixel of the screen being sampled. As
a result it could be that the top or bottom line of the page box could
be missed. Too low a horizontal resolution results in the text having
an inconsistant number of pixels allocated to it. This can make the
letters difficult to read. If either of these are a problem then simply
select a higher resolution for your printer. The printout is scaled so
that it is roughly the same size as you see on your screen.
When printed, the page boxes are not filled with a colour and
undefined links are shown as dotted. If the plan covers more than one
printed page then several pages will be produced, these can be stuck
together to give your master plan.
Grid
There is an option on the main menu to turn a grid on and off.
The program starts off with this grid on (menu item ticked). This
means that when you have finished dragging a page box it will align
itself to the nearest grid position. This results in a slight shift between
where the dotted box was and where the new box appears. The grid is
useful in aligning and evenly spacing the page boxes. However this
can be turned off at any time.
Shared Resources
The Archimedes makes use of so called Shared Resources. These
are files that can be used by many applications, as such they are not
usually distributed with applications but were supplied with the original
disc that came with your computer. These normally break down into
system and font recources. However, in the case of BookBinder you
will also need the !Draw, !Paint and !Edit applications to make full use
of this package.
System modules.
Supplied on the Archimedes Application Disc 1, that came with your
computer is a folder named !System. This contains, amongst other
things, some relocatable modules that extend the operating system of
RISC OS 2.0. !Binder, !BookRead and !Draw all need one of these
modules, the one called "Colours". This allows the colours the program
wants to use to be translated into the colours currently available on the
desktop. If this module is not present the applications will attempt to
load them. In order to do this the desk top must have "seen" the system
folder since the computer was switched on or reset. This is why you
are asked to make a copy of the System folder on one of your working
discs.
Fonts
!Draw files are capable of using different types of fonts both in text
objects and text areas. These fonts are normally held in a folder called
surprisingly enough "Fonts". These must be available to the computer
as the pages are being displayed. Therefore the computer must have
"seen" a Font folder since switch on, or reset in order to know where to
look for them. Even so it is possible that the set of fonts used to create
the original page are not present when the book is read, in which case
the reader program will make a substitution. In the case of an
unavailable font found in a text object, the system font will be
substituted whereas if it is a text object then Trinity.Medium will be
used. This could present a little difficulty if the subistituted font is of a
markedly different scale than the original. For example 14 point
Homerton is a lot smaller than 14 point system. This will affect the
bounding box defining the object and possibly the button. If the
substituted text strays outside the original bounding box then it may
not always be completely redrawn when other windows overlap. In all
cases the reader program tries to make the same sort of decisions as the
!Draw applications but for technical reasons this is not always
possible.
Allocating font cache memory will speed up the drawing of a page
containing text, as the computer does not keep having to access the disc
to find how to draw each letter. If enough is allocated then the disc
access occurs only the first time the font character is encountered. To
find out what fonts have been used and how much space you have left
press the f12 key and then type "FontList" at the star prompt. Pressing
return by itself will put you back on the desktop.
If you are distributing books then it might be as well to make the
first page an instruction to the user as to what fonts need to be
available.
!!WARNING!!
If you try to re-bind any sample book, or change the file name of a page in
any way after it is dragged into BookBinder you will need to run 'Converter'
to change the path names!!