0% нашли этот документ полезным (0 голосов)
21 просмотров83 страницы

Game Programming With Code Angel 1st Edition Mark Cunningham PDF Download

Документ представляет собой информацию о книге 'Game Programming with Code Angel' первого издания Марка Каннингема, которая обучает программированию на Python с использованием Raspberry Pi или ПК. В нем также содержится список других доступных электронных книг и ссылки на их загрузку. Книга охватывает различные аспекты разработки игр, включая создание уровней и управление игровыми объектами.

Загружено:

ablazamaricq
Авторское право
© © All Rights Reserved
Мы серьезно относимся к защите прав на контент. Если вы подозреваете, что это ваш контент, заявите об этом здесь.
Доступные форматы
Скачать в формате PDF, TXT или читать онлайн в Scribd
0% нашли этот документ полезным (0 голосов)
21 просмотров83 страницы

Game Programming With Code Angel 1st Edition Mark Cunningham PDF Download

Документ представляет собой информацию о книге 'Game Programming with Code Angel' первого издания Марка Каннингема, которая обучает программированию на Python с использованием Raspberry Pi или ПК. В нем также содержится список других доступных электронных книг и ссылки на их загрузку. Книга охватывает различные аспекты разработки игр, включая создание уровней и управление игровыми объектами.

Загружено:

ablazamaricq
Авторское право
© © All Rights Reserved
Мы серьезно относимся к защите прав на контент. Если вы подозреваете, что это ваш контент, заявите об этом здесь.
Доступные форматы
Скачать в формате PDF, TXT или читать онлайн в Scribd
Вы находитесь на странице: 1/ 83

Game Programming with Code Angel 1st Edition

Mark Cunningham install download

https://ebookmeta.com/product/game-programming-with-code-
angel-1st-edition-mark-cunningham/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Game Programming with Open 3D Engine 1st Edition


Oleksandr Lozitskiy

https://ebookmeta.com/product/game-programming-with-
open-3d-engine-1st-edition-oleksandr-lozitskiy/

Introduction to Digital Music with Python Programming:


Learning Music with Code 1st Edition Horn

https://ebookmeta.com/product/introduction-to-digital-music-with-
python-programming-learning-music-with-code-1st-edition-horn/

Introduction to Digital Music with Python Programming:


Learning Music with Code 1st Edition Michael Horn

https://ebookmeta.com/product/introduction-to-digital-music-with-
python-programming-learning-music-with-code-1st-edition-michael-
horn/

Machine Learning Fundamentals 1st Edition Hui Jiang

https://ebookmeta.com/product/machine-learning-fundamentals-1st-
edition-hui-jiang/
Miss Prim And The Duke Of Wylde Stephanie Laurens

https://ebookmeta.com/product/miss-prim-and-the-duke-of-wylde-
stephanie-laurens/

Microsoft Excel Power Pivot & Power Query For Dummies,


2nd Edition Michael Alexander

https://ebookmeta.com/product/microsoft-excel-power-pivot-power-
query-for-dummies-2nd-edition-michael-alexander/

What Bad Girls Get 1st Edition Emily Tilton.

https://ebookmeta.com/product/what-bad-girls-get-1st-edition-
emily-tilton/

The Six Power Moves of Chess 3rd Edition The Missing


Key to Finding Good Chess Moves From Any Position
William G. Karneges

https://ebookmeta.com/product/the-six-power-moves-of-chess-3rd-
edition-the-missing-key-to-finding-good-chess-moves-from-any-
position-william-g-karneges/

Bought To Carry His Heir Jane Porter

https://ebookmeta.com/product/bought-to-carry-his-heir-jane-
porter/
Claude Monet Vol 1 1st Edition Nathalia Brodskaïa

https://ebookmeta.com/product/claude-monet-vol-1-1st-edition-
nathalia-brodskaia/
TECHNOLOGY IN AC TION™

Game
Programming
with Code Angel
Learn how to code in Python on
Raspberry Pi or PC

Mark Cunningham

www.allitebooks.com
Game Programming
with Code Angel
Learn how to code in Python
on Raspberry Pi or PC

Mark Cunningham

www.allitebooks.com
Game Programming with Code Angel: Learn how to code in Python on
Raspberry Pi or PC
Mark Cunningham
Edinburgh, Scotland

ISBN-13 (pbk): 978-1-4842-5304-5 ISBN-13 (electronic): 978-1-4842-5305-2


https://doi.org/10.1007/978-1-4842-5305-2

Copyright © 2020 by Mark Cunningham


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Aaron Black
Development Editor: James Markham
Coordinating Editor: Jessica Vakili
Distributed to the book trade worldwide by Springer Science+Business Media New York,
233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505,
e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a
California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc
(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected], or visit http://www.apress.
com/rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available
to readers on GitHub via the book’s product page, located at www.apress.com/978-1-4842-5304-5.
For more detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper

www.allitebooks.com
To Mum and Dad
For recoginizing that a Space Invaders habit and a ZX81
might eventually lead somewhere in 40 years’ time…

www.allitebooks.com
Table of Contents
About the Author���������������������������������������������������������������������������������xi
About the Technical Reviewer�����������������������������������������������������������xiii

Chapter 1: Introduction������������������������������������������������������������������������1
Coding a game������������������������������������������������������������������������������������������������������3
Python and Pygame����������������������������������������������������������������������������������������������4
Choosing an IDE����������������������������������������������������������������������������������������������������4
Python IDLE�����������������������������������������������������������������������������������������������������4
Thonny�������������������������������������������������������������������������������������������������������������5
PyCharm Edu���������������������������������������������������������������������������������������������������5
Bugs and debugging���������������������������������������������������������������������������������������������5
Common mistakes������������������������������������������������������������������������������������������������6
Indentation������������������������������������������������������������������������������������������������������6
Variable and function names���������������������������������������������������������������������������7
Case�����������������������������������������������������������������������������������������������������������������7
Brackets and quotes����������������������������������������������������������������������������������������7
Missing colons�������������������������������������������������������������������������������������������������8
Comments�������������������������������������������������������������������������������������������������������������8
Time to get started…�������������������������������������������������������������������������������������������8

www.allitebooks.com
Table of Contents

Chapter 2: Forest Bomber part 1: A first level��������������������������������������9


Getting started������������������������������������������������������������������������������������������������������9
Step 1: Set up the game environment����������������������������������������������������������������11
Step 2: Initialize variables�����������������������������������������������������������������������������������13
Score and lives����������������������������������������������������������������������������������������������13
Forest list variable�����������������������������������������������������������������������������������������16
Step 3: Display the background��������������������������������������������������������������������������18
Step 4: Draw the forest���������������������������������������������������������������������������������������20
Using math to calculate tree position������������������������������������������������������������21
Deciding which trees to draw������������������������������������������������������������������������22
Summary������������������������������������������������������������������������������������������������������������24

Chapter 3: Forest Bomber part 2: Is it a bird…?��������������������������������25


Step 5: Draw the plane����������������������������������������������������������������������������������������25
Step 6: Move the plane���������������������������������������������������������������������������������������27
Fly across the screen������������������������������������������������������������������������������������27
Fly down the screen��������������������������������������������������������������������������������������29

Chapter 4: Forest Bomber part 3: Bombs away…������������������������������33


Step 7: Drop the bomb����������������������������������������������������������������������������������������34
Key presses���������������������������������������������������������������������������������������������������34
Move the bomb���������������������������������������������������������������������������������������������������37
Exploding trees���������������������������������������������������������������������������������������������������40
Ground level��������������������������������������������������������������������������������������������������������42
Step 8: Game over/level up���������������������������������������������������������������������������������43

vi
Table of Contents

Chapter 5: Forest Bomber part 4: Wrapping it up�������������������������������49


Step 9: Display scoreboard and messages���������������������������������������������������������50
Scoreboard background��������������������������������������������������������������������������������50
Display the score�������������������������������������������������������������������������������������������52
Display the level��������������������������������������������������������������������������������������������53
Display the high score�����������������������������������������������������������������������������������54
Display messages������������������������������������������������������������������������������������������55

Chapter 6: Snapper part 1: In the woods��������������������������������������������61


Getting started����������������������������������������������������������������������������������������������������61
Step 1: Set up the game environment����������������������������������������������������������������63
Step 2: Initialize variables�����������������������������������������������������������������������������������65
Boolean variables������������������������������������������������������������������������������������������65
Dictionaries���������������������������������������������������������������������������������������������������66
Step 3: Display the background��������������������������������������������������������������������������69

Chapter 7: Snapper part 2: Say cheese����������������������������������������������71


Step 4: Draw and move the camera��������������������������������������������������������������������72
The mouse pointer�����������������������������������������������������������������������������������������72
Step 5: Show an animal��������������������������������������������������������������������������������������74
Using the dictionary��������������������������������������������������������������������������������������74
Step 6: Hide an animal����������������������������������������������������������������������������������������77
Setting a timer�����������������������������������������������������������������������������������������������78
Rectangles�����������������������������������������������������������������������������������������������������80
Show another animal������������������������������������������������������������������������������������81
Building a function����������������������������������������������������������������������������������������82

vii
Table of Contents

Chapter 8: Snapper part 3: Snapped��������������������������������������������������87


Step 7: Take a photograph����������������������������������������������������������������������������������88
Rectangles collide�����������������������������������������������������������������������������������������89
Snapped it!����������������������������������������������������������������������������������������������������91
Oops, missed!������������������������������������������������������������������������������������������������92
Hit or miss?���������������������������������������������������������������������������������������������������93
Step 8: Game over�����������������������������������������������������������������������������������������������95
Step 9: Scoreboard���������������������������������������������������������������������������������������������96

Chapter 9: Alien Invasion part 1: Under attack��������������������������������101


Getting started��������������������������������������������������������������������������������������������������101
Step 1: Set up the game environment��������������������������������������������������������������103
Step 2: Initialize variables���������������������������������������������������������������������������������106
Step 3: Display the background������������������������������������������������������������������������108

Chapter 10: Alien Invasion part 2: Missile launch is Go�������������������109


Step 4: Drive the base���������������������������������������������������������������������������������������109
Comparison operators���������������������������������������������������������������������������������111
Step 5: Launch missile��������������������������������������������������������������������������������������112
Move the missile�����������������������������������������������������������������������������������������114
Display missile��������������������������������������������������������������������������������������������������115
Logical operators����������������������������������������������������������������������������������������������115

Chapter 11: Alien Invasion part 3: And they came from


outer space���������������������������������������������������������������������������������������119
Step 6: Move UFOs��������������������������������������������������������������������������������������������120
Stay on screen���������������������������������������������������������������������������������������������122
Time for a change����������������������������������������������������������������������������������������123
Call the function������������������������������������������������������������������������������������������124
Display UFOs�����������������������������������������������������������������������������������������������124

viii
Table of Contents

Chapter 12: Save the planet�������������������������������������������������������������127


