100% found this document useful (4 votes)
71 views

2D graphics programming for games 1st Edition John Pile Jr. 2024 scribd download

graphics

Uploaded by

prahmhanaseg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
71 views

2D graphics programming for games 1st Edition John Pile Jr. 2024 scribd download

graphics

Uploaded by

prahmhanaseg
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Download the full version of the ebook at ebookname.

com

2D graphics programming for games 1st Edition John


Pile Jr.

https://ebookname.com/product/2d-graphics-programming-for-
games-1st-edition-john-pile-jr/

OR CLICK BUTTON

DOWNLOAD EBOOK

Download more ebook instantly today at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Mathematics for 3D Game Programming Computer Graphics 1st


Edition Eric Lengyel

https://ebookname.com/product/mathematics-for-3d-game-programming-
computer-graphics-1st-edition-eric-lengyel/

ebookname.com

Game Graphics Programming 1st Edition Allen (Allen


Sherrod) Sherrod

https://ebookname.com/product/game-graphics-programming-1st-edition-
allen-allen-sherrod-sherrod/

ebookname.com

Fundamental 2D Game Programming with Java 1st Edition


Timothy M. Wright

https://ebookname.com/product/fundamental-2d-game-programming-with-
java-1st-edition-timothy-m-wright/

ebookname.com

Cash Games How to Win at No Limit Hold em Money Games Vol


1 1st Edition Dan Harrington

https://ebookname.com/product/cash-games-how-to-win-at-no-limit-hold-
em-money-games-vol-1-1st-edition-dan-harrington/

ebookname.com
Introduction to VLSI Circuits and Systems 1st Edition John
P. Uyemura

https://ebookname.com/product/introduction-to-vlsi-circuits-and-
systems-1st-edition-john-p-uyemura/

ebookname.com

God Fearing and Free 1st Edition Jason W. Stevens

https://ebookname.com/product/god-fearing-and-free-1st-edition-jason-
w-stevens/

ebookname.com

A First Course in General Relativity 2nd Edition Bernard


F. Schutz

https://ebookname.com/product/a-first-course-in-general-
relativity-2nd-edition-bernard-f-schutz/

ebookname.com

Becoming Evil How Ordinary People Commit Genocide and Mass


Killing 2nd Edition James E. Waller

https://ebookname.com/product/becoming-evil-how-ordinary-people-
commit-genocide-and-mass-killing-2nd-edition-james-e-waller/

ebookname.com

UN Tied Nations The United Nations Peacekeeping and Global


Governance Kate Seaman

https://ebookname.com/product/un-tied-nations-the-united-nations-
peacekeeping-and-global-governance-kate-seaman/

ebookname.com
The Geography of the Internet Industry Venture Capital Dot
coms and Local Knowledge Information Age Series 1st
Edition Matthew Zook
https://ebookname.com/product/the-geography-of-the-internet-industry-
venture-capital-dot-coms-and-local-knowledge-information-age-
series-1st-edition-matthew-zook/
ebookname.com
Pile
Computer Graphics

2D Graphics

2D Graphics Programming for Games


Programming
2D Graphics Programming for Games provides an in-depth single
source on creating 2D graphics that can be easily applied to many game
platforms, including iOS, Android, Xbox 360, and the PlayStation Suite. The

for Games
author presents examples not only from video games but also from art and
animated film.

The book helps you learn the concepts and techniques used to produce
appealing 2D graphics. It starts with the basics and then covers topics
pertaining to motion and depth, such as cel animation, tiling, and layering. The
text also describes advanced graphics, including the use of particle systems,
shaders, and splines. Code samples in the text and online allow you to see
a particular line of code in action or as it relates to the code around it. In
addition, challenges and suggested projects encourage you to work through
problems, experiment with solutions, and tinker with code.

Full of practical tools and tricks, this color book gives you in-depth guidance
on making professional, high-quality graphics for games. It also improves
your relationship with game artists by explaining how certain art and design
challenges can be solved with a programmatic solution.

