100% found this document useful (1 vote)
23 views

Beginning Java SE 6 Game Programming 3rd Edition Jonathan S. Harbour - Download the full set of chapters carefully compiled

The document provides information on downloading the 'Beginning Java SE 6 Game Programming 3rd Edition' by Jonathan S. Harbour, along with links to other related ebooks. It includes details about the book's content, author, and publication information. Additionally, it highlights the availability of various other programming-related ebooks on the same platform.

Uploaded by

yuritanadage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
23 views

Beginning Java SE 6 Game Programming 3rd Edition Jonathan S. Harbour - Download the full set of chapters carefully compiled

The document provides information on downloading the 'Beginning Java SE 6 Game Programming 3rd Edition' by Jonathan S. Harbour, along with links to other related ebooks. It includes details about the book's content, author, and publication information. Additionally, it highlights the availability of various other programming-related ebooks on the same platform.

Uploaded by

yuritanadage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Visit ebookfinal.

com to download the full version and


explore more ebooks or textbooks

Beginning Java SE 6 Game Programming 3rd Edition


Jonathan S. Harbour

_____ Click the link below to download _____


https://ebookfinal.com/download/beginning-java-se-6-game-
programming-3rd-edition-jonathan-s-harbour/

Explore and download more ebooks or textbook at ebookfinal.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Beginning Game Programming 1st Edition Jonathan S. Harbour

https://ebookfinal.com/download/beginning-game-programming-1st-
edition-jonathan-s-harbour/

Microsoft Visual Basic Game Programming for Teens 2nd


Edition Jonathan S.(Jonathan S. Harbour) Harbour

https://ebookfinal.com/download/microsoft-visual-basic-game-
programming-for-teens-2nd-edition-jonathan-s-jonathan-s-harbour-
harbour/

More Python Programming for the Absolute Beginner 1st


Edition Jonathan S. Harbour

https://ebookfinal.com/download/more-python-programming-for-the-
absolute-beginner-1st-edition-jonathan-s-harbour/

Microsoft Visual Basic NET Programming for the Absolute


Beginner 1st Edition Jonathan S. Harbour

https://ebookfinal.com/download/microsoft-visual-basic-net-
programming-for-the-absolute-beginner-1st-edition-jonathan-s-harbour/
Beginning EJB 3 Java EE 7 edition Jonathan Wetherbee

https://ebookfinal.com/download/beginning-ejb-3-java-ee-7-edition-
jonathan-wetherbee/

Beginning OpenGL Game Programming 1st Edition Dave Astle

https://ebookfinal.com/download/beginning-opengl-game-programming-1st-
edition-dave-astle/

Beginning OpenGL Game Programming 1st Edition Dave Astle

https://ebookfinal.com/download/beginning-opengl-game-programming-1st-
edition-dave-astle-2/

Beginning DirectX 11 Game Programming 1st Edition Allen


Sherrod

https://ebookfinal.com/download/beginning-directx-11-game-
programming-1st-edition-allen-sherrod/

Beginning C Through Game Programming 4th Edition Michael


Dawson

https://ebookfinal.com/download/beginning-c-through-game-
programming-4th-edition-michael-dawson/
Beginning Java SE 6 Game Programming 3rd Edition
Jonathan S. Harbour Digital Instant Download
Author(s): Jonathan S. Harbour
ISBN(s): 9781435458086, 1435458087
Edition: 3
File Details: PDF, 4.12 MB
Year: 2011
Language: english

R

Beginning Java
SE 6 Game
Programming,
Third Edition

Jonathan S. Harbour

Course Technology PTR


A part of Cengage Learning

Australia . Brazil . Japan . Korea . Mexico . Singapore . Spain . United Kingdom . United States
Beginning Java SE 6 © 2012 Course Technology, a part of Cengage Learning.
R

Game Programming, Third Edition ALL RIGHTS RESERVED. No part of this work covered by the copyright
Jonathan S. Harbour herein may be reproduced, transmitted, stored, or used in any form or
Publisher and General Manager, by any means graphic, electronic, or mechanical, including but not
Course Technology PTR: Stacy L. Hiquet limited to photocopying, recording, scanning, digitizing, taping, Web
distribution, information networks, or information storage and retrieval
Associate Director of Marketing:
systems, except as permitted under Section 107 or 108 of the 1976
Sarah Panella
United States Copyright Act, without the prior written permission of the
Manager of Editorial Services: publisher.
Heather Talbot
Marketing Manager: Jordan Castellani
For product information and technology assistance, contact us at
Senior Acquisitions Editor: Emi Smith Cengage Learning Customer & Sales Support, 1-800-354-9706
Project Editor: Jenny Davidson
For permission to use material from this text or product,
Technical Reviewer: Dustin Clingman submit all requests online at www.cengage.com/permissions
Interior Layout Tech: MPS Limited, a Macmillan Further permissions questions can be emailed to
Company permissionrequest@cengage.com
Cover Designer: Mike Tanamachi
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
Indexer: Larry Sweazy
All other trademarks are the property of their respective owners.
Proofreader: Michael Beady
All images © Cengage Learning unless otherwise noted.

Library of Congress Control Number: 2010942436

ISBN-13: 978-1-4354-5808-6

ISBN-10: 1-4354-5808-7
eISBN-10: 1-4354-5809-5

Course Technology, a part of Cengage Learning


20 Channel Center Street
Boston, MA 02210
USA

Cengage Learning is a leading provider of customized learning solutions


with office locations around the globe, including Singapore, the United
Kingdom, Australia, Mexico, Brazil, and Japan. Locate your local office at:
international.cengage.com/region

Cengage Learning products are represented in Canada by Nelson


Education, Ltd.

For your lifelong learning solutions, visit courseptr.com

Visit our corporate website at cengage.com

Printed in the United States of America


1 2 3 4 5 6 7 12 11 10
For Kaitlyn Faye
Acknowledgments

Thank you to my wife, Jennifer, and kids—Jeremiah, Kayleigh, Kaitlyn, and


Kourtney—for keeping me on my toes and getting me out of the office from time to
time for a needed break! Special thanks to artists Ari Feldman (www.flyingyogi.com)
and Reiner Prokein (www.reinerstileset.de) for the 2D sprite artwork used in the
examples and final game (without their free collections of sprites, Galactic War
would have featured programmer art—yikes!). A big thank you to Emi Smith, Jenny
Davidson, and Dustin Clingman.
About the Author

Jonathan S. Harbour has been programming video games since the 1980s. His
first video game system was an Atari 2600 that he disassembled on the floor of his
room at age 9. He has written on languages and subjects that include Cþþ, C#,
Basic, Java, DirectX, Allegro, Lua, DarkBasic, XNA Game Studio, Pocket PC,
Nintendo GBA, and game console hacking. He is the author of Visual Basic Game
Programming for Teens, Third Edition; Visual C# Game Programming for Teens;
Beginning Game Programming, Third Edition; Multi-Threaded Game Engine
Design; and XNA Game Studio 4.0 for Xbox 360 Developers. Visit his blog and
forum at www.jharbour.com.
Contents

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii

PART I JAVA FOR BEGINNERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1


Chapter 1 Getting Started with Java . . . . . . . . . . . . . . . . . . . . . . . . . 3
Java and the Web . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . 3
Studying the Market . . . . . . . . . . . . ........ . . . . . . . . . . . . . . 4
Design Rules . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . 5
The Casual Games Market . . . . . . . . . . ........ . . . . . . . . . . . . . . 6
No Manual Required . . . . . . . . . . . . ........ . . . . . . . . . . . . . . 7
Casual Games . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . . 8
Installing and Configuring Java . . . . . . ........ . . . . . . . . . . . . . 10
Installing Java . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . 11
Configuring the Java Command-Line Compiler . . . . . . . . . . . . . . 12
Java Version Numbers . . . . . . . . . . . ........ . . . . . . . . . . . . . 15
Java SE 6 Development Kit . . . . . . . ........ . . . . . . . . . . . . . 16
Java Development Environments . . . ........ . . . . . . . . . . . . . 17
Your First Java Program . . . . . . . . . . . . ........ . . . . . . . . . . . . . 19
Java Application . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . 19
Java Applet . . . . . . . . . . . . . . . . . . . ........ . . . . . . . . . . . . . 21
Creating a NetBeans Project . . . . . . ........ . . . . . . . . . . . . . 27
Creating an Eclipse Project . . . . . . . ........ . . . . . . . . . . . . . 29
JFrame-Powered Application . . . . . . ........ . . . . . . . . . . . . . 33

vi
Contents vii

What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37


Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

Chapter 2 Java Programming Essentials . . . . . . . . . . . . . . . . . . . . . . 41


Java Applets and Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Web Server Technology Explained . . . . . . . . . . . . . . . . . . . . . . . 42
Hosting Java Applets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Compiling Java Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
The Java Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Java Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
The Essence of Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
The main Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Object-Oriented Programming . . . . . . . . . . . . . . . . . . . . . . . . . . 59
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Chapter 3 Creating Your First Java Game . . . . . . . . . . . . . . . . . . . . 69


About the Game Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Creating the Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Creating the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
The BaseVectorShape Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
The Ship Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
The Bullet Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
The Asteroid Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
The Main Source Code File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
viii Contents