Step 7: Shoot UFOs�������������������������������������������������������������������������������������������128
Catching some rays�������������������������������������������������������������������������������������132
Step 8: Game over���������������������������������������������������������������������������������������������135
Step 9: Scoreboard�������������������������������������������������������������������������������������������137

Chapter 13: Golf part 1: On the tee���������������������������������������������������139


Getting started��������������������������������������������������������������������������������������������������139
Step 1: Set up the game environment��������������������������������������������������������������140
Step 2: Initialize variables���������������������������������������������������������������������������������143
Variable naming conventions����������������������������������������������������������������������144
Constants�����������������������������������������������������������������������������������������������������144
Step 3: Display background������������������������������������������������������������������������������145
Step 4: Display flag�������������������������������������������������������������������������������������������146

Chapter 14: Golf part 2: On the green�����������������������������������������������149


Step 5: Power meter�����������������������������������������������������������������������������������������149
Step 6: Move the ball����������������������������������������������������������������������������������������152
More about lists�������������������������������������������������������������������������������������������154
Update ball location�������������������������������������������������������������������������������������156
Draw the ball�����������������������������������������������������������������������������������������������158

Chapter 15: Golf part 3: It’s in the hole���������������������������������������������161


Step 7: In the hole���������������������������������������������������������������������������������������������162
Joining strings���������������������������������������������������������������������������������������������163
Drawing Pygame shapes�����������������������������������������������������������������������������163
Centering text����������������������������������������������������������������������������������������������164
Drawing Pygame text����������������������������������������������������������������������������������165
In the hole message������������������������������������������������������������������������������������165

ix
Table of Contents

Step 8: Scoreboard�������������������������������������������������������������������������������������������167
Fixed loops��������������������������������������������������������������������������������������������������������169
Display the scoreboard�������������������������������������������������������������������������������������170
Wrapping up������������������������������������������������������������������������������������������������������171

Index�������������������������������������������������������������������������������������������������173

x
About the Author
Mark Cunningham is the founder of Code Angel and a Computing
Science teacher with over 20 years experience teaching in Scotland.
Working with high school students, Mark has learned which coding
concepts new coders find difficult to understand, learn, and master. He has
recognized that students want to learn to code by writing programs which
will motivate and engage them. His work with Code Angel has allowed
him to take his teaching beyond the classroom and reach a much wider
audience online. Mark is also the co-founder of Hashtag Learning who
develop online resources for schools.

xi
About the Technical Reviewer
Massimo Nardone has more than 22 years of experiences in Security,
Web/Mobile Development, Cloud, and IT Architecture. His true IT
passions are Security and Android.
He has been programming and teaching how to program with Android,
Perl, PHP, Java, VB, Python, C/C++, and MySQL for more than 20 years.
He holds a Master of Science in Computing Science from the
University of Salerno, Italy.
He has worked as a Project Manager, Software Engineer, Research
Engineer, Chief Security Architect, Information Security Manager, PCI/
SCADA Auditor, and Senior Lead IT Security/Cloud/SCADA Architect for
many years.
His technical skills include Security, Android, Cloud, Java, MySQL,
Drupal, Cobol, Perl, Web and Mobile Development, MongoDB, D3,
Joomla, Couchbase, C/C++, WebGL, Python, Pro Rails, Django CMS, Jekyll,
Scratch, and so on.
He currently works as Chief Information Security Officer (CISO) for
Cargotec Oyj.
He worked as Visiting Lecturer and Supervisor for exercises at the
Networking Laboratory of the Helsinki University of Technology (Aalto
University). He holds four international patents (PKI, SIP, SAML, and Proxy
areas).
Massimo has reviewed more than 40 IT books for different publishing
companies, and he is the coauthor of Pro Android Games (Apress, 2015).

xiii
CHAPTER 1

Introduction
Welcome to Python game programming with Code Angel. In this book, you
will write the Python program code required to build four amazing games,
learning how to code as you go along.
The four games you will make are shown in the following.
Figure 1-1 shows the Forest Bomber game.

Figure 1-1. Forest Bomber

© Mark Cunningham 2020 1


M. Cunningham, Game Programming with Code Angel,
https://doi.org/10.1007/978-1-4842-5305-2_1
Chapter 1 Introduction

Figure 1-2 shows the Snapper game.

Figure 1-2. Snapper

Figure 1-3 shows the Alien Invasion game.

Figure 1-3. Alien Invasion

2
Chapter 1 Introduction

Figure 1-4 shows the Golf game.

Figure 1-4. Golf

C
 oding a game
Each game is built up steadily over several chapters. Take your time
working through each chapter, adding the program code as instructed.
New concepts will be explained as they are introduced.
As you finish each game, you should run your program to check that
it works as expected. If it doesn't, don't worry. It's quite common for a
program to contain errors which are known as bugs. If your program has
a bug, carefully compare your code with the code from this book and try
to spot any differences. Missing out just one single character or typing a
character in the wrong place can prevent a program from running.
Have fun playing your finished game or impress your friends by letting
them play the game that you have programmed!

3
Chapter 1 Introduction

P
 ython and Pygame
In order to run any of the code in this book, you will need to install
the Python programming language on your computer. This is a fairly
straightforward process. Follow the installation instructions on the Python
web site: www.python.org.
Once you have installed Python, you need to install the Pygame library
which extends Python and provides many of the functions required to
make games. Visit the web site for information on how to download and
install Pygame: www.pygame.org.
Both Python and Pygame are open source and completely free.

C
 hoosing an IDE
Now that you have installed Python and Pygame, you are ready to begin
coding. You are probably wondering where to actually type your Python code.
The best way to do this is by using an IDE. IDE stands for integrated
development environment. It's what programmers use to enter, run, and
debug their code.
There are lots of different IDEs to choose from. At Code Angel, we
recommend one of the following IDEs to get you started. They are all free
and available for Windows, MacOS, and Linux.

P
 ython IDLE
Pros: Installed with Python, fine for small projects
Cons: Basic, limited debugging, not great for larger projects
Rating 3/5

4
Chapter 1 Introduction

Thonny
Pros: Easy to use
Cons: Not as polished as PyCharm
Rating 4/5
Windows, Mac, or Linux

PyCharm Edu
Pros: Works well for large projects
Cons: More complex interface and menu options, steep learning curve
Installation: Needs Pygame to be added under Settings ➤ Project
Interpreter
Rating 5/5
Once you install whichever IDE you think best meets your needs, you
are ready to start coding.

Bugs and debugging


A bug is simply an error in a computer program. Bugs are so called
because early computers were very large and insects would get inside the
system and cause a short circuit. Nowadays, a bug refers to program code
which contains an error.
A bug may cause a program to crash or prevent it from working in
the way that was expected. Debugging means finding and fixing bugs in
program code.
When a program crashes, it may display an error message. Sometimes
the message can be difficult to understand. The most important thing to
note is the line number at which the error occurred. Find the line number
in your program, and compare it very closely with the same line of code
from this book. Look for any differences. Your program code must be

5
Chapter 1 Introduction

exactly the same as the code from the book. Also check that the lines
above and below the reported line number are correct.
A logic error is an error which causes a program to run incorrectly but
does not necessarily cause the program to crash. Because there is no error
message, logic errors can be difficult to find.
With logic errors, you need to work out where in the program code
the error might be. For example, imagine a game where the objective is
to shoot a spaceship. Each time that the player hits the spaceship, they
should have ten points added to their score. However, you find when
running the game that ten points are subtracted each time a spaceship is
hit. This would be an example of a logic error.
This logic error must have occurred when the program updated the
game score. It is likely that a minus sign has been used instead of a plus
sign, and that is what has caused the error. The game will not actually
crash, but the player will soon get fed up losing points every time they hit
a spaceship!

Common mistakes
While bugs can be caused in many different ways, there are some common
mistakes you should look out for.

Indentation
In Python, indentation levels are very important. Indentation errors can
cause a program to crash or not work correctly. Each level of indentation
should be either four spaces or a single tab.

while True:
⎵⎵⎵⎵for event in pygame.event.get():
⎵⎵⎵⎵⎵⎵⎵⎵key_pressed = pygame.key.get_pressed()

6
Chapter 1 Introduction

Make sure that you carefully check indentation levels as you enter new
lines of code.

Variable and function names


Make sure variable names and function names are spelled correctly.

score  ✓
csore  ×

Variable names and function names use underscores between words.

plane_exploded  ✓

Variable names and function names cannot contain spaces.

plane exploded  ×

Case
Python is case sensitive. This applies to Python commands, as well as
function and variable names.
So in a Python program, score, Score, and SCORE are three completely
different things.

Brackets and quotes


Brackets and quotes come in pairs.
If there is an opening bracket, there must also be a closing bracket
()
The same applies to quotes
“ ” or ‘ ’

7
Chapter 1 Introduction

Missing colons
if statements, for statements, def function declarations, and class
definitions all end in a colon. It’s common for beginners to miss the colon
out by mistake – if you are getting an error, make sure that the colon is not
missing.

if bomb.y > SCREEN_HEIGHT:

Comments
A comment is a note or explanation included in the program code.
In Python, comments begin with the # hash symbol and will often be
displayed in a different color by the IDE.
Comments are ignored by the computer when the program is being run.
All of the programs in this book include comments to help explain what the
program code is doing. These comments don’t affect the program and so do
not actually have to be entered, but it is good practice to include them.

Time to get started…


You are now ready to start programming the games in this book, beginning
with Forest Bomber. You might find coding tricky at times, you might get
frustrated, but to become a programmer, the key is to stick with it and not
give up. And of course…have fun!

8
CHAPTER 2

Forest Bomber part 1:


A first level
Dusty sunbeams cut eerie shadows across the forest floor.
Dawn was breaking.
The radio message was faint at first, but became gradually
stronger. 'Mayday…Mayday…' The distant hum of an air-
plane engine could be heard above the trees.
Captain Matt Johnson knew he was in trouble. The fuel gauge
in his B-58 Hustler was well into the red, indicating that he
would have no more than two minutes before his plane went
down. He glanced out of the jet fighter window. Where could
he land? There was nothing but a sea of trees beneath him.
He knew he had only one option remaining. Captain Johnson
would have to clear a landing strip using the bombs fitted to
the Hustler.

G
 etting started
We have an idea for a game, Forest Bomber. In Forest Bomber, an airplane
is running out of fuel and has to land safely at the bottom of the screen.
However, there are trees in the forest which will cause the plane to explode

© Mark Cunningham 2020 9


M. Cunningham, Game Programming with Code Angel,
https://doi.org/10.1007/978-1-4842-5305-2_2
Chapter 2 Forest Bomber part 1: A first level

if it crashes into one. So the pilot of the plane – our player – has to try and
bomb the trees to clear a landing strip.
OK, so we have an idea for a game, and it seems simple enough. That’s
a good start. Now what?
Before we even begin writing any of the Forest Bomber code, we need
to design the game in more detail by taking the idea and breaking it down
into smaller steps, covered here and in Chapters 3 to 5 as follows:

1. Set up game environment (Chapter 2).

2. Initialize variables (Chapter 2).

3. Display the background (Chapter 2).