Features
• Shows how the core concepts of graphics programming are the
same regardless of platform
• Helps you communicate effectively with game artists and designers
• Provides code samples in C# and XNA, with more samples in C++,
OpenGL, DirectX, and Flash available on a supporting website

K14405
John Pile Jr
ISBN: 978-1-4665-0189-8
90000

9 781466 501898
for PC, Mac, iPhone / iPad,
Android, and Xbox 360

K14405_Cover_mech.indd All Pages 4/16/13 12:06 PM


2D Graphics Programming
for Games
2D Graphics Programming
for Games

John Pile Jr
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742

© 2013 by Taylor & Francis Group, LLC


CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works


Version Date: 20121220

International Standard Book Number-13: 978-1-4665-0190-4 (eBook - PDF)

This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been made to publish reliable data and information, but
the author and publisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to
trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained.
If any copyright material has not been acknowledged please write and let us know so we may rectify in any future reprint.

Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical,
or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information storage or retrieval system, without
written permission from the publishers.

For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://www.copyright.com/) or contact the Copyright
Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a
variety of users. For organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for identification and explanation without intent to
infringe.

Visit the Taylor & Francis Web site at


http://www.taylorandfrancis.com

and the CRC Press Web site at


http://www.crcpress.com
For Helen.
Contents

Preface xi

Acknowledgments xiii

About the Author xv

I Getting Started in 2D 1

1 Introduction 3
1.1 About This Book . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Why C# and XNA? . . . . . . . . . . . . . . . . . . . . . 5
1.3 Game Development 101 . . . . . . . . . . . . . . . . . . . 8
1.4 Game Developer Platforms . . . . . . . . . . . . . . . . . 9
1.5 Book Organization . . . . . . . . . . . . . . . . . . . . . . 12

2 Basics of Computer Graphics 15


2.1 Bits and Bytes . . . . . . . . . . . . . . . . . . . . . . . . 15
2.2 Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.3 Double Buffering . . . . . . . . . . . . . . . . . . . . . . . 30
2.4 Graphic File Formats . . . . . . . . . . . . . . . . . . . . . 31
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

3 Sprites! 37
3.1 What Is a Sprite? . . . . . . . . . . . . . . . . . . . . . . . 37
3.2 Layering with Depth . . . . . . . . . . . . . . . . . . . . . 45
3.3 The Sprite Sheet and the GPU . . . . . . . . . . . . . . . 47
3.4 Scaling Sprites . . . . . . . . . . . . . . . . . . . . . . . . 49
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

vii
viii Contents

II Motion and Depth 55

4 Animation 57
4.1 Historical Animation . . . . . . . . . . . . . . . . . . . . . 57
4.2 Cel Animation . . . . . . . . . . . . . . . . . . . . . . . . 59
4.3 A Few Principles of Animation . . . . . . . . . . . . . . . 62
4.4 Animation Cycles . . . . . . . . . . . . . . . . . . . . . . . 69
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

5 Camera and Tiling 73


5.1 A Simple Camera . . . . . . . . . . . . . . . . . . . . . . . 73
5.2 Simple Camera Zoom . . . . . . . . . . . . . . . . . . . . 79
5.3 Tiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.4 Isometric Tiled Graphics . . . . . . . . . . . . . . . . . . . 89
Exercises: Challenges . . . . . . . . . . . . . . . . . . . . . . . 91

6 The Illusion of Depth 93


6.1 A Historical Perspective on Perspective . . . . . . . . . . 93
6.2 Layering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
6.3 The Six Principles of Depth . . . . . . . . . . . . . . . . . 97
6.4 The Six Principles in Code . . . . . . . . . . . . . . . . . 105
6.5 Traditional Perspective . . . . . . . . . . . . . . . . . . . . 116
6.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Exercises: Challenges . . . . . . . . . . . . . . . . . . . . . . . 121

7 User Interface 123


7.1 UI Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
7.2 Fonts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
7.3 Localization . . . . . . . . . . . . . . . . . . . . . . . . . . 126
7.4 Safe Frames . . . . . . . . . . . . . . . . . . . . . . . . . . 128
7.5 Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Exercises: Challenges . . . . . . . . . . . . . . . . . . . . . . . 130

