0% found this document useful (0 votes)
6 views

Python Game Programming By Example Alejandro Rodas De Paz Joseph Howse download

The document provides information about the book 'Python Game Programming By Example' by Alejandro Rodas De Paz and Joseph Howse, which guides readers in creating various games using Python. It outlines the book's content, including chapters on game development fundamentals, specific game projects, and the necessary software requirements. The book is aimed at beginners interested in learning game development through practical examples.

Uploaded by

aroemhebis
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
0% found this document useful (0 votes)
6 views

Python Game Programming By Example Alejandro Rodas De Paz Joseph Howse download

The document provides information about the book 'Python Game Programming By Example' by Alejandro Rodas De Paz and Joseph Howse, which guides readers in creating various games using Python. It outlines the book's content, including chapters on game development fundamentals, specific game projects, and the necessary software requirements. The book is aimed at beginners interested in learning game development through practical examples.

Uploaded by

aroemhebis
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/ 82

Python Game Programming By Example Alejandro

Rodas De Paz Joseph Howse download

https://ebookbell.com/product/python-game-programming-by-example-
alejandro-rodas-de-paz-joseph-howse-55663750

Explore and download more ebooks at ebookbell.com


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

Python Game Programming By Example 1st Edition Alejandro Rodas De Paz

https://ebookbell.com/product/python-game-programming-by-example-1st-
edition-alejandro-rodas-de-paz-11323018

Python Game Programming By Example Source Code Rodas De Paz A

https://ebookbell.com/product/python-game-programming-by-example-
source-code-rodas-de-paz-a-6034834

Python Game Programming By Example 1st Edition Joseph Howse Alejandro


Rodas De Paz

https://ebookbell.com/product/python-game-programming-by-example-1st-
edition-joseph-howse-alejandro-rodas-de-paz-10813960

Python Game Programming By Example Howse Joseph Paz Alejandro Rodas De

https://ebookbell.com/product/python-game-programming-by-example-
howse-joseph-paz-alejandro-rodas-de-61412206
Learning Python By Building Games A Beginners Guide To Python
Programming And Game Development Kafle

https://ebookbell.com/product/learning-python-by-building-games-a-
beginners-guide-to-python-programming-and-game-development-
kafle-36224194

Game Programming With Python Game Development Series 1st Edition Riley

https://ebookbell.com/product/game-programming-with-python-game-
development-series-1st-edition-riley-34244066

Game Programming With Python Lua And Ruby Game Development 1st Edition
Gutschmidt

https://ebookbell.com/product/game-programming-with-python-lua-and-
ruby-game-development-1st-edition-gutschmidt-36001792

Beginning Game Programming With Pygame Zero Coding Interactive Games


On Raspberry Pi Using Python 1st Ed Watkiss

https://ebookbell.com/product/beginning-game-programming-with-pygame-
zero-coding-interactive-games-on-raspberry-pi-using-python-1st-ed-
watkiss-54981196

Game Programming With Code Angel Learn How To Code In Python On


Raspberry Pi Or Pc 1st Ed Mark Cunningham