4. Draw the forest (Chapter 2).

5. Draw the plane (Chapter 3).

6. Move the plane (Chapter 3).

7. Drop the bomb (Chapter 4).

8. Game over/level up (Chapter 4).

9. Display scoreboard and messages (Chapter 5).

I’ve split the steps over four chapters so we could gradually build up
the game. The first two steps might seem a little odd, but the remaining
seven steps should make some sense.
By the end of step 4, we will have designed and coded the layout for the
first level of Forest Bomber.
Let’s begin by sketching out how the game screen will look (Figure 2-­1).
The plane should start in the top left-hand area of the screen, and the forest,
which the player must clear in order to land, will run along the bottom of
the screen. As this will be the first level, we will start with four trees in the
forest, but the number of trees will increase in each level making the game
progressively more difficult.

10
Chapter 2 Forest Bomber part 1: A first level

Figure 2-1. Forest Bomber level 1 design

Step 1: Set up the game environment


Before we can even begin to think about planning the main gameplay, we
have to start by setting up some basic elements of the game environment.
This is fairly boring stuff, and so the plan is to skip by it as quickly as
possible so that we can concentrate on the main game where we will be
able to develop much more useful and interesting coding skills. OK, here
goes. Enter the lines of code exactly as they are shown in code listing 1 in
Figure 2-2.

11
Chapter 2 Forest Bomber part 1: A first level

Figure 2-2. Forest Bomber code listing 1

We won’t worry too much about the code at this stage, but if you want
to know more, the following explains what it does:
• Lines 1–3 are called comments. They are ignored by
the computer.
• Lines 5–8 tell the computer that we are going to use
some additional Python code which has to be imported.
• Lines 11–15 are some of the colors we will be using later
in the program.
• Lines 18–32 set up some values which will be used
throughout the program. For example, SCREEN_
WIDTH and SCREEN_HEIGHT will be used to draw the
actual game screen at 640 × 480 pixels, TREE_SPACING
will be used to keep a 40-pixel space between each of
the trees, and PLANE_START_Y will be used to start the
plane 54 pixels down from the top of the screen.

12
Chapter 2 Forest Bomber part 1: A first level

Again, enter the lines of code shown in code listing 2 in Figure 2-3.

Figure 2-3. Forest Bomber code listing 2

• Lines 36–43 set up the window in which the game will


be displayed.

• Lines 46–51 load the graphics which will be used in


the game.

• Lines 54–55 load the audio files which will be used in


the game.

Step 2: Initialize variables


Now that all of the boring stuff is out of the way, we can start to write
the game.

S
 core and lives
We will begin by gaining an understanding of variables. A variable stores a
piece of information or data to be used in a program. Think of a variable as
being like a box. Each variable must have its own unique name.

13
Chapter 2 Forest Bomber part 1: A first level

In Forest Bomber, we need to keep track of the score. To do this, we


use a variable. We will create a box (a variable), give it the name score and
place the number 0 in it.
When a variable is first given a value, it is being initialized. The score
variable is initialized with the value 0 (Figure 2-4).

Figure 2-4. The variable score, which stores the value 0

We will also need to keep track of the game level. Again, we use a
variable, but this time we will call it level and initialize it with 1, because
the game will begin at level 1 (Figure 2-5).

Figure 2-5. The variable level, which stores the value 1

14
Chapter 2 Forest Bomber part 1: A first level

Variables can store different types of data. Our score and level variables
are both integers. An integer is a whole number which can be positive,
negative, or zero.
Enter the code to initialize all of the game variables, as shown in code
listing 3 in Figure 2-6.

Figure 2-6. Forest Bomber code listing 3

Line 57 initializes the level variable with the value 1.


Line 58 initializes the score variable with the value 0.

15
Chapter 2 Forest Bomber part 1: A first level

Key learning A variable is like a box which can store some data or
information. Each variable has its own unique name and is initialized
as follows:
score = 0
lives = 1

Forest list variable


Lines 85–88 use a special type of variable to set up the tree formation for
each level.
The variables forest_1, forest_2, forest_3, and forest_4 are lists.
A list is a special kind of variable because it can store more than one item
of data. There are four different forest lists because there will be four levels
in the game.
Each forest list stores 12 items, which can be either

• ‘T’ which represents a tree

• ‘–’ which represents a space

Figures 2-7 to 2-10 show how the four forests are stored as lists and
how each list is then mapped to a tree drawn on the screen. We will learn
later in this chapter how we actually draw the trees.

Figure 2-7. Level 1 illustration using the forest_1 list

16
Chapter 2 Forest Bomber part 1: A first level

Figure 2-8. Level 2 illustration using the forest_2 list

Figure 2-9. Level 3 illustration using the forest_3 list

Figure 2-10. Level 4 illustration using the forest_4 list

Notice that as we move from forest 1 through to forest 4, there are more
trees. This is so that each level is harder than the one before. If you wish,
you can customize Forest Bomber by changing the combination of ‘T’s and
‘-’s in the list to change the formation of trees in a level (although probably
best not to do that just yet).

Key learning A list is a special type of variable which can be used


to store multiple items of data.

So far, we have entered almost 90 lines of code, and nothing is


happening in our game yet!

17
Chapter 2 Forest Bomber part 1: A first level

Step 3: Display the background


It is time to display some of the graphics for Forest Bomber, and we will
begin with the background graphic. Enter lines 91–105 as shown in code
listing 4 in Figure 2-11.

Figure 2-11. Forest Bomber code listing 4

Notice that line 94 and lines 102–105 are indented (which means
they are spaced in from the left of the page). Also notice that line 97 has
a double indent, and lines 98–99 have three levels of indentation. Python
is very specific about each level of indentation. Each level of indentation
should be exactly four spaces (or one tab).
Let’s take a closer look at line 102.

This is the line of code which draws our game background. It uses
the blit command to display the background image in the top left-hand
corner of the game window. The background image itself is 640 × 480
pixels which is exactly the same size as the Forest Bomber window, so it
fits in place perfectly.
Pygame uses a coordinate system to draw graphics on screen, and the
point (0,0) is in the upper left-hand corner as can be seen in Figure 2-12.

18
Chapter 2 Forest Bomber part 1: A first level

Figure 2-12. Pygame coordinate system

There are a couple of other things to note about the way in which the
background image is displayed by line 102:

• game_screen is a variable which was initialized in


line 40, and it is a representation of the Forest Bomber
game window.

• background_image is a variable which was initialized in


line 46. It stores the image file background.png.

Now it’s time to test our program. Run Forest Bomber, and if you have
entered the code correctly, the background image should be displayed.
If you get an error, carefully check that all code has been entered correctly.
Even the slightest mistake will cause the program to not run.

19
Chapter 2 Forest Bomber part 1: A first level

Key learning blit draws an image onto a Pygame screen.

Pygame uses a coordinate system, where the point (0,0) is the


top-left corner of the game.

Each level of indentation is four spaces or one tab.

Step 4: Draw the forest


Now that we have our game background, it’s time to draw the forest.
We have already seen that the layout of the forest for each level is
stored in a list. For level 1, the forest layout is held in the list forest_1. The
next block of code will draw the forest on top of the game background.
To draw the forest, code listing 5 should be added between lines 102
and 104 as shown in Figure 2-13.

Figure 2-13. Forest Bomber code listing 5

Some lines of code listing 5 in Figure 2-13 are quite complicated, and
so the techniques used will be picked up later in the book.
For now, we will concentrate on lines 106–108 because they actually
draw the trees in our forest.

20
Chapter 2 Forest Bomber part 1: A first level

Using math to calculate tree position


Line 106 does a bit of math to work out how far across the game screen
to place each tree.

• The variable tree.x will store the x coordinate of the


tree (how far across the screen it should be displayed).

• FIRST_TREE is a variable which has already been given


the value of 140 in line 28 of the program.

• column will be 0 to begin with but will then become 1,


then 2, then 3, and all the way up to 11. This is because
there can be 12 different positions at which a tree can
be displayed from left to right.

• TREE_SPACING is also a variable which has its value


assigned earlier in the code – if you check back to line
27, you will see it was set to 40. This variable is the
number of pixels between each tree in the forest.

• The ∗ sign in Python means multiply.

So let’s do the math…

When column is 0:
tree.x = FIRST_TREE + column ∗ TREE_SPACING
       = 140 + 0 ∗ 40
       = 140

When column is 1:
tree.x = FIRST_TREE + column ∗ TREE_SPACING
       = 140 + 1 ∗ 40
       = 180

21
Chapter 2 Forest Bomber part 1: A first level

When column is 2:
tree.x = FIRST_TREE + column ∗ TREE_SPACING
       = 140 + 2 ∗ 40
       = 220

And so on. This is how we work out the x coordinate of each of the
12 trees.

Deciding which trees to draw


But wait – we don’t actually want to display all 12 trees. We only want to
display a tree when our forest list has a T. That’s where line 107 comes in.

This is an if statement. if statements are used in programming to


make a decision.
This code is saying

• Only draw a tree if the forest_item is equal to ‘T’.

Notice the use of the double equals (==) in line 107. In Python, we use ==
to check if two things are equal.
Line 107 doesn’t actually draw anything though; it is only making the
decision. If the forest_item is equal to ‘T’, then line 108 will be executed,
and line 108 is the line which draws the tree on the screen.

Notice that line 108 is indented. If the forest_item is a ‘T’, then all
indented lines directly below the line will be executed. In this case, the only
indented line is 108, so that will be executed if the forest_item is a ‘T’.

22
Chapter 2 Forest Bomber part 1: A first level

Line 108 uses the blit command to draw a tree_image onto the
game_screen at coordinates (tree.x,tree.y). But where do all of these
commands and values come from?

• We learned about blit earlier in this chapter when we


drew the background image.

• We also saw that game_screen is a variable which stores


the Forest Bomber game window.

• tree_image is a variable used to store the image of a


tree. It was initialized in line 47 of the program where it
was loaded with the file tree.png – the picture of a tree.

• We have already seen how tree.x is initialized by some


math which calculates how far horizontally across the
screen each tree should be placed.

• tree.y is a variable initialized in line 77 of the program.


It uses some math to work out where to place the tree
vertically, a few pixels above the bottom of the game
screen.

Let’s ignore lines 109–110. They will display the image of a tree on fire if
it has been hit by a bomb. As we have not written the code to drop a bomb
yet, these lines won’t actually do anything.
We can summarize lines 105–108 as follows:

• Go through each forest item in our forest list.

• Use math to calculate the x coordinate of the tree.

• If the forest item is a tree, then draw a tree in the correct


location.

Run the program. The four trees of Forest Bomber level 1 should be
displayed along the bottom of the game window.

23
Chapter 2 Forest Bomber part 1: A first level

Key learning if is used to make a decision.

Double equals (==) are used to check if two things are equal.

The indented lines below an if statement will be executed if the


statement works out to be true.