III Advanced Graphics 131

8 Particle Systems 133


8.1 What Is a Particle? . . . . . . . . . . . . . . . . . . . . . . 134
8.2 Creating Effects . . . . . . . . . . . . . . . . . . . . . . . . 141
8.3 Blending Types . . . . . . . . . . . . . . . . . . . . . . . . 146
8.4 Types of Effects . . . . . . . . . . . . . . . . . . . . . . . . 149
8.5 An Effect System . . . . . . . . . . . . . . . . . . . . . . . 162
8.6 Optimization . . . . . . . . . . . . . . . . . . . . . . . . . 164
Exercises: Challenges . . . . . . . . . . . . . . . . . . . . . . . 166
Contents ix

9 GPU Programming 169


9.1 Pixel Modification . . . . . . . . . . . . . . . . . . . . . . 169
9.2 Full-Screen Pixel Modifications . . . . . . . . . . . . . . . 174
9.3 What Is a Shader? . . . . . . . . . . . . . . . . . . . . . . 178
9.4 Shader Languages . . . . . . . . . . . . . . . . . . . . . . 178
9.5 Pixel Shader Examples . . . . . . . . . . . . . . . . . . . . 182
Exercises: Challenges . . . . . . . . . . . . . . . . . . . . . . . 186

10 Polish, Polish, Polish! 187


10.1 Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . 188
10.2 Sinusoidal Movement . . . . . . . . . . . . . . . . . . . . . 193
10.3 Splines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
10.4 Working with Your Artist . . . . . . . . . . . . . . . . . . 197
10.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Exercises: Challenges . . . . . . . . . . . . . . . . . . . . . . . 198

IV Appendices 199

A Math Review: Geometry 201


A.1 Cartesian Mathematics . . . . . . . . . . . . . . . . . . . . 201
A.2 Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
A.3 Circle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
A.4 Pythagorean Theorem . . . . . . . . . . . . . . . . . . . . 202
A.5 Distance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
A.6 Distance Squared . . . . . . . . . . . . . . . . . . . . . . . 202

B Math Review: Vectors 203


B.1 Vectors and Notation . . . . . . . . . . . . . . . . . . . . . 203
B.2 Vector Comparison . . . . . . . . . . . . . . . . . . . . . . 204
B.3 Length, Addition, and Subtraction . . . . . . . . . . . . . 206
B.4 Unit Vectors and Normalizing a Vector . . . . . . . . . . . 207
B.5 Vector Properties . . . . . . . . . . . . . . . . . . . . . . . 207
B.6 Standard Unit Vectors and Polar Representation . . . . . 208

C Math Review: Trigonometry 211


C.1 Triangle Trigonometry . . . . . . . . . . . . . . . . . . . . 211
C.2 Unit-Circle Trigonometry . . . . . . . . . . . . . . . . . . 212
C.3 Trigonometry as a Collection of Periodic Functions . . . . 213
C.4 The Tangent Function . . . . . . . . . . . . . . . . . . . . 214
C.5 Translations and Transforms of Trigonometric Functions . 215
C.6 Circles and Ellipses . . . . . . . . . . . . . . . . . . . . . . 216
x Contents

Bibliography 217

Glossary 219

Index 223
Preface

There are already some great books on programming 2D games, so why


write one that focuses only on 2D graphics?
The answer is that whereas other books might succeed at covering a
breadth of topics, they don’t necessarily go into the depth required to
make professional-looking games. Some great texts cover other advanced
game development topics, such as game physics, game AI, real-time 3D
graphics, and game architectures, but the information on 2D graphics has
been difficult to find in a single text. Until now, that is.
Further, the books that do discuss the creation of 2D games focus on
only one platform (OpenGL, DirectX, Flash, XNA). In reality, as you will
see in this book, the core concepts of graphics programming are the same,
regardless of platform.
Throughout this book you will learn the concepts and techniques used
in making great 2D graphics. Much of what is included in this book might
be considered general knowledge by many game developers, but those same
developers would be at a loss to tell you where they actually picked up the
information. The truth is that it has been gained by years of experience
developing games.
When I was hired to teach a course on 2D graphics, I spent a great deal
of time looking for a textbook that covered the topics I believe are most
important for new game developers to learn. I could not find one, and the
result is the content within this book.
My goal is that by the time you finish reading and working through the
exercises in this text, you will be able to look at a game such as Castle
Crashers [Zynga Dallas 11] and think, “Sure, I could do that.”
In addition, I suspect you’ll have a newfound respect for the roles of
game artists and designers.