PART II JAVA GAME PROGRAMMING . . . . . . . . . . . . . . . . . . . . . . . . 95


Chapter 4 Vector-Based Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Programming Vector Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Working with Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Working with Polygons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Rotating and Scaling Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . 103
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

Chapter 5 Bitmap-Based Graphics . . . . . . . . . . . . . . . . . . . . . . . . . 109


Programming Bitmapped Graphics . . . . . . . . . . . . . . . . . . . . . . . . 109
Loading and Drawing Images . . . . . . . . . . . . . . . . . . . . . . . . . 110
Applying Transforms to Images . . . . . . . . . . . . . . . . . . . . . . . . 112
Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Opaque Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Transparent Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Working Some Masking Magic . . . . . . . . . . . . . . . . . . . . . . . . 119
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

Chapter 6 Simple Sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125


Programming Simple Sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
Basic Game Entities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
The ImageEntity Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Creating a Reusable Sprite Class . . . . . . . . . . . . . . . . . . . . . . . . . . 131
Collision Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Sprite Class Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Testing the Sprite Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Contents ix

Chapter 7 Sprite Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141


Sprite Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Animation Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
Drawing Individual Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Keeping Track of Animation Frames . . . . . . . . . . . . . . . . . . . . 145
Testing Sprite Animation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Encapsulating Sprite Animation in a Class . . . . . . . . . . . . . . . . 151
Testing the New AnimatedSprite Class . . . . . . . . . . . . . . . . . . . 156
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

Chapter 8 Keyboard and Mouse Input . . . . . . . . . . . . . . . . . . . . . . 161


Listening to the User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Keyboard Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Listening for Keyboard Events . . . . . . . . . . . . . . . . . . . . . . . . . 162
Testing Keyboard Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Mouse Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Reading Mouse Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Detecting Mouse Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Testing Mouse Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174

Chapter 9 Sound Effects and Music . . . . . . . . . . . . . . . . . . . . . . . . 175


Playing Digital Sample Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Getting Started with Java Sound . . . . . . . . . . . . . . . . . . . . . . . 177
Playing Sounds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Playing MIDI Sequence Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Loading a MIDI File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Playing Music . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
x Contents

Reusable Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189


The SoundClip Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
The MidiSequence Class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

Chapter 10 Timing and the Game Loop . . . . . . . . . . . . . . . . . . . . . . 199


The Potency of a Game Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
A Simple Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Overriding Some Default Behaviors . . . . . . . . . . . . . . . . . . . . . 203
Feeling Loopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Stepping Up to Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
Starting and Stopping the Thread . . . . . . . . . . . . . . . . . . . . . . 204
The ThreadedLoop Program . . . . . . . . . . . . . . . . . . . . . . . . . . 205
Examining Multithreading . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Exercise 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
Exercise 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

PART III THE GALACTIC WAR PROJECT . . . . . . . . . . . . . . . . . . . . . . . 211


Chapter 11 Galactic War: From Vectors to Bitmaps . . . . . . . . . . . . . 213
Improving the Game . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Generalizing the Vector Classes . . . . . . . . . . . . . . . . . . . . . . . . 214
The Main Source Code File: GalacticWar.java . . . . . . . . . . . . . . 217
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

Chapter 12 Galactic War: Sprites and Collision Boxes . . . . . . . . . . . . 225


Creating the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
The Galactic War Bitmaps . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
The New and Improved Source Code . . . . . . . . . . . . . . . . . . . . 228
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
Contents xi

Chapter 13 Galactic War: Squashed by Space Rocks . . . . . . . . . . . . . 245


Being Civilized about Collisions . . . . . . . . . . . . . . . . . . . . . . . . . . 245
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

Chapter 14 Galactic War: Entity Management . . . . . . . . . . . . . . . . . 253


Adjusting to Event-Driven Programming . . . . . . . . . . . . . . . . . . . . 254
Exploring the Class Library . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Building the New Game Class . . . . . . . . . . . . . . . . . . . . . . . . . 256
Enhancing Galactic War . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Exploring the New Galactic War Source Code . . . . . . . . . . . . . 268
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294

Chapter 15 Galactic War: Finishing the Game . . . . . . . . . . . . . . . . . 295


Let’s Talk about Power-Ups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Ship and Bonus-Point Power-Ups . . . . . . . . . . . . . . . . . . . . . . . 296
Weapon Upgrades . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Enhancing Galactic War . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
New Sprite Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
New Game States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
New Sprite Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Health/Shield Meters, Score, Firepower, and Game
State Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
New Input Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Sound and Music Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Loading Media Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Game State Issue—Resetting the Game . . . . . . . . . . . . . . . . . . 308
Detecting the Game-Over State . . . . . . . . . . . . . . . . . . . . . . . . 309
Screen Refresh Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Preparing to End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Updating New Sprites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Grabbing Power-Ups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
New Input Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Spawning Power-Ups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Making the Shield Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Making Use of Weapon Upgrade Power-Ups . . . . . . . . . . . . . . 324
Tallying the Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
xii Contents

What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328


Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
On Your Own . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

Chapter 16 Galactic War: Web Deployment . . . . . . . . . . . . . . . . . . . 331


Packaging an Applet in a Java Archive (JAR) . . . . . . . . . . . . . . . . 331
Using the jar.exe Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Packaging Galactic War in a Java Archive . . . . . . . . . . . . . . . . 334
Creating an HTML Host File for Your Applet . . . . . . . . . . . . . . . . 338
A Simple HTML File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Testing the Deployed Applet Game . . . . . . . . . . . . . . . . . . . . . 339
What You Have Learned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Review Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Epilogue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342

Appendix Chapter Quiz Answers . . . . . . . . . . . . . . . . . . . . . . . . . 345

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Introduction

This book will teach you how to create games with the awesome Java language.
Previous editions emphasized the casual game market with chapter projects
designed to run in AppletViewer or in a web browser. While still relevant, the
code in this new edition is a bit simpler, using a JFrame more often instead of an
applet, so that examples can be run as a Java application. Some chapters still
feature applet projects, while many others are now JFrame-based applications.
The final Galactic War project in Part III is still an applet, since a focus of the book
is an emphasis on the casual game market. Game programming is a challenging
subject, and it can be difficult to figure out how to get started. This book takes
away some of the mystery of game programming by explaining how to create a
game in Java. I assume that you have a little Java programming experience, but if
you have never used Java before you should be able to keep up. Chapter 2 provides
a quick summary of the language.
This book takes the approach that we can have fun while learning how to program
games. Typing in long source code listings out of a book is not fun, so I don’t ask
you to do that very much. Instead, you will learn to write short programs that
demonstrate the major topics, and over time you will get the hang of it. There is
no memorization required here, as I’m a firm believer that repetition and practice
is the best way to learn, not theory and memorization.

xiii
xiv Introduction

Definition
Java is a programming language, invented by Sun Microsystems, now owned by Oracle, and
largely maintained as a loosely constrained community project. The primary design goal of Java
was to build runtime binary files that will run on any computer system in the world without being
recompiled. This “compile one, run many” philosophy works! The Java compiler creates a
bytecode binary file containing virtual machine instructions that the JRE (Java Runtime Envir-
onment) can execute on any computer system on which it is installed.

You will learn how to write a simple Java program in the first chapter. From there,
you will learn the details of how to write games that will run in a web browser or as
an application. We cover source code at a pace that will not leave you behind. By
the end of this book, you will have learned to create a complete game called
Galactic War, and will be able to deploy it to your website in a Java Archive (JAR)
file. I’m not talking about some half-baked simulation posing as a game. I’m
talking about a high-quality game, suitable for publishing in the casual game
market. There are thousands of casual gamers who are paying to download games
of this type from the many casual game sites on the web today—such as Real
Arcade (now www.GameHouse.com). By learning how to create a casual game,
you may even be preparing for a career in the game industry, developing games
for Microsoft Xbox Live Arcade and other commercial endeavors.

Definition
Web-based games are video games that are installed on a website and run in a web browser, so
that the end-users do not need to install the game. Some games are able to store high-score lists
and player data on the web server. The most popular type of web game is a “Casual Game” such
as Farmville on Facebook.

While we’re on the subject of casual games, you can even program your own Xbox
360 games, distributed on Xbox Live Arcade, using Microsoft’s free XNA Game
Studio Express software. Although this subject is beyond the scope of this book, I
bring it up because Microsoft’s C# language is unabashedly similar to Java. I have
another book on this subject titled XNA Game Studio 4.0 for Xbox 360 Developers
that you might want to check out.
It all begins here! Are you serious about this subject and willing to learn? As a
course developer and instructor of game development, I am scrutinized daily by
students who eat, drink, and breathe video games. I cannot create something that
stinks or I’ll never hear the end of it! So I am as motivated to teach you cutting-
edge game development techniques here as I am in a real classroom setting, by
Introduction xv

students who are paying a lot more than the retail cost of this book to learn these
concepts. I have used this book in several Java courses already, so you are guar-
anteed high-quality material in these pages that will not be a waste of your time. In
other words, this book has already been through the flames of scrutiny twice
before, so you are guaranteed a solid read and good, working code.

What Will You Learn in This Book?