https://ebookbell.com/product/game-programming-with-code-angel-learn-
how-to-code-in-python-on-raspberry-pi-or-pc-1st-ed-mark-
cunningham-10795970
Python Game Programming By Example
Table of Contents
Python Game Programming By Example
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Hello, Pong!
Installing Python
An overview of Breakout
The basic GUI layout
Diving into the Canvas widget
Basic game objects
The Ball class
The Paddle class
The Brick class
Adding the Breakout items
Movement and collisions
Starting the game
Playing Breakout
Summary
2. Cocos Invaders
Installing cocos2d
Getting started with cocos2d
Handling user input
Updating the scene
Processing collisions
Creating game assets
Space Invaders design
The PlayerCannon and GameLayer classes
Invaders!
Shoot’em up!
Adding an HUD
Extra feature – the mystery ship
Summary
3. Building a Tower Defense Game
The tower defense gameplay
Cocos2d actions
Interval actions
Instant actions
Combining actions
Custom actions
Adding a main menu
Tile maps
Tiled Map Editor
Loading tiles
The scenario definition
The scenario class
Transitions between scenes
Game over cut scene
The tower defense actors
Turrets and slots
Enemies
Bunker
Game scene
The HUD class
Assembling the scene
Summary
4. Steering Behaviors
NumPy installation
The ParticleSystem class
A quick demonstration
Implementing steering behaviors
Seek and flee
Arrival
Pursuit and evade
Wander
Obstacle avoidance
Gravitation game
Basic game objects
Planets and pickups
Player and enemies
Explosions
The game layer
Summary
5. Pygame and 3D
Installing packages
Getting started with OpenGL
Initializing the window
Drawing shapes
Running the demo
Refactoring our OpenGL program
Processing the user input
Adding the Pygame library
Pygame 101
Pygame integration
Drawing with OpenGL
The Cube class
Enabling face culling
Basic collision detection game
Summary
6. PyPlatformer
An introduction to game design
Level design
Platformer skills
Component-based game engines
Introducing Pymunk
Building a game framework
Adding physics
Renderable components
The Camera component
The InputManager module
The Game class
Developing PyPlatformer
Creating the platforms
Adding pickups
Shooting!
The Player class and its components
The PyPlatformer class
Summary
7. Augmenting a Board Game with Computer Vision
Planning the Checkers application
Setting up OpenCV and other dependencies
Windows
Mac
Debian and its derivatives, including Raspbian, Ubuntu, and Linux Mint
Fedora and its derivatives, including RHEL and CentOS
OpenSUSE and its derivatives
Supporting multiple versions of OpenCV
Configuring cameras
Working with colors
Building the analyzer
Providing access to the images and classification results
Providing access to parameters for the user to configure
Initializing the entire model of the game
Updating the entire model of the game
Capturing and converting an image
Detecting the board’s corners and tracking their motion
Creating and analyzing the bird’s-eye view of the board
Analyzing the dominant colors in a square
Classifying the contents of a square
Drawing text
Converting OpenCV images for wxPython
Building the GUI application
Creating a window and binding events
Creating and laying out images in the GUI
Creating and laying out controls
Nesting layouts and setting the root layout
Starting a background thread
Closing a window and stopping a background thread
Configuring the analyzer based on user input
Updating and showing images
Running the application
Troubleshooting the project in real-world conditions
Further reading on OpenCV
Summary
Index
Python Game Programming By Example
Python Game Programming By Example
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system,
or transmitted in any form or by any means, without the prior written permission of the
publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the
information presented. However, the information contained in this book is sold without
warranty, either express or implied. Neither the authors, nor Packt Publishing, and its
dealers and distributors will be held liable for any damages caused or alleged to be caused
directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2015
Production reference: 1230915
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-153-2
www.packtpub.com
Credits
Authors
Alejandro Rodas de Paz
Joseph Howse
Reviewers
Benjamin Johnson
Dennis O’Brien
Acquisition Editors
Owen Roberts
Sonali Vernekar
Content Development Editor
Dharmesh Parmar
Technical Editor
Ryan Kochery
Copy Editor
Vikrant Phadke
Project Coordinator
Harshal Ved
Proofreader
Safis Editing
Indexer
Rekha Nair
Graphics
Jason Monteiro
Production Coordinator
Manu Joseph
Cover Work
Manu Joseph
About the Authors
Alejandro Rodas de Paz is a computer engineer and game developer from Seville, Spain.
He came across Python back in 2009, while he was studying at the University of Seville.
Alejandro developed several academic projects with Python, from web crawlers to
artificial intelligence algorithms. In his spare time, he started building his own games in
Python. He did a minor in game design at Hogeschool van Amsterdam, where he created a
small 3D game engine based on the ideas he learned during this minor.
He has also developed some open source projects, such as a Python API for the Philips
Hue personal lighting system. You can find these projects in his GitHub account at
https://github.com/aleroddepaz.
Prior to this publication, Alejandro collaborated with Packt Publishing as a technical
reviewer on the book Tkinter GUI Application Development Hotshot.
I would like to thank my parents, Feliciano and María Teresa, for their absolute trust and
support. They have been an inspiration to me and an example of hard work.
I would also like to thank my girlfriend, Lucía, for her love and for putting up with me
while I worked on this book.
Joseph Howse is a writer, software developer, and business owner from Halifax, Nova
Scotia, Canada. Computer games and code are imbibed in his earliest memories, as he
learned to read and type by playing text adventures with his older brother, Sam, and
watching him write graphics demos in BASIC.
Joseph’s other books include OpenCV for Secret Agents, OpenCV Blueprints, Android
Application Programming with OpenCV 3, and Learning OpenCV 3 Computer Vision with
Python. He works with his cats to make computer vision systems for humans, felines, and
other users. Visit http://nummist.com to read about some of his latest projects done at
Nummist Media Corporation Limited.
I dedicate my work to Sam, Jan, Bob, Bunny, and my cats, who have been my lifelong
guides and companions.
I congratulate my coauthor for producing an excellent compendium of classic examples of
game development. I am grateful for the opportunity to add my chapter on checkers
(draughts) and computer vision.
I am also indebted to the many editors and technical reviewers who have contributed to
planning, polishing, and marketing this book. I have come to expect an outstanding team
when working with Packt Publishing, and once again, all of them have guided me with
their experience and saved me from sundry errors and omissions. Please meet the
technical reviewers by reading their biographies here.
Finally, I want to thank my readers and everybody in the open source community. We are
united in our efforts to build and share all kinds of projects and knowledge, paving the
way for books such as this to succeed.
About the Reviewers
Benjamin Johnson is an experienced Python programmer with a passion for game
programming, software development, and web design. He is currently studying computer
science at The University of Texas at Austin and plans to specialize in software
engineering. His most popular Python projects include an adventure game engine and a
particle simulator, both developed using Pygame. You can check out Benjamin’s latest
Pygame projects and articles on his website at www.learnpygame.com.
I would like to thank Packt Publishing for giving me the opportunity to read and review
this excellent book!
Dennis O’Brien is the director of data science at Game Show Network Games. He studied
physics at the University of Chicago as an undergraduate and completed his graduate
studies in computer science from the University of Illinois, Chicago. He was the principal
software engineer at Electronic Arts, a senior software engineer at Leapfrog Enterprises,
and a lead game developer at Jellyvision Games.
www.PacktPub.com
Support files, eBooks, discount offers, and
more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and
ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as
a print book customer, you are entitled to a discount on the eBook copy. Get in touch with
us at <[email protected]> for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up
for a range of free newsletters and receive exclusive discounts and offers on Packt books
and eBooks.