Summary
Phew! No one said learning to code would be easy. We have covered a lot
of complex programming in this first chapter because we prefer to dive
right in. Don’t worry if it all seems difficult to understand. It is, but it will get
easier, and we will revisit many of these topics as we work through the book.
So far, we have written lots of lines of code, and all we have to show for
it is our game background and some trees. The Forest Bomber game will
begin to take a bit more shape in the next chapter.

24
CHAPTER 3

Forest Bomber part 2:


Is it a bird…?
Captain Matt Johnson looked out of the window of his B-58
Hustler. The forest below stretched out like a giant green carpet
as far as the eye could see. He studied the fuel gauge again. The
dial pointed directly at the letter E.
Empty.
The B-58 Hustler began making its descent…
In the previous chapter, we completed steps 1–4 of our game design
and learned how to draw the background and trees onto the screen. In
this chapter, we will learn how to draw and move Captain Johnson’s B-58
Hustler plane.
Picking up the steps from our original plan

5. Draw the plane.

6. Move the plane.

Step 5: Draw the plane


Insert code listing 6 between lines 112 and 117 as shown in Figure 3-1.

© Mark Cunningham 2020 25


M. Cunningham, Game Programming with Code Angel,
https://doi.org/10.1007/978-1-4842-5305-2_3
Chapter 3 Forest Bomber part 2: Is it a bird…?

Figure 3-1. Forest Bomber code listing 6

Let’s take a closer look at lines 113 and 114 in Figure 3-2.

Figure 3-2. Forest Bomber code listing lines 113 and 114

We can see another if statement has been used here, so we know that
the program code is making a decision. It is checking to see if plane_
exploded is False. If we look all the way back to line 63, we can see that
plane_exploded is a variable and it is initialized to False.
What is False? In programming, there is a variable type known as a
Boolean, and it can have one of only two possible values: True or False.
Boolean variables are useful in game programming, because they can only
be one or the other. There is no in-between. They can only be either True
or False. Later in the program, we will set the value of the plane_exploded
Boolean variable to True when our plane crashes into a tree. But for now,
it’s False.
Given that the value of plane_exploded is False (at least for now), then
line 114 will execute. Line 114 uses the blit command to draw the plane
image at coordinates (plane.x,plane.y).

26
Chapter 3 Forest Bomber part 2: Is it a bird…?

We can see from previous lines of code in our program that

• plane_image is a variable which stores plane.png


(line 45).

• plane.x is initialized with the value PLANE_START_X


(line 73). PLANE_START_X is initialized with the value 0
(line 32) so plane.x will have the value 0.

• plane.y is initialized with the value PLANE_START_Y


(line 74). PLANE_START_Y is initialized with the value 54
(line 33) so plane.y will have the value 54.

Our plane will first appear at coordinates (0,54).


Run the program. The plane should appear near the top of the screen,
on the far left-hand side.

Key learning A Boolean variable can store one of two values: True
or False.

Step 6: Move the plane


In game programming, we move a sprite around the game screen by
changing its coordinates and then redrawing the screen.

Fly across the screen


In order to get the plane to move across the screen, we increase the
x coordinate and then redraw the screen. The more we increase the
x coordinate by, the faster the plane will fly. We will increase the x
coordinate by 5, which means it will move to the right by 5 pixels.
Insert code listing 7 at line 101.

27
Chapter 3 Forest Bomber part 2: Is it a bird…?

Figure 3-3. Forest Bomber code listing 7

Line 101 can be read as

• Take the variable which stores the plane’s x coordinate.

• Add 5 onto it.

We learned earlier in this chapter that plane.x was initialized with 0.


When line 101 is executed, it will take what is stored in plane.x (in this
case 0) and add on 5. So the new value of plane.x is 5.
We need to do this repeatedly; otherwise, the plane will only move 5
pixels once, which won’t be much use. It’s time to look back at another line
of code that we wrote earlier, line 92.

Figure 3-4. Forest Bomber code listing line 92

while True means to repeat doing something – forever. Look down


at the rest of the program code below line 92. It is all indented. This
means that all the indented code will keep repeating, forever (well at least
until the user closes the game window). This also means that 5 will be
repeatedly added onto the x coordinate of the plane.
In order to see the plane actually move, we need to redraw the screen.
Let’s look at some code that we wrote earlier but didn’t pay much attention
to, the last two lines of code in the program, lines 122 and 123.

28
Chapter 3 Forest Bomber part 2: Is it a bird…?

Figure 3-5. Forest Bomber code listing lines 122 and 123

Line 122 redraws the screen, while line 123 determines how many
times the screen should be redrawn in one second, in this case 30.
So our program now draws the plane, moves it 5 pixels right, redraws
the plane, moves it another 5 pixels right, and so on, creating the illusion of
the plane moving.
Test this by running the program.
Fantastic, right? Except for one thing. Our plane flies off the end of the
screen never to be seen again, and that won’t make for much of a game!

Fly down the screen


Let’s take a moment to consider the logic to make the plane fly down the
screen:

• If the plane flies off the right-hand side of the screen,


move it down the screen and back to the left-hand side.

To move the plane

• Down: We add 100 to its y coordinate.

• Back to the left: We set its x coordinate back to 0.

Add the code to fly the plane down the screen shown in code listing 8,
Figure 3-6.

Figure 3-6. Forest Bomber code listing 8

29
Chapter 3 Forest Bomber part 2: Is it a bird…?

Run the program. Now the plane should fly to the right edge of the
screen and then drop down by 100 pixels beginning again on the left-hand
side, except now it flies all the way to the bottom of the screen and then
disappears. We will fix this in a later chapter.
Now we are going to make a couple of minor changes to the code that
flies our plane and which will be useful later.
First, adapt line 102 so that it reads as in Figure 3-7.

Figure 3-7. Forest Bomber code listing line 102

We have added + speed_boost to the end of the line, but why? We


want to make the game get a little harder for levels 3 and 4. For levels 1
and 2, speed_boost is 0, so it makes no difference to the speed of the plane.
But for levels 3 and 4, we will set speed_boost to 1. This means we will be
adding 6 to the plane’s x coordinate for levels 3 and 4 instead of 5. It will
make the plane fly slightly faster across the screen and make the game just
that little bit harder.
The second change is to insert an if statement at line 102, Figure 3-8.

Figure 3-8. Forest Bomber code listing line 102 with if statement

The purpose of this line is to make sure we only move the plane if

• We have not reached the end of the level.

• The plane has not exploded.


If either of these events occurs, we do not want to move our plane. We
will learn later in the book how we change the values of level_cleared when
the level is over and plane_exploded when the plane crashes into a tree.

30
Chapter 3 Forest Bomber part 2: Is it a bird…?

The code should now look like code listing 9 in Figure 3-9. One very
important thing to note – because we added an if statement at line 102,
lines 103, 105, 106, and 107 have all had one extra indentation.

Figure 3-9. Forest Bomber code listing 9

Key learning To move a sprite, change its coordinates and then


redraw the screen.

while True is used in Python game programming to repeat forever.

31
CHAPTER 4

Forest Bomber part 3:


Bombs away…
Captain Johnson looked down at the flight control panel of his
B-58 Hustler jet. He knew what he had to do. His finger hov-
ered over the button marked ‘Release.’ Timing was all-­
important now. He could not afford to miss his target. A bead
of sweat slipped slowly down his right temple.
Wait…Wait…Wait…Now!
He hit the button, and a bomb dropped out of the B-58 and
began hurtling toward the forest below.
In the last chapter, we learned how to make the plane fly across the
screen. Next, we will learn how to write the code which will drop a bomb,
and then we will develop the end of level and game over code.
From our plan

7. Drop the bomb.

8. Game over/level up.

© Mark Cunningham 2020 33


M. Cunningham, Game Programming with Code Angel,
https://doi.org/10.1007/978-1-4842-5305-2_4
Chapter 4 Forest Bomber part 3: Bombs away…

Step 7: Drop the bomb


K
 ey presses
So far in Forest Bomber, there is not much for the player to do other
than sit back and watch the plane fly across and down the screen until it
eventually disappears off the bottom right-hand corner. Not much of a
game! We want our player to be able to interact with Forest Bomber so that
when they hit the spacebar, a bomb is dropped.
Pygame has a way of capturing or storing any key presses.
The code will look as in Figure 4-1.

Figure 4-1. Key press code

• The first line assigns any key presses to a variable


key_pressed.

• The second line checks to see if the key_pressed


variable holds a specific key, in this case the spacebar.
Let’s build the key press code into Forest Bomber. Insert code listing 10
(Figure 4-2) at line 96.

Figure 4-2. Forest Bomber code listing 10

34
Another Random Scribd Document
with Unrelated Content
has already spread like wildfire throughout the nation, and kindled
its heart into a fine warlike glow.
BANQUET IN THE SCHLOSS.

OMINOUS SPEECH BY THE EMPEROR.

(By Telegraph from our Special Correspondent, Mr. Charles Lowe.)


Berlin, April 25.

To-night the Emperor gave a grand military banquet in the


White Saloon of the Schloss previous to his starting for Thorn—that
tremendous bulwark on the Vistula over against the Russian frontier,
where the work of concentrating the German troops is proceeding
rapidly. At this banquet I was favoured with a seat in the gallery,
from which I have witnessed so many pomps and pageants at this
Court; and when the third course had been reached, His Majesty
(who wore the gala uniform of the Gardes du Corps) rose, and, amid
a silence in which you might have even heard the fall of a hair,
addressed his guests as follows, in a most resolute and rasping voice:

‘Meine Herren, God has willed it that Germany should draw her
sword in defence of her ally, and to God’s high, holy will we all must
bow. German loyalty (‘Deutsche Treue’) has ever been one of the
most conspicuous virtues of our race, and, if we now failed to prove
true to our treaty engagements, we should justly deserve to become a
mockery and a bye-word among the nations. Remembering, as I do,
the very last words almost which were addressed to me by my
beloved grandfather, now resting in God, who conjured me to be
considerate towards and cultivate the friendship of Russia, it is with
a heart full of exceeding heaviness that I look forward to the events
that are ahead of us. Nevertheless, it shall be in the power of no one
to say that the German Government was ever wanting in fidelity, or
the German army deficient in courage.
‘Gentlemen, that courage has been displayed on a thousand
glorious battle-fields, and never more so than in those stupendous
and heroic encounters which made of us a great and united nation—a
nation whereof the safety and integrity would be gravely imperilled
by disaster, involving, perhaps, disruption to the dual monarchy of
our allies. Such a result, gentlemen, we cannot endure; and it is to
obviate the bare possibility of such a thing that we are now about to
respond to the solemn call of treaty obligations, by placing some of
our heroic troops side by side with the brave army of my august
friend and ally, His Majesty the Emperor Francis-Joseph; nor is it to
be doubted that this companionship-in-arms, among other things,
will have the blessed effect of wiping out all memory of our past
conflicts and estrangements, and of re-uniting, in the bonds of
fraternal love and loyalty, the two greatest sections of the mighty and
invincible German race.
‘Meine Herren, God is above us, but uncertainty, to some extent,
is before us. Within the last few years the science of war has been
completely revolutionised, and we are all now about to grapple with
military problems which never taxed the powers of our predecessors.
As the Supreme War-Lord (‘oberste Kriegs-Herr’) of our armies, I
mean to make inspection of such of our forces as are now
marshalling themselves on our Eastern marches and also to remain
at their head unless—which God forfend!—the course of events
should call me elsewhere. (Sensation.)
‘But, gentlemen, I do not require to tell you that the duties and
functions of a commander are very different now from what they
were at the beginning of this century, not to speak of the time of my
invincible and immortal ancestor, Frederick the Great, who inspired
his troops by his very presence and directed them in battle; whereas
now all that is nearly left to the modern commander-in-chief is to
lead his forces up to battle and then leave them to the charge of his
subordinates—an era in the science of warfare which was
inaugurated by that great scientific soldier, lately, alas! taken from
us, who has written his deathless name in indelible letters of gold on
the tablets of his country’s history.
‘Forbidden by the nature and necessities of warfare, as now
practised, to be a tactician—such as Cæsar, or Frederick, or
Napoleon, or Wellington—the modern commander-in-chief must
restrict himself to the task of strategy, and intrust his colonels and
his captains with the duty of beating the enemy in detail. And as a
modern battle must necessarily stretch over a vast extent of front, it
really resolves itself into a hundred separate combats, in which even
company leaders become independent commanders; and thus,
gentlemen, to all of you there is opened up a glorious prospect of
doing your duty to your country and achieving a distinction which
was reserved to the generalissimos of yore. But though thus every
colonel and every captain among you is now a commander-in-chief,
it behoves you to remember that, what with smokeless powder,
magazine rifles of vast range, and other innovations, the conditions
of fighting have altered immensely even since Germany last took the
field; but I doubt not that you will all prove true to our highest
traditions, and that our brave army, with God’s blessing, will once
more show the stuff of which it is made.
‘Gentlemen, this is a solemn moment, and it is not in a spirit of
festive mirth, but rather under the influence of the serious feelings
which dominate us all, that I ask you to drain your glasses to the
health of my august ally, His Majesty Francis-Joseph, Emperor of
Austria-Hungary. Hurrah, hurrah, hurrah!’
To-morrow the Emperor will leave for the frontier, and I have
been graciously permitted by His Majesty to attach myself to his
Headquarter-Staff.
Departure of the Emperor for the East.
Berlin, April 26.

It is long since the Linden Avenue witnessed such a scene of


crowding and excitement as it presented to-day, when the Emperor
(who wore the drill uniform of his Silesian Bodyguard Cuirassiers,
named of the Great Elector), drove from the Schloss to the Central
Station to take train for Thorn. His Majesty was accompanied by the
Empress, who looked very sad, where her august husband only wore
a serious mien. The fine sunny weather, balmy already with the
fragrance of the budding spring, had lured thousands and thousands
into the streets to see the away-going of the Emperor on his first
campaign; and it was only with great difficulty that the demi-
squadron of cavalry (Gardes du Corps) escorting the Imperial
victoria could advance through the packed and cheering masses of
people who thronged every inch of standing-space in Unter den
Linden, and reached up to the very house-tops.
At one point of its route, just opposite Café Bauer, the Emperor’s
carriage was even brought to a stop; and it was then that a very
excited gentleman (who turned out to be an American admirer of His
Majesty) profited by the opportunity to throw a laurel wreath into
the Imperial equipage. Quick as thought, the Emperor placed the
wreath on the point of his sword-scabbard and tossed it back to his
adulator, saying with a smile, ‘Wait a little, my friend; let us earn this
first’—a sally that was the signal for a perfect storm of cheers on the
part of the witnesses of this charming incident, which furnished
them with additional reason for lauding the Emperor’s modesty and
good sense.
There was much cheering, hat-waving and fluttering of
handkerchiefs as their Imperial Majesties—who never ceased bowing
their acknowledgments—threaded their way to the station, on the
platform of which was assembled Headquarter-Staff, with the great
Household officers and Ministers of State (who looked very grave
indeed), and others whom duty or curiosity had brought to see the
Emperor off. After conversing for a few minutes with Count Caprivi
(who, unlike his predecessor in office, is not to go to the front in the
meantime, pending the development of French schemes), His
Majesty turned to his sad-eyed consort, whom he embraced with
great warmth, and then entered his travelling saloon carriage. In
another moment, amid three parting ‘hochs,’ the train had glided
away, carrying with it the first German Emperor who has unsheathed
his sword against the Czar of all the Russias.
ILL-TREATMENT OF A WAR-
CORRESPONDENT BY THE GERMAN
HUSSARS.

THE BIVOUAC AT THORN.

SIGNIFICANT REMARK OF THE EMPEROR.

(By Post from our Special Correspondent, Mr. Charles Lowe.)


Thorn, April 27.

Following the route taken by the Emperor, I arrived here this


morning, thanks to the courtesy of Baron von Tauchnitz (a son of the
great Leipzig publisher of the well-known Continental edition of our
English classics), who kindly allowed me a place (it was only a
standing one) in the train conveying to the front the Magdeburg
Artillery Regiment of his command, as well as the Train, or Army
Service, Battalion of the 4th Corps.
While crossing the bridge from the railway station to claim the
quarters that had been assigned me at the ‘Black Bear,’ my eye and
ear were suddenly struck by a strange hubbub going on below. A
troop of red-tunic’d Zieten Hussars (‘Duke of Connaught’s’) were
watering their horses in the Vistula, which has here a broad, placid,
and majestic course; and while these thirsty animals were revelling
in delicious draughts of the first water they had tasted since leaving
Rathenow (their garrison townlet, near Bismarck’s native place),
their riders were amusing themselves by roaring and laughing at the
frantic efforts of what seemed to me to be a big Newfoundland dog to
extricate himself from the stream. Presently the poor brute, which to
my great astonishment gradually assumed human shape, struggled,
spluttering and gasping, on to the shelving bank; and then it was that
I recognised in this buffeted and bedraggled creature, Solomon
Hirsch, the well-known correspondent of the Berliner Tageblatt,
whose shock head of hair, all touzled and dishevelled, had given him
the semblance of canine form and feature alluded to. It appears that
poor Hirsch, fulfilling his functions with more zeal than discretion,
had already made himself an object of universal execration at the
front by communicating to his paper most minute details as to the
massing and position of the German troops towards the Russian
frontier, and that being recognised by these rollicking and resentful
Zieten Hussar fellows, to whom he had, in an evil moment for
himself, appealed for information as to their ultimate destination,
this ‘curse of modern armies’ was at once set upon, hilariously tossed
in a horse-rug, and then contemptuously heaved into the Vistula. I
have made a point of dwelling on this serio-comic incident, which I
myself was quick to take to heart, as it will serve to explain the
absence from my telegrams of all but the most meagre and general
references to the positions and movements of the German troops;
and, indeed, I should be worthy the fate of my hapless colleague did I
abuse the hospitality which has been so graciously extended to me by
revealing unexecuted plans.
Indeed, I have only been promised the use of the field and other
telegraph wires on the strict condition that my messages never
exceed a limited number of words, which will necessarily restrict my
reports to the briefest and barest, yet, I trust, sufficient summaries.
The Emperor (who was accompanied by the King of Saxony and
other high general officers) has just returned from a rapid ride round
the circle of the outer forts, within which the troops are all lying
under canvas; and from the top of the Garrison Church Steeple, the
highest point in this mighty fortressed town, nothing can be seen but
endless vistas of tented bivouacs. Never before has the German
soldier been allowed any other night covering in the field but the
canopy of heaven, though, indeed, in a country like France, which is,
in truth, a land flowing with milk, wine, and honey, and teeming with
villages and other opportunities of cantonment, he had
comparatively little need of tents. But it is quite a different thing in
Russia, with its raw and rigid climate, its vast, uncultivated, and
uninhabited spaces; and it was in view of the probable contingency of
a campaign in such a foodless and roofless wilderness that the
General Staff, with that remarkable foresight and wisdom which has
always distinguished it, resolved to equip all the Army Corps lying
nearest the Eastern frontier with the very best tents procurable—
namely, such as were at once waterproof, windproof, and even
fireproof. For otherwise what ruin might not a spark from a bivouac
fire entail upon the tented fields which stretch away in every
direction towards the horizon, both here and at Posen, at Neisse, and
at Königsberg, reminding one of the hosts, countless as the sands on
the sea-shore, of the five kings who encamped over against Gibeon.
But I must not omit to record a curious incident which
happened as the Emperor was riding past the statue of Copernicus,
whose birthplace was Thorn. Just when abreast the monument of
that immortal astronomer, His Majesty remarked to his suite: ‘Ja,
meine Herren, there you see the man who first opened the eyes of
the world to the true nature of the solar system; and I think that with
God’s help we shall equally be able to assign Russia her proper place
in the system of nations.’
THE AUSTRIAN PLAN OF CAMPAIGN.

DETAILS OF PREPARATION.

(By Telegraph from our Special Correspondent, Mr. Charles Lowe.)


Thorn, April 29.

To-night the Emperor (who continues to display wonderfully


good spirits and energy) gave a banquet in the hastily furbished-up
rooms of the gloomy old Schloss, in honour of Feldzeugmeister
Baron Beck, the Chief of the Austrian Staff, who, pending the
progress of his well-thought-out mobilisation and massing scheme,
which he had set a-going by a simple order from Vienna, had hastily
run up here by rail to concert united action with his German
colleague, Count von Schlieffen, the present occupier of Moltke’s
high and responsible office. From a trustworthy source I gather that
this was the substance of Baron von Beck’s communication:—
It had been discovered, beyond all doubt, that the main objective
of the Russian invasion was Lemberg, in the direction of which
Dragomiroff was concentrating immense masses of troops, drawn
from the 4th, 8th, 9th, 10th, 11th, 12th Army Corps, in the rear of
whom other forces, furnished by the remoter 13th, 16th, 17th and
other Corps, were pushing up as fast as the defective railway system
of the country would allow them. Austria, on her part, had resolved
to combine her defensive forces into three armies—one of about
300,000 strong, in East Galicia, on the Dniester; another, about as
half as strong (150,000), on the San, with its back on Przemysl, that
tremendous bulwark of Middle Galicia; and a third, of about
120,000, near Cracow, that almost equally formidable place d’armes,
and key of Western Galicia on the Upper Vistula.
But these numbers do not include a force of eight independent
Cavalry Divisions, each of four Brigades, or four regiments, which
are to be ranked along the Galician frontier at the likeliest points of
danger from the mass-raidings of Russian horsemen.

THE KNIGHTS OF
MALTA AT AMBULANCE
WORK.

Such were meanwhile the relative dispositions and prospects on