xi
Acknowledgments

Among teaching, coding, and fulfilling a variety of other obligations, I have


managed to finish writing a book during what is also my first two years
of marriage. I therefore want to thank my beautiful wife, Helen, who has
happily dealt with the glow of my computer screens until the wee hours of
the morning and a year of too much work and not enough play.
I would also like thank my parents for their continual support and pa-
tience over the years. Even I am aware that having a middle-aged son who
still plays computer games and watches cartoons is a little odd. Through
the years, they have led by example, instilling a combined work and play
ethic epitomized by my dad’s motto: “Do what you love and the rest will
follow.” That has been my guiding principle and helps to explain why I
look forward to each day of work.
At the end of this book are two appendices reviewing the basic math
principles needed for this text, which are provided courtesy of Dr. Scott
Stevens, Mathematics Coordinator at Champlain College. My thanks go
out to him for putting these together. For further exploration of these
topics, Scott developed an advanced course of the math needed for 3D
game development. The textbook for that course, Matrices, Vectors, and
3D Math, is available online [Stevens 12].
My students also deserve a great deal of thanks. They keep me inspired
and on my toes. Throughout this book you will find that many of the visual
examples are screenshots of games created by my students. In addition,
one of the great rewards of teaching at a time when all the latest software
development information can be found online is that for those who want
to learn, the classroom has now become an amazing two-way information
exchange. When I give students a bit of background and point them in the
right direction, they come back with all kinds of new and interesting stuff
that I never could have found on my own.
Without sounding too much like an award speech, I want to give credit
to the team I worked with at Proper Games: Mike, Danny, Andy, Fritz,
Janek, Chris Bradwell, Chris Brown, Paddy, John, and, of course, Smithy.
Additionally, much of the artwork in this book was provided by my Proper
Games colleague and good friend Geoff Gunning. His unique artistic style

xiii
xiv Acknowledgments

and attention to detail are an inspiration. Geoff is truly a hidden talent


and all-around good guy. I’m lucky to have had the privilege to work with
him on almost every one of my major game projects.
Finally, I would like to thank two good friends who are gone too soon.
Mike and Jenny, you are missed.
Exploring the Variety of Random
Documents with Different Content
A FEW GENERAL RULES AND DIRECTIONS FOR PRESERVING.

1. Let everything used for the purpose be delicately clean and dry;
bottles especially so.
2. Never place a preserving-pan flat upon the fire, as this will
render the preserve liable to burn to, as it is called; that is to say, to
adhere closely to the metal, and then to burn; it should rest always
on a trivet (that shown with the French furnace is very convenient
even for a common grate), or on the lowered bar of a kitchen range
when there is no regular preserving stove in a house.
3. After the sugar is added to them, stir the preserves gently at
first, and more quickly towards the end, without quitting them until
they are done: this precaution will always prevent the chance of their
being spoiled.
4. All preserves should be perfectly cleared from the scum as it
rises.
5. Fruit which is to be preserved in syrup must first be blanched or
boiled gently, until it is sufficiently softened to absorb the sugar; and
a thin syrup must be poured on it at first, or it will shrivel instead of
remaining plump, and becoming clear. Thus, if its weight of sugar is
to be allowed, and boiled to a syrup with a pint of water to the pound,
only half the weight must be taken at first, and this must not be
boiled with the water more than fifteen or twenty minutes at the
commencement of the process; a part of the remaining sugar must
be added every time the syrup is reboiled, unless it should be
otherwise directed in the receipt.
6. To preserve both the true flavour and the colour of fruit in jams
and jellies, boil them rapidly until they are well reduced, before the
sugar is added, and quickly afterwards, but do not allow them to
become so much thickened that the sugar will not dissolve in them
easily, and throw up its scum. In some seasons, the juice is so much
richer than in others, that this effect takes place almost before one is
aware of it; but the drop which adheres to the skimmer when it is
held up, will show the state it has reached.
7. Never use tin, iron, or pewter spoons, or skimmers, for
preserves, as they will convert the colour of red fruit into a dingy
purple, and impart, besides, a very unpleasant flavour.
8. When cheap jams or jellies are required, make them at once
with Lisbon sugar, but use that which is well refined always, for
preserves in general; it is a false economy, as we have elsewhere
observed, to purchase an inferior kind, as there is great waste from it
in the quantity of scum which it throws up. The best has been used
for all the receipts given here.
9. Let fruit for preserving be gathered always in perfectly dry
weather, and be free both from the morning and evening dew, and as
much so as possible from dust. When bottled, it must be steamed or
baked during the day on which it is gathered, or there will be a great
loss from the bursting of the bottles; and for jams and jellies it cannot
be too soon boiled down after it is taken from the trees.
TO EXTRACT THE JUICE OF PLUMS FOR JELLY.