https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt’s online digital
book library. Here, you can search, access, and read Packt’s entire library of books.
Why subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view 9 entirely free books. Simply use your login credentials for
immediate access.
Preface
Welcome to Python Game Programming By Example. As hobbyist programmers or
professional developers, we may build a wide variety of applications, from large enterprise
systems to web applications made with state-of-the-art frameworks. However, game
development has always been an appealing topic, maybe simply for creating casual games
and not just for high-budget AAA titles.
If you want to explore the different ways of developing games in Python, a language with
clear and simple syntax, then this is the book for you. In each chapter, we will build a new
game from scratch, using several popular libraries and utilities. By the end of this book,
you will be able to quickly create your own 2D and 3D games, and have a handful of
Python libraries in your tool belt to choose from.
What this book covers
Chapter 1, Hello, Pong!, details the required software, its installation, and the basic syntax
of Python: data structures, control flow statements, object orientation, and so on. It also
includes the first game of the book, the classic “Hello, world” game.
Chapter 2, Cocos Invaders, introduces the cocos2d game engine and explains how to build
a game similar to Space Invaders to put this knowledge into practice. Here, you learn the
basics of collisions, input handling, and scene setup.
Chapter 3, Building a Tower Defense Game, is where you learn to develop a full-fledged
game with cocos2d. This game includes some interesting components, such as a HUD and
a main menu.
Chapter 4, Steering Behaviors, covers seemingly intelligent movements for autonomous
characters. You will be adding these strategies gradually, in different levels of a basic
game built with particle systems.
Chapter 5, Pygame and 3D, presents the foundations of 3D and guides you through the
basic structure of an OpenGL program.
Chapter 6, PyPlatformer, is where you develop a 3D platformer game with all the
techniques learned in the previous chapter.
Chapter 7, Augmenting a Board Game with Computer Vision, introduces the topic of
computer vision, which allows software to learn about the real world via a camera. In this
chapter, you build a system to analyze a game of checkers (draughts) in real time as
players move pieces on a physical board.
What you need for this book
The projects covered in this book assume that you have installed Python 3.4 on a
computer with Windows, Mac OS X, or Linux. We also assume that you have included
pip during the installation process, since it will be the package manager used to install the
required third-party packages.
Who this book is for
If you have ever wanted to create casual games in Python and you wish to explore the
various GUI technologies that this language offers, then this is the book for you. This title
is intended for beginners in Python with little or no knowledge of game development, and
it covers step by step how to build seven different games, from the well-known Space
Invaders to a classical 3D platformer.
Conventions
In this book, you will find a number of text styles that distinguish between different kinds
of information. Here are some examples of these styles and an explanation of their
meaning.
Code words in text, database table names, folder names, filenames, file extensions,
pathnames, dummy URLs, user input, and Twitter handles are shown as follows: “For
instance, on Ubuntu, you need to install the python3-tk package.”
A block of code is set as follows:
new_list = []
for elem in collection:
if elem is not None:
new_list.append(elem)