This book will teach you the difference between Java applications and applets
(which run in a web browser). You will then learn about Java’s graphics classes
and begin writing graphics code. You will learn how to get input from the user,
and how to play sound effects and music—all within the context of an online
game. From there, the sky’s the limit! Figure 1 shows the game you will learn to
create in this book. Starting with the basics (and I’m talking about extreme basics
here!), you will write a simple 2D game using vector graphics (using lines and
filled polygons).

Figure 1
You will learn how to create this game from scratch!
xvi Introduction

You will then learn new techniques in each chapter, such as how to load a bitmap
file and render it on the 2D applet window using Java 2D classes like Graphics2D.
You will eventually put the handful of game-related classes together in an event-
driven game engine. As you can see from this screenshot, the final game uses some
attractive artwork and is chock full of small details! You will learn about simple
bitmaps and then sprites before getting into animation. Along the way, you will
learn how to use Java’s advanced 2D library to rotate and scale sprites, and I’ll
show you some interesting code that moves bullets, power-ups, asteroids, and
other game objects on the screen smoothly and realistically. The end result is a
professional sprite-based game engine that packs a serious punch! By learning
how to create this retail-quality casual game, you will have learned enough to
create your own games, suitable for sale in the casual game market (where games
are played over the web).

Definition
An applet is a limited type of Java program designed to run in a web browser. Due to security
restrictions, an applet is not able to access the file system on a user’s PC like a Java application,
which is installed like any other application software.

Since this book is dedicated to teaching the basics of game programming, it will
cover a lot of subjects very quickly, so you’ll need to read the chapters of this book
sequentially for best results. I use a casual writing style to make the subjects easy to
understand and use repetition rather than memorization to nail the points home.
You will learn by practice and will not need to struggle with any one subject,
because you will use them several times throughout the book. Each chapter builds
on the one before. The Galactic War game developed in Part III refers back to
previous chapters, so I recommend reading one chapter at a time, in order, to fully
understand everything that is going on. I tend to just use code after explaining
how it works the first time, and often do not explain something over and over
again because the book moves along at a brisk pace. We have a lot to cover in a
limited amount of space, so I recommend reading the book from start to finish.

What about the Programming Language?


This book is about game programming, and it assumes that you already know at
least some Java. I recommend that you acquire a Java primer to read before
delving into this book, or to keep handy for those parts that may confuse you. For
Introduction xvii

starters, you can pick up Java Programming for the Absolute Beginner, by Joseph
P. Russell (Cengage Learning). We do not utilize any advanced features of Java SE 6,
even though this is the latest version of Java, so if you are new to the language you
should be able to make the best of it by following along.
While covering some of the basics over the first three chapters, you’ll have created
a complete casual game in Java that runs in a web browser, which will be a
milestone as well as a measure of your own skill level at that point. As I men-
tioned, this book is not a primer on the Java language, but rather, makes use of this
very capable, high-level language to create games. You will find the code in this
book much easier to understand if you have at least read a primer on the subject.
We discuss game programming, not basic Java programming.
All of the projects in this book will compile with the Java SE 6 development kit.
While later versions (such as Java SE 7) will compile the code, older versions of
Java may complain about classes or methods that are not recognized.

What IDE Should You Use?


You will be able to compile the programs in this book using the javac.exe pro-
gram, and will run the programs using appletviewer.exe. We use an awesome little
editor called TextPad that can tie in to these command-line tools to compile and
run your Java code. We also explore and use NetBeans as an alternative devel-
opment environment (if you’re looking for a more professional experience).
The first version of this book focused on a professional IDE (Integrated Devel-
opment Environment) called JBuilder to help organize Java game projects.
However, much has changed in the five years since the first edition came out.
Borland JBuilder Foundation was a free trial version of JBuilder, and we were able
to support the 2005 and 2006 versions at the time. But Borland sold its develop-
ment tools division to Embarcadero, and it is a proprietary tool now for enterprise
development. We simply do not need to use commercial software to build Java
code—there are some great options in open source software today!
If a revision is meant to update a book, then it may seem odd to step away from
using a professional IDE. But that is exactly what many professional Java pro-
grammers are doing—utilizing a simple text editor and the Java SE 6 development
kit directly. There are many reasons why this is preferable, and the best expla-
nation may be a desire to avoid the adoption of any single IDE since there are no
standard project files in the industry, and each one is dramatically different. I
xviii Introduction

recommend using NetBeans or TextPad. NetBeans is absolutely free and fully


featured, but it’s kind of large and complex. TextPad is not free, but it is very
inexpensive (under $30) and has the great advantage of being lightweight and
simple. The main advantage to NetBeans is the programmer pop-up help built
into the editor that shows function parameters and class member lists. For those
who prefer Eclipse, we do spend some time with that IDE as well.
Avoiding any single IDE allows us to focus more on the Java code and this helps
with cross-platform development. The code in this book will compile and run on
the following systems:
n Windows (x86, x64, Itanium)
n Linux (x86, x64, Itanium)
n Solaris (SPARC, x86, x64)

Definition
Cross-platform development is the ability to compile and run the same code on many different
computer systems. Java code and executable files are supported on many platforms. You do not
need to recompile your Java code for every system, as the same .class file will run on all of them!

Due to this extensive list of supported operating systems, it is obvious why we


would not want to limit ourselves to a single IDE, but would prefer to support all
of these systems. As a consequence, none of the source code in the book resource
files include any project files, but merely source code files and assets (image and
sound files).

Tip
You will be using Java SE 6 (i.e. “Java Standard Edition 6”), which is the lightweight version of
Java best suited for creating standalone and web-based games. Our text editor of choice is
TextPad 5.0, which can compile your Java source code files with a macro key.

TextPad is a small, easy-to-use source code editor that recognizes the Java
Development Kit and is able to compile your Java code with a simple macro
(Ctrlþ1). By using TextPad as our “IDE”, you’ll be working directly with the file
system on your hard drive rather than a virtual project manager (such as the one
in NetBeans). In TextPad, you’ll see the actual files on your drive, and there is no
concept of “adding” files to a “project” because you are working with your source
Introduction xix

files directly. I recommend purchasing a license of TextPad from www.textpad.


com. Sure, there are free editors available, but none that I have found with the
feature set and stability of TextPad. For example, two freeware products, Pro-
grammer’s Notepad and Notepadþþ, both seem to have stability problems in
Windows 7.

Conventions Used in This Book


The following styles are used in this book to highlight portions of text that are
important. You will find these highlighted boxes here and there throughout the
book.

Note
This is what a note looks like. Notes are additional information related to the text.

Tip
This is what a tip looks like. Tips give you pointers in the current tutorial being covered.

Caution
This is what a caution looks like. Cautions provide you with guidance and what to do or not do in
a given situation.

Definition
This is what a definition looks like. Definitions will explain the meaning behind a technical concept
or word.

Companion Web Site Downloads


You may download the companion website files from www.courseptr.com/
downloads. Please note that you will be redirected to our Cengage Learning site.
Discovering Diverse Content Through
Random Scribd Documents
flags flying.
He was then persuaded to let himself be made a public show, and
hired himself out at some of the minor London theatres to be
exhibited as “Jeffrey the Sailor.” After a few months he returned to
Polperro with money in his pocket enough to purchase a small
schooner intended for the coasting trade.
The speculation was unsuccessful. Jeffrey fell into consumption,
and died leaving a wife and daughter in great poverty.
Polperro was also a notorious hole for smugglers. The last affair
with them in which life was lost was in 1810, or thereabouts.
One morning a lugger was descried by the crew of the revenue
boat, then stationed on shore. She was lying becalmed in Whitsand
Bay. The glass informed them that it was the Lottery, of Polperro,
well known for her fast sailing qualities, as well as for the hardihood
of her crew. There was little doubt that with the springing up of the
breeze she would put to sea. Accordingly the officer in command,
with all despatch, manned two or three boats and put off, making
sure of a rare capture, for there seemed little chance of an escape.
Their movements were, however, observed by the smugglers,
who made preparations for resistance. The boats, on seeing their
intentions, commenced firing when at a considerable distance; but it
was not until they had approached her pretty near that the shots
were returned from the lugger, which now assumed an unmistakable
attitude of defiance. When within a few yards of the expected prize,
Ambrose Bowden, who pulled the bow-oar of one of the attacking
boats, fell mortally wounded.
It was plain that the Polperro men had come to a determination
not to give up their fine craft and valuable cargo without a struggle,
so the boats withdrew, and allowed the Lottery to proceed to sea.
This affray was reported to the authorities, and orders were issued
at all hazards to arrest the vessel and her crew. The smugglers were
alarmed at what had been done, and at the dogged manner in which
the officers of justice pursued them. They were kept continually
concealed in pilchard cellars, in barns, in closets, and were liable at
dead of night to have their houses surrounded and searched by a
troop of dragoons, who made stealthy descents on the town.
At length a certain Toms, who had formed one of the crew of the
Lottery, gave himself up, and declared that a man named Tom Potter
had fired the fatal shot.
The Polperro people made common cause of this, and resolved at
once to preserve Potter and to punish Toms. The revenue men knew
the danger in which the latter stood, and they took him on board a
cutter cruising off the coast
On a certain occasion the cutter was off Polruan, when some of
the Polperro men persuaded Toms’ wife to decoy him on land,
solemnly assuring her that they would not touch his life, and that all
they desired was to remove the only evidence that existed against
Potter.
She fell in with their wishes, and by her means Toms was seized
and at once carried off, kept in hiding-places till an opportunity
occurred, when he was shipped to Guernsey, preparatory to
conveying him to America. But he was traced, and was pounced on
by the Government officers in the hold of an outward-bound vessel.
Meanwhile the dragoons, who had been engaged in the search at
home, discovered that their movements were observed, and that
intelligence of their approach from Plymouth was sure to precede
them to Polperro. A detachment was therefore sent to Truro, with
orders to march from the west, in which way they were enabled to
come on Polperro unobserved. On one of these visits Potter was
captured. He was taken to London, tried at the Old Bailey, convicted
on the evidence of Toms, and hanged. The evidence, however, was
strongly believed to be false. The shot had entered the breast of
Bowden in a direction opposite to the fire of the smugglers; and one
of the coastguardsmen who were engaged in the affair averred that
the unfortunate man Bowden was accidentally shot by one of his
own crew.
Toms was never able to show his face again in Polperro, and a
place was found for him in a menial capacity in Newgate, where he
ended his days.
Lanreath stands between the Fowey and the Looe rivers, about
midway. It has a fine church with a beautiful screen. Usually the
paintings on these screens are mere daubs, but such as remain at
Lanreath, though sadly defaced, show that there was at the end of
the fifteenth or beginning of the sixteenth century a school of real
artists in the West. Unhappily, only scanty remains of the paintings
can be seen. A late rector is said to have proposed to scrape one
half the screen if the parish would do the other half. Accordingly he
effaced all the beautiful painted work of the portion between nave
and chancel. The parish, however, did not like this sort of
“restoration,” and happily refused to complete the defacing of this
work of art.
Court, near the church, is the old nest of the Grylls family, a
picturesque mansion containing much of interest. It is in such a
ruinous condition that it will have to be largely rebuilt, but the
owner, Mr. T. H. Spry, purposes doing this in a thoroughly
conservative spirit. The house contains one very handsome room
with rich carved oak panelling.
Note.—​Books to be consulted on Looe and Polperro:—​
Bond (T.), Topographical and Historical Sketches of East and West
Looe. London, 1823.
Couch (T. Q.), The History of Polperro. Truro, 1871.
CHAPTER XIII.