Take the stalks from the fruit, and throw aside all that is not
perfectly sound: put it into very clean, large stone jars, and give part
of the harder kinds, such as bullaces and damson, a gash with a
knife as they are thrown in; do this especially in filling the upper part
of the jars. Tie one or two folds of thick paper over them, and set
them for the night into an oven from which the bread has been drawn
four or five hours; or cover them with bladder, instead of paper, place
them in pans, or in a copper[166] with water which will reach to quite
two-thirds of their height, and boil them gently from two to three
hours, or until the fruit is quite soft, and has yielded all the juice it will
afford: this last is the safer and better mode for jellies of delicate
colour.
166. The fruit steams perfectly in this, if the cover be placed over.
TO WEIGH THE JUICE OF FRUIT.

Put a basin into one scale, and its weight into the other; add to this
last the weight which is required of the juice, and pour into the basin
as much as will balance the scales. It is always better to weigh than
to measure the juice for preserving, as it can generally be done with
more exactness.
RHUBARB JAM.

The stalks of the rhubarb (or spring-fruit, as it is called) should be


taken for this preserve, which is a very good and useful one, while
they are fresh and young. Wipe them very clean, pare them quickly,
weigh, and cut them into half-inch lengths; to every pound add an
equal weight of good sugar in fine powder; mix them well together,
let them remain for ten minutes or a quarter of an hour to draw out
the juice a little, then turn them into a preserving-pan, let them heat
rather slowly, but as soon as the stalks are tender boil the preserve
rapidly, stirring it well for about half an hour. It will be of excellent
flavour, and will serve admirably for tarts.
A somewhat cheaper mode of making the jam is to stew it until
tender in its own juices, and then to boil it rapidly until it is tolerably
dry, to add to it only half its weight of sugar, and to give it from twenty
to thirty minutes boiling.
Spring fruit (rhubarb), 4 lbs.; sugar, 4 lbs.: heated slowly, and
when tender, boiled quickly, 30 minutes.
GREEN GOOSEBERRY JELLY.

Wash some freshly gathered gooseberries very clean; after having


taken off the tops and stalks, then to each pound pour three-quarters
of a pint of spring water, and simmer them until they are well broken;
turn the whole into a jelly-bag or cloth, and let all the juice drain
through; weigh and boil it rapidly for fifteen minutes. Draw it from the
fire, and stir in it until entirely dissolved, an equal weight of good
sugar reduced to powder; boil the jelly from fifteen to twenty minutes
longer, or until it jellies strongly on the spoon or skimmer; clear it
perfectly from scum, and pour it into small jars, moulds, or glasses. It
ought to be very pale and transparent. The sugar may be added to
the juice at first, and the preserve boiled from twenty-five to thirty-five
minutes, but the colour will not then be so good. When the fruit
abounds, the juice may be drawn from it with very little water, as
directed for apples, page 523, when it will require much less boiling.
Gooseberries, 6 lbs.; water, 4 pints: 20 to 30 minutes. Juice boiled
quickly, 15 minutes; to each pound, 1 pound sugar: 15 to 20 minutes.
GREEN GOOSEBERRY JAM.