Any command-line input or output is written as follows:


$ python –-version
Python 3.4.3

New terms and important words are shown in bold. Words that you see on the screen,
for example, in menus or dialog boxes, appear in the text like this: “Make sure that you
check the Tcl/Tk option to include the library.”
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Reader feedback
Feedback from our readers is always welcome. Let us know what you think about this
book—what you liked or disliked. Reader feedback is important for us as it helps us
develop titles that you will really get the most out of.
To send us general feedback, simply e-mail <[email protected]>, and mention the
book’s title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or
contributing to a book, see our author guide at www.packtpub.com/authors.
Customer support
Now that you are the proud owner of a Packt book, we have a number of things to help
you to get the most from your purchase.
Downloading the example code
You can download the example code files from your account at http://www.packtpub.com
for all the Packt Publishing books you have purchased. If you purchased this book
elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-
mailed directly to you.
Additionally, up-to-date example code for Chapter 7, Augmenting a Board Game with
Computer Vision, is posted at http://nummist.com/opencv.
Downloading the color images of this book
We also provide you with a PDF file that has color images of the screenshots/diagrams
used in this book. The color images will help you better understand the changes in the
output. You can download this file from
https://www.packtpub.com/sites/default/files/downloads/B04505_Graphics.pdf.
Errata
Although we have taken every care to ensure the accuracy of our content, mistakes do
happen. If you find a mistake in one of our books—maybe a mistake in the text or the
code—we would be grateful if you could report this to us. By doing so, you can save other
readers from frustration and help us improve subsequent versions of this book. If you find
any errata, please report them by visiting http://www.packtpub.com/submit-errata,
selecting your book, clicking on the Errata Submission Form link, and entering the
details of your errata. Once your errata are verified, your submission will be accepted and
the errata will be uploaded to our website or added to any list of existing errata under the
Errata section of that title.
To view the previously submitted errata, go to
https://www.packtpub.com/books/content/support and enter the name of the book in the
search field. The required information will appear under the Errata section.
Additionally, any errata for Chapter 7, Augmenting a Board Game with Computer Vision,
will be posted at http://nummist.com/opencv.
Piracy
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At
Packt, we take the protection of our copyright and licenses very seriously. If you come
across any illegal copies of our works in any form on the Internet, please provide us with
the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]> with a link to the suspected pirated
material.
We appreciate your help in protecting our authors and our ability to bring you valuable
content.
Questions
If you have a problem with any aspect of this book, you can contact us at
<[email protected]>, and we will do our best to address the problem.