FOWEY
Derivation of the name Fowey—​The Fowey river—​Lostwithiel—​A
rotten borough—​Old Stannary Court—​S. Winnow—​His Settlement
in Brittany—​Beating the bounds—​Golant—​S. Samson—​Dol—​Tower
of Fowey—​Place—​S. Finbar—​The “Lugger Inn”—​Polruan—​The
Mohun family—​Death of Lord Mohun—​The Rashleigh family—​Sale
of the borough.
Although pronounced Foye, the name of the place is spelled Fowey;
it takes its appellation from the river. Mr. Ferguson, in his River
Names of Europe, derives this from the Gaelic fuair, sound, faoi, a
rising stream, and instances the Foyers in Inverness, and the Gaur in
Perthshire, for fuair takes also the form gaoir, signifying din, and the
Foyers is noted as forming one of the finest falls in Britain. But this
won’t do. The Foye is the meekest, quietest, and most unbrawling of
rivers. The name is identical with that of the Fal, but the l has been
dropped, and both derive from falbh, running, waving, flowing.
FOWEY HARBOUR
LOSTWITHIEL BRIDGE

The river takes its rise on High Moor under Buttern Hill on the
Bodmin moors, a mile north-west of Fowey Well that is under Brown
Willy, which probably takes its name from being supposed to ebb
and flow with the tide, which, however, it does not. The river has a
fall of nine hundred feet before it reaches the sea. It does not
present anything remarkable till it comes in sight of the highway
from Liskeard to Bodmin, as also of the railway, when at once it
turns sharply to the west, at right angles to its previous course, and
runs through a well-wooded and picturesque valley under the camp
of Largin. Then, after flowing side by side with road and rail till it
reaches Bodmin Road Station, it turns abruptly south, attending the
railway to Lostwithiel, slipping under Restormel Castle.
Lostwithiel is not Lost-wi’in-a-hill as is the popular derivation, but
Les-Gwythiel, the palace in the wood, as Liskeard is that on the rock.
It is charmingly situated.
It is an old rotten borough, once in the hands of the Earls of
Mount Edgcumbe. But before that it was a seat of the Stannary
Court for Cornwall, and here the Dukes of Cornwall had their palace.
Of this considerable remains exist, but it has been meddled with,
and vulgarised by the insertion of quite unsuitable windows.
The church is interesting; it possesses a fine lantern of a
character nowhere else met with in the West. Anciently the tide
came up as far as the town, and the portreeve had rights over the
river, for which reason the town arms are represented with an oar.
Below the town the river to Fowey is full of beauty. It passes S.
Winnow, with fine fifteenth-century glass; the church is beautifully
situated. Here is a chapel of S. Nectan, of Hartland, to which was
attached a college of secular priests endowed by Gytha, wife of
Godwin, Earl of Kent. The priests of this college were married and
allowed to marry, as all Celtic clergy were.
S. Winnow was son of Gildas the historian. Gildas and Finian were
together for some time at S. David’s monastery, and became close
friends. Then Gildas entrusted his son Winnoc, or Winnow, to Finian
to be educated, and Finian took the boy with him to Clonard and
educated him. When Winnoc thought that it was time for him to
leave, he returned to Britain and settled in Cornwall. As he was allied
to the royal family, he received large grants of land, and certainly
chose a lovely spot for his establishment. S. Veep, or Wennapa, was
his aunt, and he served as her spiritual adviser. After a while, for
some reason unknown, but probably on account of a breeze with his
kinsman King Constantine, whom Winnow’s father, Gildas, has
abused in the most uncompromising terms, and Constantine’s
mother as well, Winnow left Cornwall and settled in Brittany. He was
accompanied by his brother Madoc and his sister, whom the Welsh
call Dolgar and the Bretons Tugdonia. He landed in the
neighbourhood of Brest, where he was found by Conmor, Count of
Vannes, the usurper, who was killed in 500. Conmor granted him as
much land as he could enclose in a day. The story goes that Madoc,
or Madan, as the Bretons call him,[18] took a pitchfork and drew it
behind him, and it formed a ditch and a bank that enclosed a bit of
land. The fosse and embankment exist to the present day, and the
story means no more than that under Madoc’s supervision the lis or
rath was thrown up to enclose the monastic settlement.
Within this defensive work Winnow constituted his establishment,
built a church, and erected a number of beehive cells. Outside he set
up stones to mark the bounds of his minihi, or sanctuary, and all
who took refuge in this were allowed to pass under his protection
and become members of his tribe.
One day Winnow went to Quimperlé, where some building was in
progress. He incautiously stood under the scaffolding, and a mason
who was above let fall his hammer on his head. This killed him.
The Welsh call him Gwynnog, and the Bretons Gouzenou. A very
funny story is told of his establishment. It became a custom to beat
the bounds every Ascension Day. The clergy with banners, and
preceded by a cross, led the procession. One day the rain came
down in torrents, and the clergy did not relish being wet to the skin,
so they decided not to beat the bounds. However, cross and banners
would not be done out of their little flirt, and to the astonishment of
all, away they trotted, none bearing them, and made the rounds by
themselves. Popular tradition is prudently silent as to when this took
place.
That Winnow should have been forced to leave Cornwall after his
father had addressed the king in such forcible but inelegant terms as
“Tyrannical whelp of the unclean lioness of Dumnonia,” is not
surprising. You could not well stay in the house of a man in whose
face your venerable father has spat—​not if you have any self-
respect.
A little further down the river is Golant, or S. Samson. This is a
foundation of a man better known than S. Winnow. His story
deserves telling, at least so much of it as pertains to Cornwall.
Samson was son of Amwn the Black, Prince of Bro-Weroc in
Brittany, that is to say, the country about Vannes which had been
colonised by British settlers. There ensued a little family brawl, which
obliged Amwn to fly for his life. He escaped into Wales, where he
married Anne, daughter of the Prince of Glamorgan. Samson was
educated by S. Iltyd in Caldey Isle, and was taught “all the Old and
New Testament, and all sorts of philosophy, to wit, geometry and
rhetoric, grammar and arithmetic, and all the arts known in Britain.”
He devoted himself to the ecclesiastical state, and spent many
years in Wales. He paid a visit to Ireland, inspected the monasteries
there, and then returned to Wales, where he was ordained bishop.
After a while he considered that he might just as well try to get back
to Brittany, and see whether he could recover some of the authority
and the lands and position of which his father had been deprived.
Accordingly he crossed to Cornwall and landed at Padstow, where he
dedicated a little chapel, where now stands Prideaux Place. Here he
was visited by S. Petrock on his arrival, as also by S. Winnow, not
the Winnow of the Fowey river, but another, a brother of S.
Winwaloe, who had settled at Lewanick. He was related to Samson
through his mother.
The arrival of Petrock determined Samson to depart. He went on
to Petherwin, where his first cousin, S. Padarn, was settled. He had
brought with him all the sacred vessels and books he could collect,
and had laden with them a waggon, drawn by two horses that he
had brought from Ireland.
He sent forward a messenger to tell Padarn that he was on his
way, and drawing near. The story has been already told how the
news reached Padarn at the time he was dressing. Whilst in the
district of Trigg Samson made the acquaintance of the chieftain,
named Gwythiel, and rendered him some service with his son, who
was stunned by a fall from his horse. Gwythiel seems to have
followed him. Later on he became a disciple of S. Winwaloe, and
founded a church in West Cornwall. Samson went on to Northill,
where he remained for some time, and then proceeded to Golant.
His main object in remaining in Cornwall was to watch affairs in
Brittany. He had with him several companions—​disciples from Wales,
Austell, and Mewan and Erme. At Golant Samson continued till the
arrival of his cousin, Maglorius, with tidings from Brittany,
whereupon he entrusted his church to a disciple, crossed over, and
settled at Dol. Canno, prince of the blood royal, had murdered his
brother, the reigning prince, in 546, and had usurped the throne.
Judual, the son of the murdered king, had fled to the court of
Childebert, King of the Franks. Samson visited Paris, and used
persuasion to induce the Frank king to interfere and reinstate
Judual. Childebert would not do this, but finally gave Samson leave
to do what he could off his own bat. Samson then retired to the
Channel Islands, where he enlisted soldiers and drilled them, and
then landed on the Brittany coast, and proclaimed Judual. In the
meantime Mewan had acted as his agent, travelling through the
country preparing for a general revolt. Three bloody battles were
fought, and in the third Canno was killed by the hand of Prince
Judual, a.d. 560, whereupon Judual ascended the throne, and
rewarded Samson as liberally as he could have desired, but the
bishop died five years later. Samson must have spent a good many
years in Cornwall if he left Wales in 548 to escape the yellow plague
which was then ravaging the land.
At Golant the saying is that there is to be seen “a tree above the
tower, a well in the porch, and a chimney in the roof.” The tree was
probably once growing out of the stones on the top of the tower;
the well is there still, close to the entrance to the church, under a
rude arch. It is a holy well, and is said to have been a spring elicited
by Samson with his staff.
The church is late Perpendicular.[19] The pulpit and reading-desk
are made up of old bench-ends, representing apostles, the M of
Mary, and the lily of the Annunciation, and instruments of the
Passion.
On the tower of S. Austell under niches are representations of S.
Samson habited as an archbishop—​which he was not—​and his
disciple S. Austell. The reason of his being represented as an
archbishop is curious. In 848 Nominoe, King of Brittany, determined
to free his country from being Frenchified, and he not only made it
independent of the Frank crown, but he also dismissed the Frank
bishops from the Breton sees, and filled their places with native
prelates. He also elevated the see of Dol into an archbishopric over
all the British-speaking races in Armorica. Now it so happened that
there had been a Samson of York, but he was never more than a
priest, and he was quite a different man from Samson, son of Amwn
the Black, who settled at Dol. However, because York was an
archiepiscopal see, and a Samson had once been there, it was
supposed that he had been archbishop. Next he was confounded
with Samson of Dol, and it was pretended that he had resigned York
and come to Dol to set up his archiepiscopal see there. This served
quite well enough as an excuse for withdrawing Dol and all the
Breton bishoprics from allegiance to the Metropolitan of Tours; and
Dol was able to maintain itself as a Breton archbishropic till 1172,
that is to say, for over three hundred years.
Near S. Samson, or Golant, is Castle Dor, a very early fortification,
that was, in historic times, held by the Crown, and a castle erected
on the spot to keep the Cornish in order.
Fowey itself lies near the river-mouth; it much resembles a
miniature Dartmouth. Opposite the town opens the creek that runs
to Lanteglos. There were and are two castles, as at Dartmouth,
commanding the entrance to the harbour, but they are insignificant,
and form no feature of the scenery. Fowey is a curious, rambling
place—​one long street twisting in and out among houses,
commanded by Place, the beautiful mansion of the Treffry family,
that would have been entirely beautiful but for absurd and tasteless
additions. This stands on a rock above the town, which is crowded
below it.
The very fine church, with noble tower, is dedicated to, because
founded by, S. Finbar, afterwards Bishop of Cork. In 1336 Bishop
Grandisson rededicated the church to S. Nicholas. He sought
persistently to drive out the local and Celtic saints and substitute for
them such as were in the Roman calendar. But he has failed; the
Irish patron maintains his place. Finbar was a disciple of S. David.
His origin was not very creditable. He was the son of a noble lady by
a vulgar intrigue with a smith, for which both were sentenced to be
burnt alive, but the sentence was commuted to expulsion from the
kingdom of Connaught. Finbar’s real name was Lochan, but he
received the other in allusion to his fair hair.
In a gloss by the O’Clearys on the martyrology of Oengus is a
funny legend of S. Finbar. One day, as he was walking on the sea, on
his way home to Ireland from Cornwall, he met S. Scuthin similarly
walking, starting on his pilgrimage to Rome. “Arrah, now!” said
Finbar, “how come you to be walkin’ on the salt say?” “Why not?”
answered Scuthin; “ain’t I now walking over an illegant meadow?”
Then he stooped, plucked a purple flower, and threw it at Finbar.
The latter at once bowed, put down his hand, caught a salmon, and
threw it flop into S. Scuthin’s face. The O’Clearys got this from
popular legend. Finbar died in 623.
The only really picturesque old house in Fowey is the “Lugger
Inn,” where Mr. Varcoe, the kindly host, has, more than once, made
me very comfortable. A beam in the house bears the date 1633. The
“Ship” is older; it was built in 1570, as the date over the chimney-
piece records, but the house has been modernised externally. Near
the club, on the south side, stands the house of Peter Pindar.
Immediately opposite Fowey is Polruan, the Pool of S. Ruan, who
was an Irishman like Finbar. His bones were translated by Ordgar,
Earl of Devon, to Tavistock in 960. Thence an excursion can be made
to Lanteglos, dedicated to S. Wyllow, a local saint, murdered by a
kinsman, Melyn. The church is chiefly interesting as containing
monuments of the Mohun family. Indeed, it would seem to have
been their principal place after Dunster.
Reginald, a younger son of Baron John Mohun of Dunster (died
1330), married a daughter of John Fitz-William, and settled at Hall,
in Lanteglos. From Hall the Mohun family removed to Boconnoc, and
a baronetcy was obtained in 1612 for the head of the house. John,
son of the first baronet, was a venal adherent of Charles I., and
owed his elevation to the peerage mainly to the clamorous
importunities of a still more venal placeman, Sir James Bagg. Writing
to the Duke of Buckingham, the latter urged, “Mr. Mohun is so your
servant, as in life and fortune will be my second. Enable him by
honour to be fit for you; so in the Upper House or in the country will
he be the more advantageous to your grace.”
Mohun was created Baron of Okehampton in 1628. His great-
grandson was Charles, the fifth and last Lord Mohun. This man,
possessed of a passionate and vindictive temper, lost his father
early; his mother married again, and his education was neglected.
When he had scarcely attained the age of twenty he was mixed up
in the murder of Mountford, the actor. He was tried before his peers
in 1692, and was acquitted; but there can be no doubt that he was
associated in the murder. Seven years afterwards, in 1699, he was
again tried for his life, along with the Earl of Warwick, for the murder
of Captain Coote. He was again acquitted. This second escape
sobered him for a while. For long he and the Duke of Hamilton
entertained ill-feeling towards each other, occasioned by some
money disagreement. This came to a head in 1712, when it ended in
a challenge. Which it was, however, who challenged the other was
never certainly decided. Colonel Macartney was Lord Mohun’s
second, and Colonel Hamilton exercised the same office for the
duke. They met in Hyde Park on Saturday morning, the 15th
November, and swords were the weapons employed. A furious
encounter ensued, the combatants fighting to the death with the
savagery of demons, so that when the keepers of the park, hearing
the clash of swords, hurried to the spot, they found both the Duke of
Hamilton and Lord Mohun weltering in their blood and dying, and
the two seconds also engaged in mortal combat. The keepers
separated the latter. Then Colonel Hamilton and one keeper lifted
the duke; Macartney and the other endeavoured to do the same by
Lord Mohun, who, however, expired, and his body was sent home in
the coach that had brought him. Swift, writing to Stella at the time,
says that, “while the duke was over him, Mohun shortened his
sword, and stabbed him in the shoulder to the heart.” According to
the evidence of the surgeons who examined the bodies, each had
received four frightful wounds, and both appeared to have given
each other the mortal thrust at the same instant.
Fowey has for long been a nursery of Treffrys and Rashleighs,
though the latter really issue from a place called by the same name
near Eggesford, in Devon, where is an interesting old house, their
mansion, with beautiful Elizabethan plaster-work, and their very
peculiar arms—​a cross or between, in the dexter chief quarter a
Cornish chough arg., beaked and legged gu., in the sinister chief
quarter a text T, and in base two crescents, all arg. A coat, this, that
suggests that some story must be connected with its origin, but
what that story was is now forgotten. The history of Fowey is
interwoven with that of the Rashleighs and the Treffrys.
Fowey was one of the rotten boroughs that were disfranchised. It
was created by Elizabeth in 1571. In 1813 the borough manor of
Fowey, formerly the property of the Duchy, passed from the control
of the Rashleighs to Lucy of Charlescot, in Warwickshire; it was sold
for £20,000 and an expenditure of £60,000 to acquire whole
influence over voters. The Lucys opposed Lord Valletort, who had
represented the borough since 1790—​a long time for a Cornish
borough—​and desperate contests ensued, with varying success.
When disfranchisement came they found they had laid out vast
sums, and had nothing to show for it.
CHAPTER XIV.