(Firm and of good colour.)


Cut the stalks and tops from the fruit, weigh and bruise it slightly,
boil it for six or seven minutes, keeping it well turned during the time,
then to every three pounds of gooseberries add two and a half of
sugar beaten to powder, and boil the preserve quickly for three-
quarters of an hour. It must be constantly stirred, and carefully
cleared from scum. This makes a fine, firm, and refreshing preserve
if the fruit be rubbed through a sieve before the sugar is added. If
well reduced afterwards, it may be converted into a gâteau, or
gooseberry-solid, with three pounds of sugar, or even a smaller
proportion. The preceding jam will often turn in perfect form from the
moulds or jars which contain it; and if freed from the seeds, would be
very excellent: it is extremely good even made as above. For all
preserves, the reduction, or boiling down to a certain consistence,
should take place principally before the sugar is mingled with them;
and this has the best effect when added to the fruit and dissolved in
it by degrees.
Green gooseberries, 6 lbs.: 6 to 7 minutes. Sugar, 5 lbs.; 3/4 hour.
TO DRY GREEN GOOSEBERRIES.

Take the finest green gooseberries, fully grown, and freshly


gathered; cut off the buds, split them across the tops half way down,
and with the small end of a tea or of an egg spoon, scoop out the
seeds. Boil together for fifteen minutes a pound and a half of the
finest sugar, and a pint of water; skim this syrup thoroughly and
throw into it a pound of the seeded gooseberries; simmer them from
five to seven minutes, when they ought to be clear and tender; when
they are so, lift them out, and throw as many more into the syrup;
drain them a little when done, spread them singly on dishes, and dry
them very gradually in a quite cool stove or oven, or in a sunny
window. They will keep well in the syrup, and may be potted in it, and
dried when wanted for use.
Green gooseberries without seeds, 2 lbs.; water, 1 pint; sugar, 1-
1/2 lb.: boiled, 15 minutes. Gooseberries simmered, 5 to 7 minutes.
GREEN GOOSEBERRIES FOR TARTS.

Fill very clean, dry, wide-necked bottles with gooseberries


gathered the same day, and before they have attained their full
growth. Cork them lightly, wrap a little hay round each of them, and
set them up to their necks in a copper of cold water which should be
brought very gradually to boil. Let the fruit be gently simmered until it
appears shrunken and perfectly scalded; then take out the bottles,
and with the contents of one or two fill up the remainder, and use
great care not to break the fruit in doing this. When all are ready pour
scalding water into the bottles and cover the gooseberries entirely
with it, or they will become mouldy at the top. Cork the bottles well
immediately, and cover the necks with melted resin; keep them in a
cool place; and when the gooseberries are used pour off the greater
part of the water, and add sugar as for the fresh fruit, of which they
will have the flavour and appearance; and they will be found more
wholesome prepared in this manner than if simply baked or steamed
in the bottles.
RED GOOSEBERRY JAM.

The small rough red gooseberry, when fully ripe, is the best for this
preserve, which may, however, be made of the larger kinds. When
the tops and stalks have been taken carefully from the fruit, weigh,
and boil it quickly for three-quarters of an hour, keeping it well stirred;
then for six pounds of the gooseberries, add two and a half of good
roughly-powdered sugar; boil these together briskly, from twenty to
twenty-five minutes and stir the jam well from the bottom of the pan,
as it is liable to burn if this be neglected.
Small red gooseberries, 6 lbs.: 3/4 hour. Pounded sugar, 2-1/2
lbs.: 20 to 25 minutes.
VERY FINE GOOSEBERRY JAM.