You can also contact the authors directly. Alejandra Rodas de Paz, author of Chapters 1 to
6, can be reached at <[email protected]>. Joseph Howse, author of Chapter 7, can be
reached at <[email protected]>, and answers to common questions can be found
on his website, http://nummist.com/opencv.
Chapter 1. Hello, Pong!
Game development is a highly evolving software development process, and it has
improved continuously since the appearance of the first video games in the 1950s.
Nowadays, there are a wide variety of platforms and engines, and this process has been
facilitated with the arrival of open source tools.
Python is a free high-level programming language with a design intended to write readable
and concise programs. Thanks to its philosophy, we can create our own games from
scratch with just a few lines of code. There are a plenty of game frameworks for Python,
but for our first game, we will see how we can develop it without any third-party
dependency.
In this chapter, we will cover the following topics:
Installation of the required software
An overview of Tkinter, a GUI library included in the Python standard library
Applying object-oriented programming to encapsulate the logic of our game
Basic collision and input detection
Drawing game objects without external assets
Developing a simplified version of Breakout, a pong-based game
Installing Python
You will need Python 3.4 with Tcl / Tk 8.6 installed on your computer. The latest branch
of this version is Python 3.4.3, which can be downloaded from
https://www.python.org/downloads/. Here, you can find the official binaries for the most
popular platforms, such as Windows and Mac OS. During the installation process, make
sure that you check the Tcl/Tk option to include the library.
The code examples included in the book have been tested against Windows 8 and Mac,
but can be run on Linux without any modification. Note that some distributions may
require you to install the appropriate package for Python 3. For instance, on Ubuntu, you
need to install the python3-tk package.
Once you have Python installed, you can verify the version by opening Command Prompt
or a terminal and executing these lines:
$ python --version
Python 3.4.3

After this check, you should be able to start a simple GUI program:
$ python
>>> from tkinter import Tk
>>> root = Tk()
>>> root.title('Hello, world!')
>>> root.mainloop()

These statements create a window, change its title, and run indefinitely until the window is
closed. Do not close the new window that is displayed when the second statement is
executed. Otherwise, it will raise an error because the application has been destroyed.
We will use this library in our first game, and the complete documentation of the module
can be found at https://docs.python.org/3/library/tkinter.html.
Tip
Tkinter and Python 2
The Tkinter module was renamed to tkinter in Python 3. If you have Python 2 installed,
simply change the import statement with Tkinter in uppercase, and the program should
run as expected.
An overview of Breakout
The Breakout game starts with a paddle and a ball at the bottom of the screen and some
rows of bricks at the top. The player must eliminate all the bricks by hitting them with the
ball, which rebounds against the borders of the screen, the bricks, and the bottom paddle.
As in Pong, the player controls the horizontal movement of the paddle.
The player starts the game with three lives, and if they miss the ball’s rebound and it
reaches the bottom border of the screen, one life is lost. The game is over when all the
bricks are destroyed, or when the player loses all their lives.
This is a screenshot of the final version of our game:
The basic GUI layout
We will start out game by creating a top-level window as in the simple program we ran
previously. However, this time, we will use two nested widgets: a container frame and the
canvas where the game objects will be drawn, as shown here:

With Tkinter, this can easily be achieved using the following code:
import tkinter as tk

lives = 3
root = tk.Tk()
frame = tk.Frame(root)
canvas = tk.Canvas(frame, width=600, height=400, bg='#aaaaff')
frame.pack()
canvas.pack()
root.title('Hello, Pong!')
root.mainloop()

Tip
Downloading the example code
You can download the example code files from your account at http://www.packtpub.com
for all the Packt Publishing books you have purchased. If you purchased this book
elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-
mailed directly to you.
Through the tk alias, we access the classes defined in the tkinter module, such as Tk,
Frame, and Canvas.