THE FAL
Truro—​The cathedral—​Probus tower—​S. Kea—​Polgerran—​King
Geraint—​His tomb—​S. Just—​Mylor—​Falmouth a modern town—​
How it sprang up—​The Killigrews—​Arewenack—​A station for the
packets—​Church—​Pendennis Castle—​The Manacles—​The Black
Rock—​Mr. Trefusis of Trefusis—​S. Mawes Castle—​Roseland—​
Smuggling—​S. Mawes a borough—​S. Tudy—​The climate of
Falmouth.
The cathedral city of Cornwall is planted at the head of a long creek
that unites with the Tresillian river, and together they join the Fal.
The name is thought to signify Three Roads, that united at this
point. The town lies in a hollow, and the descent into it from the
railway station is considerable. It has been a place of more
consequence in the past than Bodmin, and several of the Cornish
county families had their town residences in Truro, going there for
the winter, to enjoy assembly balls and card parties.
The cathedral soars up above the houses, and is a fine structure,
doing vast credit to the county, which has strained every nerve to
erect it at a time of depression and the death of the chief industry.
When completed the effect will be very noble. One may regret that
the architect chose as his style a foreign type—​French Early Pointed
—​instead of adhering to the Perpendicular, which is that of the
churches of the county. Now, instead of looking like the mother of
these, which are her chicks, she holds herself up as of a distinct and
alien breed. The poorest features are its over-enriched porch, which
is elaborate without being pleasing, and the reredos, which looks as
if shorn away at the head, and cries out for rich pinnacle-work to
take off its ugly baldness. But perhaps the most pleasing portion of
the cathedral is S. Mary’s aisle, that belonged to the old parish
church. An enduring debt of gratitude is due to the first Bishop of
Truro, afterwards Archbishop of Canterbury, in making a bold stand
against the designing of the building being left to local incapacity.
A visit to Probus should on no account be omitted. The
magnificent tower is interesting as having been erected so late as
the reign of Elizabeth. The church is dedicated to S. Probus, to
whom also Sherborne Abbey was dedicated by Cenwalch. His history
is not known.
Just below Malpas, the point of juncture of the Truro river and
that of Tresillian, are the remains of Old Kea Church.
Kea is a contraction for Kenan. He was one of the hostages held
by Laogaire when S. Patrick came before him. Every high king in
Ireland retained about him hostages delivered over by the under
kings who acknowledged his sway. In fact, as an Irish law tract says,
“No hostages, no king,” and a king’s dun was always provided with a
court for the hostages. When S. Patrick preached before Laogaire
Kenan believed, and he obtained his release through the intervention
of the apostle, and was consecrated bishop by him.
For some unknown reason he left Ireland and visited Wales,
where he tarried for a while. Then he went further through Britain
till he reached the Fal estuary, then called Hir-drech, or the long tidal
creek. As he lay there on the grass where is now Tregothnan, he
heard men talking on the further side of the creek. Said one to
another, “Have you seen my cows anywhere?” The other replied,
“Aye, I have; I saw them yesterday in Rosinis.” Then Kea
remembered having heard a voice come to him in a dream, which
said, “Settle where you hear the name Rosinis called.”
So he crossed the water along with his comrades, and they set to
work to build huts where now stands Old Kea.
Now the king, or prince, lived at Goodern, where are still mounds
of a lis, and he was by no means pleased to hear that foreign monks
had settled on the river-bank without his permission.
He sent and had seven of the oxen and a cow belonging to Kea
taken from him. The legend says that seven stags came from the
forest, and allowed Kea to yoke them and make them draw the
plough. But this is a fabulous addition to the history. What is really
true is that he went to Goodern and remonstrated with the prince,
who was none other than Tewdrig, who behaved so roughly to the
colony of Irish saints in the Land’s End district. Tewdrig flew into a
passion and struck Kea in the mouth, so as to break one of his front
teeth.
However, shortly after this Tewdrig fell ill—​caught a heavy head-
cold perhaps—​and, thinking that he had been “ill-wished” by Kea,
hastily reconciled himself with the saint, and restored his oxen. The
Rosinis in the narrative is Roseland, but the Kestell Carveth, or Stag’s
Castle, where Kea made his first settlement, cannot be identified by
name, though it was probably what is now called Woodbury.
But the relations with Tewdrig continued strained, and the
condition of affairs was worse when the king fell from his horse and
broke his neck. Kea, fearing lest this should be imputed to him, as
occasioned by his “ill-wishing,” resolved on flight to Brittany. He went
to Landegu, i.e. Landege, the old name of the place, as we learn
from Bishop Stapleton’s Register (1310). Here was a merchant about
to send a cargo of corn to Brittany, and Kea, with his companions,
were permitted by the merchant to depart in the grain ship.
He reached the Brittany coast at Cleder, and there he remained till
the discord broke out between Arthur and Mordred, when Kea
returned to Britain, and endeavoured, but in vain, to reconcile them.
After the death of Arthur, it was Kea who told Queen Gwenever
some unpleasant home-truths, and induced her to retire into a
convent. Then, in 542, he returned to Cleder, where he died shortly
after at an advanced age. But this story of his connection with
Arthur and Gwenever is very problematical, indeed impossible to
reconcile with his history, if he was converted in 433. In Brittany he
is called S. Kay, or Kea, as in Cornwall.
A little lower down the river is the wooded slope of Polgerran, and
an ancient chapel stands above it. Gerran, or Geraint, was King of
Cornwall, and married Enid, daughter of the Count-in-Chief of
Cærleon. Tennyson has revivified her charming story. After the death
of Arthur, he seems to have been elected Pendragon, or high king,
over the Britons, and his life was spent in fighting the Saxons along
the frontier from the Roman wall down to the Severn. S. Senan, of
the Land’s End, was on good terms with him, and there is a story
told in the life of that saint concerning Geraint. The king had a fleet
of six score vessels in the Severn, and the fatal battle in which he
fell was at Langport on the Parret, whither at that time vessels could
ascend. His palace was at Dingerrein, in the parish of S. Gerrans in
Roseland. His tomb is shown at Carn Point, where he was said to lie
in a golden boat with silver oars, an interesting instance of
persistence of tradition in associating him with ships. When the
tumulus was broken into, in 1855, by treasure-seekers, a kistvaen
was discovered and bones, but no precious metal. As Geraint fell at
Langport he would hardly have been brought to Cornwall for
interment. But there were two other princes of Cornwall of the same
name, who reigned later.
The long Restronguet Creek enters the estuary of the Fal where
that estuary becomes wide and a fine sheet of water. The peninsula
is Roseland, the old Rosinis—​Moorland Isle.
Restronguet Creek has been choked with the wash coming down
from the mines and kaolin works. At one time it was a fine long arm
of water. Immediately opposite each other are Mylor and S. Just, the
latter hidden in a lovely creek and buried in trees. The interesting
little church stands by the water-side. It was founded by Just, or
Justin, one of the sons of Geraint. By an odd mistake, over the north
porch is inscribed, “I was glad when they said unto me, Let us go up
unto the house of the Lord,” whereas the congregation have to
descend to it some two hundred feet, and the churchyard gate is
level with the ridge of the roof.
Mylor Church is interesting as possessing old crosses with Celtic
interlaced work. There were formerly curious frescoes in the church.
It is dedicated to a prince of the blood royal. His father, Melyan, was
brother of the ruffian Tewdrig, who carried off S. Kea’s cows and
killed some of the Irish colonists. His uncles were S. Oudoc, Bishop
of Llandaff, and Ismael, a favourite pupil of S. David. But he had
another, an ambitious uncle named Howel, who asked Melyan to
meet him, and suddenly and treacherously stabbed him, in 537. This
probably took place not far from Par, where are a Lan-melyan and a
Merthan close together, indicative of a place of martyrdom, and a
chapel to the martyred prince. Howel at once assumed the crown
over Cornwall and Devon. In order to incapacitate his nephew Melor,
son of the murdered Melyan, from menacing his throne, he had his
right hand and one foot cut off, as by Celtic law no cripple or
disfigured person is qualified to become a chief or a prince. Melor
was sent into Brittany. But there he became such an object of
interest and sympathy, that Howel was afraid, and had him also
secretly assassinated.
The wonderful harbour of Falmouth now bursts on the view,
almost closed between the jaws of Pendennis Point and S. Anthony’s
Head.
A creek runs up to the right to Penryn, and on the left, another
penetrates deep into Roseland.
Falmouth is a modern place with a modern name. Anciently it was
but a fishing hamlet—​Penycomequick, i.e. Pen-y-cwm-wick, the
village at the head of the valley—​with another, Smithick, hard by
about a forge. But the Killigrews had a fine place and deerpark at
Arwenack.
Leland (about 1520), who mentions every place worth notice,
including every “praty” and every “pore fisching town,” says nothing
of Falmouth beyond it being “a havyn very notable and famox.”
Arwenack and the fortifications of Pendennis are noticed by
Carew, but nothing is said of Falmouth.
Camden (in 1607) mentions Penryn, Pendennis Castle, S. Mawes
Castle, and Arwenack, but says nothing of Falmouth.
When, however, Sir Walter Raleigh put into Falmouth Harbour on
his way homewards from Guiana, he was entertained at the great
house, but his men could hardly find any accommodation, and he
represented the matter to Government, urging the importance of
this splendid harbour.
Sir John Killigrew went repeatedly to town on the matter, but was
opposed by the Penryn interest. However, he obtained a licence to
build four houses on the spot. As the place rapidly increased beyond
the licence, in 1613 Sir John was disposed to further extend it, and
build a town, but was interrupted in his attempt by Truro, Penryn,
and Helston, which exerted all their influence to prevent it. Truro
was jealous of the prosperity of Penryn, and was deadly opposed to
the growth of a new town so near the entrance of the harbour, one
which would have many advantages over itself in point of situation.
In a petition to James I. it was said that the erection of a town at
Smithick would tend to the impoverishment of the ancient coinage
towns and market towns aforenamed, and therefore humbly prayed
that Killigrew might be restrained in his undertaking. The king
thereupon stopped the builders, and ordered his privy councillors to
get information from the Governor of Pendennis Castle relative to
the projected town. The latter replied that the project was excellent,
as such a place, being at the mouth of the Fal Harbour, could at
once and readily supply such ships as put in there, instead of forcing
them to go up two miles to Penryn or nine to Truro. The king then
resolved on erecting a town at Smithick, and Sir John Killigrew was
encouraged to proceed.
During the protectorship of Cromwell, although the Killigrews had
been staunch Royalists, yet Sir Peter succeeded in having the
custom-house removed from Penryn to Smithick, and in 1652 in
getting the place elevated to the position of market town. Smithick
continued to be the name until August 20th, 1660, when, in
consequence of an application from Sir Peter Killigrew, a
proclamation was issued by Charles II. ordering “that Smithike, alias
Penny-come-quick, should for ever after that day be called, named,
and known by the name of Falmouth.” In the following year a
charter of incorporation was granted, and thenceforth the story of
Falmouth is one of incessant quarrels between the corporation and
the Killigrews, the former intent on jobbing for their private
advantage, whereas the Killigrews were ambitious in every way to
benefit and enlarge the town.
The old mansion of Arwenack has almost disappeared—​it has
given its name to a street—​and the Killigrews have also vanished.
The last was killed in a tavern brawl at Penryn in 1687, and through
females the property has passed to Erisey, to West, to Berkeley, and
to Wodehouse, and is now owned by Lord Kimberley.
What made Falmouth at one time a place of importance was that
from it sailed the packets. At first they were a matter of contract
between the General Post Office and the captains of the several
boats; and this system continued till 1823, when the packets were
placed under the orders of the Board of Admiralty. The transfer of
the packets from the Post Office to the Admiralty at first excited
much alarm among the inhabitants, and doubtless many of them
suffered, owing to the decreased demand for ships’ stores of all
descriptions, as the sloops-of-war were provided by the Government;
but the change did not prove so disastrous as was expected, for
many persons were drawn to live at the place, persons who
belonged to the families of the commanders, and also because a
greater number of men were employed on the new system. Packets
were first stationed at Falmouth in or about the year 1688, when
some were employed to sail to Corunna; and in 1705 they ran to the
West Indies; in 1709 five sailed to Lisbon; and the number gradually
increased. In 1827 there were thirty-nine packets employed. But all
this came to an end in 1850, when the mails were sent from
Southampton in place of Falmouth.
The church was dedicated in 1663 to Charles the Martyr. It is a
mean building, without architectural merit, and with a stumpy tower,
vastly inferior to the other church dedicated to the royal martyr at
Plymouth.
Pendennis Castle (Pen-Dinas, the Castle on the Head) is not a
very striking feature. It was erected in the reign of Henry VIII., but it
has been since somewhat extended. In 1644 Pendennis sheltered
the unfortunate Henrietta Maria, when embarking for France. It was
from hence that Arwenack House, esteemed the finest mansion in
Cornwall, was fired, during the siege by the Parliamentary troops,
lest it should furnish them with shelter. John Arundell, of Trerice,
commonly called Jack-for-the-King, defended it for six months, he
being in his eighty-seventh year, and only surrendered when starved
out.
From the ramparts a fine view is obtained of the Lizard
promontory, and of the terrible Manacles, on which the Mohegan
was lost in October, 1898. Perhaps even more terrible was the wreck
of the Despatch, in January, 1809, when, two days before Sir John
Moore’s death, three officers and seventy-two non-commissioned
officers and privates were lost on Lowland Point; and almost
simultaneously the Primrose, with 120 officers and men and six
passengers, was wrecked on the Manacles.
About half-way across the mouth of the harbour is the Black
Rock, exposed at low water, but covered when the tide rises. An
eccentric Mr. Trefusis, of Trefusis, opposite Falmouth, one day invited
his wife to boat with him to the Black Rock and picnic there. She
incautiously accepted, and when he had landed her, he made his
bow, and rowed away with, “Madam, we are mutually tired of each
other, and you will agree with me that it were best to part.”
Fortunately a fishing-smack picked her off just as the tide was
flowing over it, and brought her back to Trefusis. “Be hanged to you
rogues,” said the husband. “I’d have given you a guinea each to let
her drown; now you shan’t have a shilling from me.”
S. MAWES’ CASTLE