either side of the Austro-Russian border, while, on the other hand,
General Gourko, the hero of the Balkans, was concentrating at
Warsaw an army consisting of the 5th, 6th, 14th, 15th Corps, and
other troops, for the double purpose of holding the Germans in
check, and of operating towards Cracow, on the Austrian left flank.
Moreover, the 2nd Russian Corps from Wilna, and the 3rd from
Riga, seemed to be marshalling on the lower Niemen with the view of
looking over into Königsberg; and of these Muscovite troops in the
Baltic Provinces, no less than in Western Poland, Baron Beck trusted
that the Germans would give a good and satisfactory account.
As a token of his complete satisfaction with the Baron’s lucid
and hopeful exposition of the military situation, the Emperor, at
parting, which was very cordial on His Majesty’s part, conferred on
the distinguished Chief of the Austrian Staff the Red Eagle of the first
class (with swords), and, at the same time, intrusted him with an
autograph missive for his august master at Vienna.

(By Telegraph from our Special Correspondent, Mr. Charles Lowe.)


Thorn, Later.

From my correspondent with the Army of the Baltic at


Königsberg I learn that its mobilisation is now complete, and that
Count Waldersee (who has had a bad fall from his horse, but is better
again) is burning to make a dash across the frontier and pluck a leaf
from the laurel-wreath of General Gourko.
The 2nd, or Pomeranian Corps, has meanwhile been appointed
to cope with any descent from the Russian Fleet on the Baltic shore;
while the 9th Corps has been similarly left in Schleswig-Holstein for
the double purpose of frustrating any attempted landing in that
quarter, and also of keeping an eye on Denmark, whose hearts are
practically with the Russians, and who have not yet forgotten the
Redoubts of Düppel.
On the other hand, the fortification of Breslau is proceeding at a
rapid rate, Prince Pless and the Duke of Ratibor having lent a little
army of their miners to do the necessary pick and spade work; while
the Army of Silesia (under Prince George of Saxony) is now
echeloned along the railway line, parallel to the Russian border,
between Kreuzburg and Tarnowitz—in utrumque paratus—that is to
say, ready either for a front march across the frontier on
Czenstochau, on the Warsaw railway, or for a flanking movement of
support in the direction of Cracow, as occasion may demand.
The Austrians, we know, are well forward with their
concentration; but owing to the fact that the telegraph wires of the
Russians have now ceased to speak to the outer world, and that
travellers are neither allowed into nor out of Russia, we are still very
much in the dark with regard to their massings and their
movements. To-morrow, however, we mean, if possible, to try and
penetrate a little the veil of this mystery.
FIRST COLLISION OF RUSSIAN AND
GERMAN TROOPS.

SKIRMISH AT ALEXANDROVO.

(By Telegraph from our Special Correspondent, Mr. Charles Lowe.)


Thorn, April 30.

I have just returned from a reconnoitring ride with two


squadrons of the Zieten Hussars, who pushed across the Russian
frontier to within sight of Alexandrovo, the scene of the meeting (of
which I had the good fortune to be an eye-witness) between the old
German Emperor and the late Czar Alexander II., in September 1879,
shortly before the signature of the Austro-German Treaty of Alliance.
It is a curious coincidence that the first blood in the present
campaign should have been drawn within view of the spot to which
the old Emperor—greatly against the advice of his irate Chancellor,
Bismarck—then hastened to conjure the Czar to desist from his
warlike operations, and assure him, on the other hand, of his own
unalterable determination to keep the peace.
When we had advanced by the road skirting the railway to
within about a mile of Alexandrovo, a gun attached to a body of
Cossacks (they were of the Don, as I could make out through my
glass, from their blue tunics faced with red) opened fire on us; and
the shell, bursting right in front of our leading troop, killed two
horses and seriously wounded one man (a Wachtmeister). So having
thus caused the enemy to give tongue, we turned bridle and trotted
back, carrying with us the intelligence—the rich fruit of our
reconnaissance—that Alexandrovo was strongly occupied by troops
of all arms. Four sotnias of Cossacks came pelting after us, but we
were quick to outrun these rampaging gentry, to whom a gun from
one of our horse-batteries sent hurtling over a few shells as a parting
souvenir of our hasty yet successful visit.
WARLIKE EXCITEMENT IN PARIS.

(By Telegraph from our Special Correspondent, Mr. D. Christie


Murray.)
Paris, April 30.

Paris to-night is in a state of the maddest ferment. For some


days past the public have followed with breathless interest the rapid
development of events on the Russo-German frontier, and the news
of the first skirmish at Alexandrovo, which was printed in Le Soir
this evening, has roused the wildest enthusiasm. Long and anxious
consultations of Ministers have been held daily, and the Press, with
hardly an exception, have been urging on the Government an
immediate declaration of war. Many of the better-class Germans
have been hurrying from Paris—a precaution which, in the issue, has
been shown to be judicious. When to-day’s news became known,
every trade and artifice was instantly abandoned, and the streets
since three o’clock till now have been thronged by vast crowds,
pulsating to a more and more impassioned excitement. By four
o’clock there were literally fifty thousand people standing in the
street with newspapers in their hands, and every reader was the
centre of an excited throng. I was standing opposite the Vaudeville
when a man, bearing a prodigious bundle of newspapers wet from
the press, came staggering swiftly towards the kiosque. The mob fell
upon him, despoiled him of his burden, and tore open his parcel.
There was such a wild hurry to learn the news, and everybody was so
eager to be first with it, that scores of the journals were torn to
ribbons, and hundreds more were trampled into the mud of the
pavement. The proprietress of the kiosque wrung her hands and
wept over the spectacle, and a gentleman who, by pressure of the
crowd, was forced half-way through one of the windows, vociferously
demanded to know the value of the lost journals. The woman
instantly became business-like, and appraised them roughly at a
hundred francs. The gentleman produced a pocket-book and paid
her twice over, shouting noisily, ‘I present this glorious news to
Paris! Vive la Russie! A bas la Prusse!’ That was the first signal I
heard, and in one minute the whole boulevard rang with frenzied
roar on roar. Omnibuses, public carriages, and vehicles of every
description were wedged immovably in the crowd which thronged
the horse-road. The drivers rose from their seats, the passengers and
occupants of the carriages stood up in their places and roared and
gesticulated with the rest. Hundreds of people at once strove to make
speeches, and the combined result was such a charivari as can
scarcely have been heard since the great day of the Confusion of
Tongues.
I, myself, had occasion to be thankful for that inconquerable
English accent which has always disfigured my French. A blond
beard and spectacles have always helped me to something of a
German look, and to-day has given the few Germans who happen to
be left in Paris such a scare as the bravest of them is not likely to
forget. At one moment I was surrounded by a wild section of the
mob, whose yells of ‘Down with Prussia!’ were far too obviously
intended to be personal to me. There was nothing for it but to join in
the shouting, and I cried ‘Vive la France!’ and ‘A bas la Prusse!’ as
lustily as any of them. There was an instantaneous laugh at the
English accent, and I was left alone; but I could not help thinking
what would have happened had I chanced to learn my French mainly
in Berlin rather than in London. One unfortunate German is
reported fatally injured by the violence of a mob at the Gare du Nord.
He had booked for London, and is said to have carried with him only
a small handbag, and to have left all the rest of his belongings at the
hotel, in his hurry to catch the train for Calais. The director of the
Opera came near to paying with his life for his artistic allegiance to
Wagner. Happily for him he was able to take refuge in the house of a
friend, and the mob contented itself by keeping up a ceaseless boo-
hooing for an hour or more.
EXTRAORDINARY SCENE IN THE PLACE DE
LA CONCORDE.
The wildest manifestation of the afternoon was in the Place de la
Concorde, where an immense mob fell to dancing about the statue of
Strasburg. Everybody knows the sullen threat with which that statue
has been placarded for so many years. It runs ‘L. D. P. (the initials
standing for “Ligue de Patriotes”) Qui Vive? La France. 1870–18—.’
When the prodigious noise created by the mob seemed at its highest,
it was cloven, as it were, by a din still greater, and a solid phalanx of
men forced a way into the already crowded square. In the centre of
this phalanx twenty or thirty men marched, bearing a long ladder,
the heads of many of them being thrust between the rungs. In the
middle of the ladder was seated a working painter in a blue blouse.
The man was literally wild with excitement, and was roaring ‘Quatre
vingt douze’ to a sort of mad, improvised tune, in which the packed
marchers about him joined with the fell stress of their lungs. In one
hand the man flourished aloft a pot of red paint, with the contents of
which he occasionally bedewed his unheeding companions, some of
whom had playfully bedaubed their own and others’ features, so that
they looked as if they had just come fresh from some scene of
massacre. In the other hand the man held aloft a sheaf of brushes,
and in an instant the vast crowd seized the motive of his presence
there, and the meaning of the rhythmic repetition of ‘Quatre vingt
douze!’
EXTRAORDINARY SCENE
IN THE PLACE DE LA
CONCORDE:

THE MOB TEARING THE


MOURNING EMBLEMS
FROM THE STATUE OF
STRASBURG.

A way was cleared for the advancing cohort as if by magic. The


ladder, still supporting the painter, was drawn up lengthwise before
the statue, and the workman knelt to his task. At first it was
impossible for him to work, for the bearers of the ladder were jigging
to the tune they sang; but by and by they were persuaded to quiet,
and a very striking and impressive silence fell upon the crowd. The
man, with great deliberation, and with a much firmer hand than he
might have been supposed to own at a time of such excitement, drew
the outline of the figures 9 and 2 in white chalk, at as great a size as
the space of the placard admitted. His movements were watched
with an actually breathless interest, and when, after the completion
of his drawing, he rose and clasped the knees of the statue in his
arms with a joyful and affectionate cry, two or three people in my
neighbourhood sobbed aloud. The man knelt down again and filled
in with red paint the outline he had drawn. One grim personage, with
a squint and a pock-marked face, who held a short, well-blacked clay
between his teeth, shouldered me at this moment, and said, ‘C’est le
sang de la France, ça.’ He thought so well of this that he moved away
among the crowd repeating it, nudging his neighbours to call
attention to the saying, and pointing a dirty forefinger at the red
paint of the figures to indicate its meaning. I was waiting for an
outburst of enthusiasm when the figures were completed, but to my
amazement the mob accepted the proclamation they conveyed with a
grave silence, as if it had been in some way authentic and official,
and as if for the first time they recognised the terrible significance of
the hour. Their quiet did not endure long, for one of their number,
having contrived to scramble on to the ladder, clambered up the
statue, and amid great cheers tore from it the ragged emblems of
mourning which have so long disfigured it.
Then came an episode, the like of which would be possible
nowhere but in Paris. The whole thing might have been arranged for
scenic effect, and the distinguished artist who made the coup had
never, brilliant as his triumphs have been, arrived on the stage at so
opportune a moment, or encountered so overwhelming a reception.
The new-comer was no other than M. Jean de Reszke, who was on
his way to dine with a friend before appearing as Faust in Gounod’s
masterpiece this evening. His coachman was slowly making way
along the crowded road when the great singer was recognised. He
was greeted with a roar of applause, and a dozen members of the
crowd threw open the closed landau he sat in, while a thousand
voices clamoured for the Marseillaise. The statue had, at that
instant, been denuded of its last rag of mourning, and M. de Reszke,
who had risen bareheaded in the carriage, was whipped out of it in a
trice, and borne, nolens volens, to the figure, and placed aloft on the
pedestal. His companion, a lady attired with much distinction, was at
first evidently alarmed, but soon gathered the peaceful intention of
the crowd, and seizing the meaning of the moment, she stripped
from her own shoulders a handsome scarlet cloak, and threw it
towards M. de Reszke. It was immediately passed on to him, and he,
with considerable difficulty, and at the risk of a tumble on the heads
of the people below him, succeeded in casting the cloak over the
shoulders of the statue. At this, all the previous noises which cleft the
air of Paris this afternoon seemed as nothing. The cheering was
simply deafening and maddening, and lasted for full three minutes.
At length perfect silence was restored, and M. de Reszke began to
sing the Marseillaise. He was pale at first, and obviously unstrung at
the spectacle of this prodigious audience, and for the first few notes
his voice was broken and ineffective. He gathered confidence,
however, before he had completed the singing of the first line, and
gave the rest of the song with an inspiring vigour and élan.
From the beginning of the whole extraordinary scene people had
been flocking in from every quarter, and I believe that I am well
within bounds when I say that the singer had an audience of a
hundred and twenty thousand. The chorus was one of the most
stupendous and moving things which can ever have been heard by
human ears. It rose from the densely-packed mass of humanity in
one amazing roll and roar of sound, and its echoes came straggling
faintly from the Rue de Rivoli and the Tuileries Gardens, from the
Avénue des Champs Elysées, from the Rue Royale, from the Pont de
la Concorde, and the embankment on the further side of the river.
When the whole song was finished it was redemanded, and was sung
through again with undiminished relish both by the soloist and the
chorus. Finally, the singer was permitted to descend from the
pedestal, and was escorted to his carriage. The crowd had taken out
the horses, and M. de Reszke and his companion were drawn away
by some hundreds of volunteers. The great singer’s nationality has
made him the idol of Paris during all the late days of strained
expectation. Every night the Opera-house has been thronged, and
every song from his lips has been received with literal thunders of
applause.
The President speaks—‘A Berlin!’
Later.