Notice the first argument of each constructor call which indicates the widget (the child
container), and the required pack() calls for displaying the widgets on their parent
container. This is not necessary for the Tk instance, since it is the root window.
However, this approach is not exactly object-oriented, since we use global variables and
do not define any new classes to represent our new data structures. If the code base grows,
this can lead to poorly organized projects and highly coupled code.
We can start encapsulating the pieces of our game in this way:
import tkinter as tk

class Game(tk.Frame):
def __init__(self, master):
super(Game, self).__init__(master)
self.lives = 3
self.width = 610
self.height = 400
self.canvas = tk.Canvas(self, bg='#aaaaff',
width=self.width,
height=self.height)
self.canvas.pack()
self.pack()

if __name__ == '__main__':
root = tk.Tk()
root.title('Hello, Pong!')
game = Game(root)
game.mainloop()

Our new type, called Game, inherits from the Frame Tkinter class. The class
Game(tk.Frame): definition specifies the name of the class and the superclass between
parentheses.
If you are new to object-oriented programming with Python, this syntax may not sound
familiar. In our first look at classes, the most important concepts are the __init__ method
and the self variable:
The __init__ method is a special method that is invoked when a new class instance
is created. Here, we set the object attributes, such as the width, the height, and the
canvas widget. We also call the parent class initialization with the super(Game,
self).__init__(master) statement, so the initial state of the Frame is properly
initialized.
The self variable refers to the object, and it should be the first argument of a method
if you want to access the object instance. It is not strictly a language keyword, but the
Python convention is to call it self so that other Python programmers won’t be
confused about the meaning of the variable.
In the preceding snippet, we introduced the if __name__ == '__main__' condition,
which is present in many Python scripts. This snippet checks the name of the current
module that is being executed, and will prevent starting the main loop where this module
was being imported from another script. This block is placed at the end of the script, since
it requires that the Game class be defined.
Tip
Random documents with unrelated
content Scribd suggests to you:
harmlessly off.
"Phew!" exclaimed the officer, wiping his forehead. "What an escape!
I thought we were all booked for Kingdom Come. Come, lads, man
the oars quickly. We'll get those anarchistic rascals out of their rat-
holes and make them suffer for this outrage. But what the dickens
was the matter with that torpedo?" he muttered.
"I think I can explain, sir," rejoined Ned.
"By Jove, you can? Let's hear your explanation."
"You see, sir," said Ned, "while Herc and I were exploring that cabin,
we found those torpedoes. Well, when an opportunity presented
itself, I unscrewed the head of each, and withdrew the gun-cotton.
But I was afraid that, after they marooned me, the anarchists might
have examined them and found out what I'd done and reloaded
them. But I'm confident now that they haven't."
"No, you've drawn their teeth with a vengeance. I tremble to think,
though, what would have happened if they had had an opportunity
to use one of the loaded ones. They're a sharp outfit of tricksters,
too, with their disguised sloop."
"But not sharp enough to fool Uncle Sam," exclaimed Ned, as the
boat was run alongside.
As it scraped the disguised sloop's side, a figure suddenly appeared
on the deck. It was Herc. He made a flying leap for the boat, and
landed in a heap in their midst.
"Row for your lives!" he yelled. "That maniac, Muller, is about to
blow up the vessel. I got away by knocking a couple of the crew
galley-west."
"Give way, men!" shouted the officer, and willing arms pulled the
boat from the schooner's side. But the explosion did not come.
Instead, two figures, recognized as those of Merritt and Chance,
appeared on the deck. They signalled for the boat to come closer.
"We captured Muller, just as he was about to blow up the sloop,"
they shouted. "If we surrender, will you show us clemency?"
"I'll make no promises," was the grim reply of Ensign Bulkley.
Something like an hour later, the destroyer, with the disguised sloop
in tow, re-entered Blackhaven Bay. On board her—a raving maniac—
was Herr Muller. His long-smouldering insanity had at last broken
into flame. He was confined on board the Manhattan for a time and
then removed to an asylum, where he now is. He will never recover
his reason, and unceasingly imagines that his mission is to destroy
the United States navy. As for his followers, they received various
terms in prison. Kennell, alone, escaped. It transpired that he had
been sent ashore after supplies, and so was not on board the
disguised sloop when the futile attempt to blow up the destroyer
was made.
Of course, the suspicion which had been directed against Ned and
Herc was speedily explained away, and they were rated higher than
ever in the estimation of their officers. Part of the substantial
monetary reward Ned received for his courage and resource in
reaching the fleet, via aeroplane, was sent to Professor Luminetti,
the King of the Air. The quartermaster at Dundertown received a
severe reprimand for his over-zealousness, but nothing more was
done to him, as, after all, he thought he was performing his duty.
Had we space, we would like to relate the further aerial adventures
of Ned and Herc on Aero Service. But sufficient have been related
here to convey some idea of the importance of such an adjunct to
our navy. It will always be a proud boast of the Dreadnought Boys
that they helped to establish the aeroplane as a valuable auxiliary of
the modern battleship.
But the scenes shift rapidly on the stage of naval life. Fresh places
and opportunities were shortly to be presented to the Dreadnought
Boys.
Uncle Sam's navy was on the eve of its epoch-making, globe-circling
voyage. If you care to follow further the careers of The Dreadnought
Boys, and learn how they conducted themselves amidst novel
surroundings and changing and exciting conditions, you will find it all
set down in the next volume of this series, "The Dreadnought Boys'
World Cruise."
THE END.
Transcriber's Notes:
Retained some inconsistent hyphenation (e.g. farmhouse vs. farm-house) from the
original.
Images may be clicked to view larger versions.
Page 1, added missing quote before "THE DREADNOUGHT BOYS ON A SUBMARINE."
Page 86, changed ? to , after "I guess that's just what we are, ma'am."
Page 178, corrected chapter number from XVI to XVII and removed unnecessary quote
after "inclined to doubt him."
Page 196, corrected chapter number from XVII to XVIII.
Page 207, fixed typo "interruped" in "Further conversation was interrupted."
Page 243, corrected chapter number from XXII to XXIII.
Page 268, fixed typo "montony" in "it will relieve the monotony."
*** END OF THE PROJECT GUTENBERG EBOOK THE
DREADNOUGHT BOYS ON AERO SERVICE ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying
copyright royalties. Special rules, set forth in the General Terms of
Use part of this license, apply to copying and distributing Project
Gutenberg™ electronic works to protect the PROJECT GUTENBERG™
concept and trademark. Project Gutenberg is a registered trademark,
and may not be used if you charge for an eBook, except by following
the terms of the trademark license, including paying royalties for use
of the Project Gutenberg trademark. If you do not charge anything
for copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund
from the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the Project
Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for


the “Right of Replacement or Refund” described in paragraph 1.F.3,
the Project Gutenberg Literary Archive Foundation, the owner of the
Project Gutenberg™ trademark, and any other party distributing a
Project Gutenberg™ electronic work under this agreement, disclaim
all liability to you for damages, costs and expenses, including legal
fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR
NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR
BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK
OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL
NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT,
CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF
YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving
it, you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or
entity that provided you with the defective work may elect to provide
a replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation,


the trademark owner, any agent or employee of the Foundation,
anyone providing copies of Project Gutenberg™ electronic works in
accordance with this agreement, and any volunteers associated with
the production, promotion and distribution of Project Gutenberg™
electronic works, harmless from all liability, costs and expenses,
including legal fees, that arise directly or indirectly from any of the
following which you do or cause to occur: (a) distribution of this or
any Project Gutenberg™ work, (b) alteration, modification, or
additions or deletions to any Project Gutenberg™ work, and (c) any
Defect you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many
small donations ($1 to $5,000) are particularly important to
maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.
Project Gutenberg™ eBooks are often created from several printed
editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.
back
back
back
back
back
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like