S. Mawes Castle commands the harbour entrance from the other


side, as also that to S. Mawes Creek. The long promontory, over four
miles in length, that intervenes between the creek and the sea is
Roseland. The neck of land dividing them is in two places very
contracted. Roseland was a great harbour for smugglers, whose
headquarters were at Porthscatho. When employed in conveying
their goods ashore in Gerrans Bay, they always had their scouts on
the hills, and as the customs station was at S. Mawes, no sooner did
the preventive boat put forth, than notice was given, and the boats
dispersed; so that by the time she came into the bay all was quiet.
Finding this to be the case, the officer in command one day took his
boat up the river, and had her carried by the crew across the neck of
land, and he dropped into Gerrans Bay before the scouts were aware
that he had left the harbour. He secured a good prize, and struck a
severe blow at the contraband trade. Porthscatho, perhaps, takes its
name from Cado, or Cathaw, the son of Geraint, and Duke of
Cornwall. The whole of the district from Roseland to Grampound
teems with reminiscences of the Cornish royal family. Lansallos is a
foundation of Salomon, or Selyf, son of Geraint; and in S. Gerrans
parish is a holy well of S. Non, mother of S. David, and sister to
Selyf’s wife, S. Wenn. Tregony Church is a foundation of S. Cuby, son
of Selyf, and grandson of Geraint. Filleigh was founded by a son of
Gildas, who was grandson of Geraint. Dingerrein, the royal palace, is
now represented by a mound, but hence hailed one of the early
bishops of Cornwall, Kenstig, who submitted to Canterbury in or
about 850.
S. Mawes was formerly a borough returning two members. It
consists of a row of houses looking upon the creek. It takes its name
from an Irish settler, who perhaps came with S. Ruan. He arrived
with two disciples. Tudy was one, or, as the Welsh call him, Tegwyn,
so that in all likelihood he had halted for some time on his way in
Wales, doubtless at S. David’s. There was formerly a stone chair
near the beach, but it has been built into the sea-wall. From this he
taught the many pupils who came to him.
But whilst they listened to or pondered over his instructions, they
were much distracted by the frolics of a great seal that came near,
stared at them, and made grunting noises. This was so vexing that
one day Mawes jumped out of his chair and, taking a big stone in his
hand, ran into the shallow water to try conclusions with the seal. He
got near enough to throw the stone at it, and to hit it on the head,
after which he was no more troubled with the interruption.
The reason why Mawes settled where he did was probably this.
His disciple, Tudy, was a cousin of S. Wenn, who was queen, the
wife of Selyf, or Salomon, and Tudy doubtless advised his master to
go to Cornwall, and see whether his kinsfolk would do something for
them. However, Mawes does not seem to have been long satisfied
with his entertainment, for he crossed into Brittany, where he died.
The holy well of S. Mawes is immediately opposite the post office,
and supplies the place with drinking water. The pointed arched door
is walled up, and two ugly ventilating shafts have been inserted to
keep the air sweet above the spring.
From the land side, the castle of S. Mawes is a picturesque
object.
One of the main charms of Falmouth and its neighbourhood is the
climate. Sharp frosts are almost unknown, the mild and balmy air is
wonderfully even in temperature, and the marvellous gardens of
Enys show delicate kinds of rhododendron—​elsewhere growing in
greenhouses—​luxuriating in the open air.
The climate is that of the lotus-eaters, pleasant but enervating.
“Propt on beds of amaranth and molly,
How sweet (while warm airs lull us, blowing lowly)
With half-dropt eyelids still,
Beneath a heaven dark and holy,
To watch the long bright river drawing slowly
His waters from the purple hill—​
Only to hear and see the far-off sparkling brine,
Only to hear were sweet, stretch’d out beneath the pine.
“Let us swear an oath, and keep it with equal mind,
In the hollow lotus-land to live, and lie reclined
On the hills like gods together, careless of mankind.”