The crowd had already begun to thin when the news passed
round that the Ministers were in conclave at the Elysée. I acted
immediately on the first hint I received, and with great difficulty
made my way across the Place. I found myself almost at once wedged
in anew, this time in a streaming current which set steadily towards
the Elysée. The crowd grew vaster every moment, for by this time all
Paris seemed to have been drawn to that quarter of the town. For a
long time there was silence, or what seemed like it after the torrent of
noise which had roared so long in all ears, but at last the babble of
excited tongues began again, and was intermixed with occasional
cries of impatience. These grew in a steady crescendo, until no single
voice was audible. But before things reached that point I had heard a
hundred excited conjectures as to the course which would be adopted
by England at this crisis. By seven o’clock the patience of the mob
was quite outworn. The building, so far as could be seen from the
outside, was in complete darkness, and the rumour of the meeting of
the Ministers seemed likely to be practically denied. At length,
however, a sudden swell in the storm of sound greeted the
appearance of light at three windows, and certain ill-defined
shadows were seen moving on the blinds. One profile was distinct
and stationary for a moment, and there was a roar of ‘Ribot!’ A
minute later the blind of the centre window was drawn up, the
window itself was thrown open, and the figure of M. Ribot, Minister
of Foreign Affairs, was seen. This apparition was the signal for a new
outburst in which only the name of the President of the Republic
could be distinguished. The air rang with shouts of ‘Carnot! Carnot!’
and M. Ribot having braved this incredible tempest for a few seconds
only, bowed and retired. A minute later the President himself
appeared. From where I stood his features were invisible, but his
attitude was erect, and he stretched out his right hand with an
impressive gesture to command silence. It was some time before this
injunction was obeyed, but when he was allowed to speak his voice
was firm and unusually clear. His words were few and to the point.
‘Citizens! Germany has declared war upon the ally of France. Those
gentlemen whom you have appointed as the guardians of the
national honour have debated the serious intelligence which has to-
day awakened the heart of Paris. It is my duty to tell you that there is
no dissentient voice amongst them. France will fulfil her pledges!’ At
this point M. Carnot was interrupted by a unanimous outburst of
applause, which made speech impossible for a space of at least five
minutes. Again and again, when it seemed about to quiet down, it
was taken up from distant quarters, and came rolling along like a
wave, again to subside and again to be renewed. When order was
once more restored the President continued: ‘France speaks to-night,
and demands of her neighbour that the menace against her ally shall
be withdrawn. She couples with that a demand for the surrender of
those provinces which were torn from her twenty years ago!’
There was at this more cheering, and yet more. The President
retired, and a great deluge of rain which had been threatening to fall
all day speedily cleared the streets. The latest and most important of
the day’s events is yet hardly an hour old, but we seem now to be
living in a city of the dumb. Everybody is hoarse with four hours’
almost continuous shouting, but the popular excitement is as great as
ever.
The house of M. Ferry has been guarded by the military, and
only the entente cordiale existing between the troops and the
populace has saved it from attack. At the moment of writing the
Boulevards are again crowded. The reply of Germany is, of course, a
foregone conclusion, but it is awaited with intense eagerness.
DECLARATION OF WAR BY FRANCE.

DRAMATIC RECEPTION OF THE NEWS BY THE GERMAN


EMPEROR.

(By Telegraph from our Special Correspondent, Mr. Charles Lowe.)


Thorn, May 1.

For this morning the Emperor had ordered a review of all the
troops, amounting to about 60,000 men concentrated hereabouts—
the scene of the parade being a long sweep of meadow-land, not
unlike the Champ de Mars at Paris, on the right bank of the Vistula.
His Majesty and his Staff took their stand on a convenient knoll
commanding all the ground, and scarcely had the serried battalions
of the 3d Corps, with their bristling bayonets glittering in the bright
sun, begun to stride along in all their martial and magnificent array,
when the march past was interrupted by a most dramatic and
thrilling incident.
I was standing on the outside fringe of the brilliant circle of His
Majesty’s suite, quietly chatting to Dr. von Leuthold, the Emperor’s
body physician, when suddenly we saw an orderly officer dash up to
his Majesty and deliver a message, which we could discern from the
colour of the envelope to be a telegram. The Emperor tore it open,
glanced through the contents, then looked up, and let his eye wander
all round the circle of his suite, as if to note the impression produced
upon their minds by the news which His Majesty felt had already
been intuitively divined by those about him. ‘Ja, meine Herren,’ he at
last said; ‘it is just as we all expected. This is a telegram from General
von Caprivi; France has declared war against us’ (Frankreich hat
Uns den Krieg erklärt.) There was a moment’s pause, each man
looking at his neighbour to study the effect of this terrible
announcement, and then all eyes were again turned on the Emperor,
who looked a shade paler than before, but not a whit less calm and
resolute.
‘Gentlemen,’ he said at last, ‘this is a serious moment for us all,
but the news dismays just as little as it surprises us. Yet I must now
leave you, for the danger to the Fatherland is much greater on its
western than on its eastern frontier; and where the danger to the
Fatherland is greatest, there also must Germany’s Kaiser be.
‘Meine Herren, my place as Commander-in-Chief of our armies
here will now be taken by that tried and gallant soldier, my dear
friend and brother, the King of Saxony, who will, I am sure, bring
honour and victory to our arms. One foe at a time is quite enough,
and the sooner we can help our allies to dispose of their invader, the
sooner shall we be able to concentrate all our forces and inflict a
crushing blow on our hereditary enemy (Erbfeind), who has again, in
the most wanton manner, broken loose against us.
‘Gentlemen, this is no time for words, when the call to action is
tingling through all our veins, so I will only invoke the blessing of
God upon the course of our arms in this quarter, and hasten myself
to where the peril of our Fatherland is sorest. Adieu, and may each
and all of us do his duty throughout the coming period of grievous
trial and tribulation!’
So saying, the Emperor put spurs to his steed and, accompanied
only by his immediate suite, galloped off back to Thorn, receiving as
he went three enthusiastic ‘hochs.’
Just as I am closing this despatch information reaches us from
Berlin of a naval engagement in the Baltic between our fleet and
some Russian ships; but you, in London, will probably hear all the
details before they reach us here.
With the German Fleet in the Baltic.
We have been favoured with the following letter, under date
April 30, from Rear-Admiral Philip Colomb, who has been an eye-
witness of the naval operations in the Baltic:—
I was at Kiel with my yacht when the news of the attempt on
Prince Ferdinand’s life reached us. The successive telegrams and
published news created the greatest excitement among all classes,
but especially amongst those connected with the navy.
Simultaneously with the news that Russia had crossed the Austrian
frontier, several German cruisers went to sea, and in a day or two a
regular fleet began to assemble in the port. I don’t understand
German, but my wife does, and she told me whenever we met an
eager crowd discussing, that it was all about whether the fleet would
not be kept to defend the place, and the danger of an attack by the
Russian Fleet if the German Fleet did not remain.
I thought I had better get out of it, as if such an attack were
made it might be awkward for me. I think my wife was so excited
about it that she wanted to stay where we were and see it all; but I
thought we might see all there was to be seen in greater safety from
the seaside. And then from the conversation of some German naval
officers which my wife overheard, I gathered that the navy, at least,
believe that it would try to carry war into the enemy’s country. There
were, however, great discussions about some German coast defence
vessels that had not coal supply enough to go up the Baltic, and great
arguments as to what ships would go and what would stay. As every
day more heavy ships arrived and stayed, while only small ones came
and went, I began to think that after all it was most likely that the
Germans would not stay quiet to let the Russians ravage their coasts.
Then, by the time that nine or ten large turret-ships and others,
besides several smaller ones, had assembled, I understood that the
German armies were about attacking Russia by way of Königsberg,
as well as to the south. I thereupon made sure that the German fleet
would go up in support, even if they were not ready to do more.
So the end of it was that I waited till ten big ships and five or six
smaller ones got under way, and then I did ditto, and steamed out
with them. I was afraid I might be left behind, as my coal supply did
not allow me to go at any speed; but I found the Germans, after
putting their big ships into two lines a good distance apart, with
some of the smaller ones close at hand on each side, and two or three
others a long way in front, steamed quite slowly along, not more than
five or six knots. I went inshore of them, and kept them in sight a
couple of miles off.
We passed close to Rügen Island the afternoon succeeding our
departure, and the south end of Bornholm in the night. I made out
that we were steering straight, for Libau, which is about 450 miles
from Kiel. We scarcely had seen anything in the shape of a ship
except a couple of homeward-bound English trading steamers; but
on the second morning at daybreak I noticed all the German ships
had been stoking up, and were making an immense amount of
smoke. There was a good deal of signalling going on between the
German flagships—there were two of these yesterday, one at the head
of each line—and one or two of the cruisers, which sped away nearly
out of sight, and then came slowly back, signalling as they came. The
same sort of thing went on on the third morning, when we had got
beyond Dantzig, with the difference that two German cruisers were
seen steaming up, one from the southward, and one from the south-
westward. The fleet stopped, and a boat from each of these went to
the flagship and returned, after which there was more signalling, and
a boat from every ship went on board the flagship. I suppose the
other Admiral and the captains were in them, but I was too far off to
make certain.
After a couple of hours we all went on again slowly as before, but
electric and other lights were flashing about all night, so that we were
very excited, and made sure that something was in the wind. As a
consequence, long before daylight on the fourth morning we were on
deck looking out in all directions, and with a good head of steam so
as to get out of the way in case of accidents. Sure enough at daybreak
there was a great bank of smoke to the northward, and presently I
could make out a mast or two sticking up. The two German cruisers,
which were five or six miles in front, at once became very busy with
their signals, and soon afterwards the whole fleet formed into a
single line and turned to the westward, not steaming any faster, but
making such clouds of black smoke that they almost hid themselves
from me. It did not seem that the Russian Fleet—I was not sure
whether it was or not—was closing much, but one or two ships
appeared to draw more in front as if to close the two German
cruisers. Presently the other cruisers that had kept closer to the fleet
also drew out in front, but none of them seemed more inclined to
close the strangers than the strangers were to close them.
I could not make it out at all. I had always understood that in a
modern naval battle, everybody would immediately run at everybody
else, and this looked so little like the sort of thing that I was inclined
to think that what I saw was only an advance guard of the Russian
Fleet. Yet it looked too large a mass for that, and my doubts were
presently set at rest.
Signals were made to one of the German cruisers that had come
to us the day before, and she presently turned and slowly steamed to
the southward. She passed us so very close that I took heart of grace
to call out—
‘Is that the Russian Fleet?’
And the answer came back—
‘Oh! ye-es, zat is ze Russians—ve sall fight zem! So!’ and the
steamer went on her way.
I began to have some sort of an idea that, perhaps, neither fleet
was able to make out the force of the other, and was, therefore, not in
a hurry to bring it to action. And this might easily be so. Though the
sky was clear overhead and the water quite smooth, it was misty
round the horizon, and so far as the Russian Fleet was concerned, it
seemed to me very likely that even the advanced German cruisers
were not able to discover more than I could, between the mist and
the smoke.
But as I puzzled myself over this, I also thought that, perhaps, as
the main attack of Germany was going on by land, it might be her
game merely to watch the Russian Fleet. For if the Germans were
badly beaten at sea, Russia might be left free to land and cut their
communications. I had never thought of this kind of thing before,
and I quite woke up with a new sort of idea, for I saw quite well that
the Russian Fleet could not do anything unless they first thoroughly
beat the Germans.
Engagement off Dantzig—Sinking of a
Russian Torpedo-Boat.
I was so keen on my new ideas that I wanted to know more
about it, and so steamed well to the N.E. to see what the Russian
Fleet was like. Just as I did so, I saw a very small Russian steaming
away to the south-eastward as if to get the look at the German Fleet
which I was going to get at the Russian. She was stoking up
tremendously, and evidently going at great speed. Two of the
German cruisers in front immediately turned to the eastward to cut
her off, but the plucky little Russian did not seem to mind; they
closed one another very rapidly, and some puffs of smoke, followed
by distant bangs, showed a little game of long balls. The Russian had
evidently much greater speed than the others, and was drawing them
astern, but quite away from her own fleet or supports of any kind. All
of a sudden I saw she was blowing off steam furiously, and that her
speed had slackened, if not dropped altogether. She began to fire
more rapidly, and so did the Germans. All three were hidden by the
cloud of smoke they raised. My engineer was frightfully excited; he
said, ‘It was one of them new boilers a-priming,’ and that it was all
up with the Russian. Sure enough it was, for all three ships presently
came out of the smoke, the little Russian with the German flag flying
over her own.
THE NAVAL BATTLE OFF DANTZIG—
THE SINKING OF A RUSSIAN
TORPEDO BOAT AND RESCUE OF THE
CREW BY AN ENGLISH YACHT.