Seed the fruit, which for this jam may be of the larger kind of rough
red gooseberry: those which are smooth skinned are generally of far
inferior flavour. Add the pulp which has been scooped from the
prepared fruit to some whole gooseberries, and stir them over a
moderate fire for some minutes to extract the juice; strain and weigh
this; pour two pounds of it to four of the seeded gooseberries, boil
them rather gently for twenty-five minutes, add fourteen ounces of
good pounded sugar to each pound of fruit and juice, and when it is
dissolved boil the preserve from twelve to fifteen minutes longer, and
skim it well during the time.
Seeded gooseberries, 4 lbs.; juice of gooseberries, 2 lbs.: 25
minutes. Sugar, 5-1/4 lbs. (or 14 oz. to each pound of fruit and juice):
12 to 15 minutes.
JELLY OF RIPE GOOSEBERRIES.

(Excellent.)
Take the tops and stalks from a gallon or more of any kind of well-
flavoured ripe red gooseberries, and keep them stirred gently over a
clear fire until they have yielded all their juice, which should then be
poured off without pressing the fruit, and passed first through a fine
sieve, and afterwards through a double muslin-strainer, or a jelly-
bag. Next weigh it, and to every three pounds add one of white
currant juice, which has previously been prepared in the same way;
boil these quickly for a quarter of an hour, then draw them from the
fire and stir to them half their weight of good sugar; when this is
dissolved, boil the jelly for six minutes longer, skim it thoroughly, and
pour it into jars or moulds. If a very large quantity be made, a few
minutes of additional boiling must be given to it before the sugar is
added.
Juice of red gooseberries, 3 lbs.; juice of white currants, 1 lb.: 15
minutes. Sugar, 2 lbs.: 6 minutes.
Obs.—The same proportion of red currant juice, mixed with that of
the gooseberries, makes an exceedingly nice jelly.
UNMIXED GOOSEBERRY JELLY.

Boil rapidly for ten minutes four pounds of the juice of red
gooseberries, prepared as in the preceding receipt; take it from the
fire, and stir in it until dissolved three pounds of sugar beaten to
powder; boil it again for five minutes, keeping it constantly stirred
and thoroughly skimmed.
Juice of red gooseberries, 4 lbs.: 10 minutes. Sugar, 3 lbs.: 5
minutes.
GOOSEBERRY PASTE.

Press through a sieve the gooseberries from which the juice has
been taken for jelly, without having been drained very closely from
them; weigh and then boil the pulp for upwards of an hour and a
quarter, or until it forms a dry paste in the pan; stir to it, off the fire,
six ounces of good pounded sugar for each pound of the fruit, and
when this is nearly dissolved boil the preserve from twenty to twenty-
five minutes, keeping it stirred without cessation, as it will be liable to
burn should this be neglected. Put it into moulds, or shallow pans,
and turn it out when wanted for table.
Pulp of gooseberries, 4 lbs.: 1-1/4 to 1-3/4 hour. Sugar, 1-1/2 lb.:
20 to 25 minutes.
TO DRY RIPE GOOSEBERRIES WITH SUGAR.

Cut the tops, but not the stalks, from some ripe gooseberries of
the largest size, either red or green ones, and after having taken out
the seeds as directed for unripe gooseberries, boil the fruit until clear
and tender, in syrup made with a pound of sugar to the pint of water,
boiled until rather thick.
Seeded gooseberries, 2 lbs.; sugar, 1-1/2 lb.; water, 1 pint: boiled
to syrup. Gooseberries, simmered 8 to 12 minutes, or more.
Obs.—Large ripe gooseberries freed from the blossoms, and put
into cold syrup in which cherries or any other fruit has been boiled for
drying, then heated very gradually, and kept at the point of boiling for
a few minutes before they are set by for a couple of days, answer
extremely well as a dry preserve. On the third day the syrup should
be drained from them, simmered, skimmed, and poured on them the
instant it is taken from the fire; in forty-eight hours after, they may be
drained from it and laid singly upon plates or dishes, and placed in a
gentle stove.
JAM OF KENTISH OR FLEMISH CHERRIES.

This is a very agreeable preserve when it is made as we shall