And there are good hotels at Falmouth where the lotus-eaters


may do this.
CHAPTER XV.

NEWOUAY
Mr. Austin Treffry—​The sands—​Cliff-castles—​Castel-an-Dinas—​The
Gannel—​S. Carantock—​Newlyn—​Perranzabuloe—​Church of S.
Piran—​History—​Roche—​S. Denis—​Columb Major and Minor—​S.
Agnes—​The Cornish rotten boroughs—​How they passed away
from the Crown—​Mitchell—​The town hall—​Kit Hawkins—​Trerice—​
Lanherne—​Church—​William Noye—​S. Mawgan—​The educator of
the early missionaries.
Newquay is a very new place; it was projected by Mr. J. T. (Austin)
Treffry, of Place House, Fowey, a very remarkable man, far in
advance of his time, to whom not Fowey only, but Cornwall generally
owes a debt of gratitude. His projects have been worked out since
his death with complete success.
In itself uninteresting to the last degree, it is the key to very fine
coast scenery, and the air is bracing without being cold. It possesses
excellent sands, both at Newquay and Fistral Bays. There is further a
long tract of sand, two and a quarter miles long, to the north of S.
Columb Porth, the Tregurian Beach. The rocks will interest the
geologist as well as form a subject for the artist.
The coast presents examples of several cliff-castles, as at Kelsey,
Trevelgue and Griffith’s Heads, and Redcliff above Bedruthan; but
the finest example of a castle is Castel-an-Dinas, near S. Columb
Major.
This fortress comprises about six acres of land, enclosed within
three concentric rings of bank and moat, built up of earth and stone
together, about a pyramidal hill. The innermost enclosure contains
about an acre and a half, and there were at one time indications of
habitations therein, but these have now disappeared. There are,
however, traces of a pit that was a well or tank for rain-water, as
there is no spring on the hill. There are two entrances to this
interesting camp or dinas.
According to legend, King Arthur lived here and hunted the wild
deer on Tregoss Moors.
Near Perranzabuloe are Caer Kieff (eyf, perfect) and Caer Dane
(dinas).
To the south of Newquay is the curious creek called the Gannel
(gan-hael, the mouth of saltings). A very slight thread of sweet
water descends from the land into a creek of three miles of salt
marsh and sand, filled at high water with the tide. Here it was that
S. Patrick’s companion, adviser, and friend, Carantock, on leaving
Ireland, set up his residence. He was a remarkable man, for he was
one of the three bishops chosen by Laogaire at Tara to revise the
laws of Ireland. When the Irish accepted Christianity it was obvious
that the laws needed modification. King Laogaire was not and never
did become a Christian, but he accepted the situation, and appointed
a commission for the revision of the laws, and on this sat Carantock.
The result was the Senchus Mor, the great code by which the Irish
were ruled till 1600. Carantock was an acquaintance of King Arthur,
but he met him, not at Castel-an-Dinas, but on the Severn at
Dinedor, and did not get on well with him.
An odd story is told of his fixing the site for his church at
Crantock. After he had landed in the Gannel he went up on the land,
and began to till a scrap of land granted him; and when not at work
on the soil, he whittled his staff, to make the handle smooth. Then,
when he resumed his mattock, he saw a wood-pigeon fly down, pick
up the shavings, and carry them off. He was curious to know what
she did with them, so he followed, and saw that she dropped them
in one spot in a little heap. “There must be some meaning in this,”
said Carantock, and he resolved to build his church there. Those
Celtic saints looked out for some omen to direct them in all their
doings.
Crantock Church was collegiate; it fell into a condition of decay,
and was shockingly mutilated, but is about to be restored carefully
and conservatively.
Another interesting church, one with a fine screen and in good
condition, is Newlyn. This is probably situated on the patrimony of S.
Newlyna—​“the white cloud,” as her name signifies. She was of noble
birth, but, like the rest of the Celtic saints, thought she must travel,
so she took ship at Newlyn West, where she has also left her name,
and arrived in Brittany with her foster-mother as chaperon. There
she had an unpleasant experience. She caught the fancy of a local
magnate, who pursued her when she fled from him, and as she
stubbornly repelled his advances, in a fit of fury, struck her with his
sword and killed her. She is commemorated at Noualen, or Noyal-
Poutivy, where the screen was formerly painted with a series of
subjects relative to her story. This was destroyed in 1684 by order of
the vicar-general, because it concealed the new reredos in the
debased style of the period. This tasteless construction has been in
turn demolished, and the paintings that formerly decorated the jubé
have been reproduced in coloured glass in the windows.
The great towans, or sand dunes, of Penhale extend three miles
in length, and almost two in parts inland. They are held in check to
the north and north-east by the little stream that finds its way into
Holywell Bay. In these sands was found S. Piran’s Chapel, of the
eighth or ninth century, in 1835, exactly resembling similar
structures of the same date in Ireland. It was cleared out by Mr.
William Mitchell, of Comprigney, near Truro, and he thus describes it:
—​
“The church, which is built nearly east and west, inclining
only 4° north of west, is of but small dimensions, the length
without the walls being 30 feet and within the walls 25 feet;
the width within 13 feet in the chancel and 12 feet in the
nave, and the height about 13 feet. There is a very neat
arched doorway in a good state of preservation at the date of
the work, viz. the day when I removed the sand from it, 7 ft.
4 in. by 2 ft. 4 in., ornamented with Saxon tracery [this is
inaccurate, no Saxon about it], the arch itself having on its
keystone the head of a tiger, and the points of its curve (i.e.
label-terminations) the head of a man and that of a woman,
rudely sculptured in stone, in the centre of the nave on the
south wall; and another doorway in the north-east corner,
near the altar, of similar dimensions and style, if we may
judge from the remains of its arch lying near it, and which
may be assumed to be that intended for the priest himself,
leading into the chancel. The chancel is exactly 9½ feet long,
and shows in the north and south walls the precise spots
where the railing (screen) separating it from the nave was
fixed. Attached to the eastern wall of the church is an altar
nearly equidistant between the north and south walls, 5 ft. 3
in. long by 2 ft. 3 in. wide, and 4 feet high, built of stone and
neatly plastered with lime. Eight inches above this altar is a
recess or niche about 12 inches high by 8 inches wide, in
which, undoubtedly, was once S. Piran’s shrine.... There is
only one small aperture or window, 12 inches high by 10
inches wide, about 10 feet above the floor, in the south wall
of the chancel.... A stone seat, raised 14 inches above the
level of the floor, and 12 inches wide, covered with lime-
plaster, runs all round the walls except the east and south
walls of the chancel. The nave is exactly 15½ feet long, its
floor, together with the floor of the chancel, being composed
of lime and sand, apparently as perfect as when first laid
down. Each door has two low steps to descend into the
church. The church itself is plastered with beautiful white
lime. The masonry of the entire building is of the rudest kind,
and evidently of very remote antiquity. There is not the
slightest attempt at regular courses, but the stones,
consisting of granite, quartz, sandstone, porphyry, etc.,
appear to have been thrown together almost at random—​
horizontally, perpendicularly, and at every angle of inclination
—​just as the hand, not the eye, of the workman happened to
direct him. To render the church as perfect as when it was
originally erected, nothing seemed wanting but its doors and
roof. Not an atom of wood, except a piece of about 8 inches
long by 2 inches wide, and an inch thick, was found within
the walls. That there were many bodies interred both in the
chancel and nave of the church is an unquestionable fact.
Several skeletons have been found deposited about 2 feet
below the floor. Three were discovered with their feet lying
under the altar, one of them of gigantic dimensions,
measuring about 7 ft. 6 in.... Their heads, which appeared to
be almost cemented together, lay between the knees of the
skeleton deposited nearest to the south wall.
“On the southern and western sides of this venerable ruin
is the ancient burying-ground, strewed over tens of
thousands of human bones and teeth as white as snow; and,
strange as it may seem, the showers of sand which fall all
around hardly ever remain on these melancholy relics of
mortality.”[20]
Unhappily nothing was done to preserve this little church after it
had been excavated from the sand. The three heads from the
doorway were carried off for Truro Museum; visitors pulled out
stones, boys tore down the walls, and now little more than a gable
remains. But to this was added the mischievous meddlesomeness of
the curate-in-charge, the Rev. William Haslam, who turned the altar-
stones about, as he had got a theory into his head that they had
formed a tomb, and rebuilt them in this fashion, pointing east and
west, and cut upon the altar-slab the words “S. Piranus.” It is
purposed to undo Mr. Haslam’s work, and replace the altar as
originally found. More should be done. Cement should be run along
the top of such wall as remains to save it from falling.
The Rev. C. Collins Trelawny, soon after the discovery, wrote an
account in a book entitled Perranzabulo, the Lost Church Found,
which went through seven editions (1837-72).
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookfinal.com

You might also like