I had got far enough now to see that the Russian Fleet was much
more numerous than the German, but I could only make out six or
seven really big ships. But there were a crowd of small ones, and
behind, eight or nine little things like those we had seen taking the
Excellent’s men for training. I thought it might be dangerous to get
mixed up with such a crowd, so I returned to the southward and
eastward of the German Fleet. I had noticed that the Russians were
steering slowly parallel to the position of the Germans, and night
closed, leaving all things in this position. Both sides never left off
flashing their electric lights up into the sky and all over the sea, and it
really seemed to me as if they must all be a good deal confused by
such things.
So matters went on till eleven o’clock, when I made my wife go
below, while I lay down for a sleep on deck. I was awoke at one
o’clock by such a row as never was, the whole German Fleet was a
blaze and a roar of artillery. I supposed, of course, a Russian
torpedo-boat attack, but it was impossible to tell what had happened,
—all one knew was that an attack of some kind had been made. After
a very few minutes the fire began to slacken, and some of it I noticed,
with an unpleasant sensation, was coming my way. But that, too,
soon came to an end. My wife was at that moment beside me again,
and she suddenly cried out, ‘Hark! what’s that?’ I could hear a
rushing and a panting sound drawing close to us, and then the ball of
white foam that I had seen one night from a torpedo boat. The
panting suddenly stopped, and the rushing became fainter and
fainter until out of the dark came a torpedo-boat evidently making
for the yacht, but very slowly. Just as she was coming alongside there
was a sort of wild cry, and I saw she had suddenly gone to the
bottom. Our little boat was down in an instant, and I got hold of
somebody floating at once, while the men helped in two Russian
sailors. I found I had hold of a Russian officer, but he was evidently
unable to help himself. I could not get him in but we drew him
alongside and the men carried him up. I then saw that the poor chap
was badly wounded in the shoulder. No one on board could speak
Russian, but we laid him down on the deck, and my wife threw
herself down beside him with her scissors and began to cut away his
dress, while she cried to her maid to bring her water and linen. It was
of no use, however. The poor fellow was quite unconscious and
bleeding to death. It was all over in ten minutes, and we could do
nothing but reverently commit the body to the deep. Our other two
Russians were unwounded, but could not make us understand
anything. We put them next day into an English vessel bound to
Revel.

THE NAVAL BATTLE OFF DANTZIG—


WOUNDED RUSSIANS ON BOARD
THE ENGLISH YACHT.
We were eager enough in the morning to see what had
happened, but there seemed to be no ships absent. One of the
battleships was, however, evidently very much down by the head,
and in the course of the morning we saw her quit the fleet for the
southward. Everything else was, in fact, in the same position on both
sides, and it was evident that a regular battle was no nearer.
I presently saw a vessel—I think it must have been one of the
German Emperor’s yachts, from the look of her—coming up fast from
the southward, and as soon as she got near enough, she began
making a long signal. Almost directly, the German ships all turned
towards her. They stopped when she reached them, and after she had
sent a boat to the flagship, the whole fleet put on good speed, and
stood nearly due west, as if for Kiel again. I could not keep up with
them, so I am going to Colberg to post this and hear the news.
P.S.—I have learnt at Colberg that the Emperor’s yacht brought
news of the declaration of war by France, and orders for the whole
German fleet to return to the Jahde at full speed, to avoid being
caught between the Russian and French fleets. The Germans say they
sank several of the Russian torpedo-boats, and that they had their
broadside nets out. Only the Oldenburg was struck by a torpedo, the
one I saw. She got into Kiel all right, but was badly damaged. It is
said that the Russians are spread along the whole German Baltic
coast, and descents are expected.
THE GERMAN PLAN OF CAMPAIGN.

PROPOSED LINE OF INVASION THROUGH BELGIUM.

London, May 3.

The declaration of war by France was the inevitable result of the


action of Germany in regard to Russia. Events, indeed, have marched
with a ruthless and tragical directness ever since the day, barely four
weeks since, when Prince Ferdinand narrowly escaped death from
Russian intrigue. In Germany, least of all, can there have been any
doubt as to the course France would take. The experience of 1870
must have made abundantly clear to her what would be the outcome
of the scenes on the Paris boulevards which our Correspondent has
so graphically described. With powerful enemies on either flank,
Germany cannot afford to adhere to punctilio. With the double
contest on her hands she cannot now hope to bring into the battle-
fields superior numbers, as in the wars of 1866 and 1870–71;
prospects of success, as her chiefs well know, lie for her in
promptitude of action, in blows struck in unexpected places, in
carefully planned efforts to bewilder and divide the forces opposed to
her.
To strike anywhere at the eastern frontier of the French
adversary, barred as it is with almost continuous fortresses from
Verdun to Belfort, must necessarily involve prolonged delay, even if
the heavy siege-work which is inevitable should be ultimately
successful. True, Germany will no doubt be able to foil any offensive
on the part of France from the base of the fortified eastern frontier,
but merely to do this would be to confine herself to that defensive
which is intensely repugnant to her military character. Yet her only
opening for the offensive, unless she were to force or obtain by
diplomacy a right of way for her armies through neutral territory, of
necessity must be by that eastern frontier of France which is
coterminous with her own territory, and through or over the chain of
fortresses which loom out sullenly from behind that frontier line.
The ideal line of invasion of France by Germany obviously lies
through Belgium. It would turn and negative the chain of French
fortresses on the eastern frontier, and give the shortest route through
hostile territory to the French capital. Belgium is neutral ground; her
neutrality guaranteed by the Great Powers; but how vain a pretence
is this guarantee is already proved by the latest news from our Berlin
Correspondent. It is believed (he states on credible authority), that
Germany has been successful in exacting or obtaining from Belgium
a secret Convention, whereby the armies of the Empire shall be free
to traverse the former State, and to utilise for their purposes the
Belgian railway system. The advantages of this arrangement may be
said to fairly compensate Germany for the numerical superiority of
the French forces over those which she herself is able to bring into
the field.
The German plan of campaign, as explained by our Berlin
Correspondent, is as follows:—Seven of the twenty Army Corps are
engaged on the Russian frontier under the King of Saxony. To cope
with France there remain thirteen corps, with a proportionate
number of independent cavalry brigades. The First Army, under the
command of Prince Albrecht of Prussia, is to advance through
Belgium by Verviers, Liége, Namur, and Charleroi, and cross the
northern frontier of France between Maubeuge and Rocroy, at and
about Hirson. The fortresses on the French northern frontier east of
Maubeuge are of little account, and there are none on the section
specified. The Ardennes and Eifel districts are regarded as affording
considerable protection to the line of communication as far as the
frontier, and a further protection will presently be mentioned. It is
unfortunate that between Aix and Liége there is available but one
line of railway, but the accommodation is copious on either side of
this section, several lines being serviceable right to the frontier.
This First Army is to consist of six Army Corps, the Guards, 7th,
8th, 10th, 11th, and 16th being those whose respective provinces are
nearest to the region of concentration west of Cologne. Among its
Corps-commanders are such men as Generals Meerscheidt-
Hullessem, Von der Burg, Von Versen, Albedyll, Von Loë, all
distinguished names in the war of 1870–71. The Emperor himself,

Вам также может понравиться