direct; but if long boiled with a large proportion of sugar, as it
frequently is, both the bright colour and the pleasant flavour of the
cherries will be destroyed.
Stone, and then weigh the fruit; heat it rather slowly that the juice
may be well drawn out before it begins to boil, and stew the cherries
until they are tolerably tender, then boil them quickly, keeping them
well turned and stirred from the bottom of the pan, for three-quarters
of an hour or somewhat longer should there still remain a large
quantity of juice. Draw the pan from the fire, and stir in gradually half
a pound of sugar for each pound of cherries. An ounce or two more
may occasionally be required when the fruit is more than usually
acid, and also when a quite sweet preserve is liked. When the sugar
is dissolved continue the boiling rapidly for about twenty minutes
longer; clear off all the scum as it appears, and keep the jam stirred
well and constantly, but not quickly, to prevent its adhering to the
bottom of the preserving-pan.
Stoned Kentish or Flemish cherries, 6 lbs.: without sugar, 1 hour or
rather more. Sugar roughly powdered, 3 lbs.: (or 3-1/2 lbs.) About 20
minutes quick boiling.
Obs.—Heat the fruit and boil it gently until it is quite tender, turning
it often, and pressing it down into the juice; then quicken the boiling
to evaporate the juice before the sugar is added. Cherries which are
bruised will not make good preserve: they always remain tough.
TO DRY CHERRIES WITH SUGAR.

(A quick and easy method.)


Stone some fine, sound, Kentish or Flemish cherries; put them into
a preserving-pan, with six ounces of sugar reduced to powder, to
each pound of the fruit; set them over a moderate fire, and simmer
them gently for nearly or quite twenty minutes; let them remain in the
syrup until they are a little cooled, then turn them into a sieve, and
before they are cold lay them singly on dishes, and dry them very
gradually, as directed for other fruits. When the cherries are quite
ripe the stones may generally be drawn out with the stalks, by
pressing the fruit gently at the same time; but when this method fails,
they must be extracted with a new quill, cut round at the end: those
of the very short-stalked, turnip-shaped cherry, which abounds, and
is remarkably fine in many parts of Normandy, and which we have
occasionally met with here, though it is not, we believe, very
abundant in our markets, are easily removed with a large pin, on the
point of which the stone may be caught at the stalk end, just
opposite the seam of the fruit, and drawn out at the top, leaving the
cherry apparently entire.
DRIED CHERRIES.

(Superior Receipt.)
To each pound of cherries weighed after they are stoned, add
eight ounces of good sugar, and boil them very softly for ten minutes:
pour them into a large bowl or pan, and leave them for two days in
the syrup; then simmer them again for ten minutes, and set them by
in it for two or three days; drain them slightly, and dry them very
slowly, as directed in the previous receipts. Keep them in jars or tin
canisters, when done. These cherries are generally preferred to such
as are dried with a larger proportion of sugar; but when the taste is in
favour of the latter, from twelve to sixteen ounces can be allowed to
the pound of fruit, which may then be potted in the syrup and dried at
any time; though we think the flavour of the cherries is better
preserved when this is done within a fortnight of their being boiled.
Cherries, stoned, 8 lbs.; sugar, 4 lbs.: 10 minutes. Left two or three
days. Boiled again, 10 minutes; left two days; drained and dried.
CHERRIES DRIED WITHOUT SUGAR.

These are often more pleasant and refreshing to invalids and


travellers than a sweetened confection of the fruit, their flavour and
agreeable acidity being well preserved when they are simply spread
on dishes or hamper-lids, and slowly dried.[167] Throw aside the
bruised and decayed fruit, and arrange the remainder singly, and
with the stalks uppermost on the dishes. The Kentish cherries are
best for the purpose, but morellas also answer for it excellently. The
former are sometimes stoned, and simmered until quite tender in
their own juice, before they are dried; but this is scarcely an
improvement on the more usual method of leaving them entire.
167. The dishes on which they are laid should be changed daily.
TO DRY MORELLA CHERRIES.

Take off the stalks but do not stone the fruit; weigh and add to it an
equal quantity of the best sugar reduced quite to powder, strew it
over the cherries and let them stand for half an hour; then turn them
gently into a preserving-pan, and simmer them softly from five to
seven minutes. Drain them from the syrup, and dry them like the
Kentish cherries. They make a very fine confection.

You might also like