In front of you are the components of the game bundle. Besides the quick start
guide, you have the LCD Display Shield and the Joypad Shield is in front of you.
The two boards were specially developed and geared to perfec tly fit the Arduino
Uno. They make it possible that you are able to try out the examples presented or
develop your own games. Let us take a closer look at the two shields. There is a
lot to discover.
1.1 | The Display Shield
The display shield
The Display Shield is a board which in combination with two hardware buttons
renders the LCD display 12864 LCD ST7565 Arduino-compatible. The display has
a resolution of 128 x 64 pixels and is controlled via the SPI (Serial Peripheral Interface). Let’s go to the technical details:
Display Shield Arduino Uno compatible shield
Display DXDCG12864-4330
Display controller ST7565
Resolution 128 x 64 pixels
Operating voltage 3.3 V
Periphery 2 Onboard button (at A4 and A5)
Display size 38 x 20 mm
Other shorter design – 14 free I/O ports on Arduino
However, there is no need to learn much about the details of the display control,
thanks to a library that does most of the work for you and lets you focus on programming the games. If you are interested in more detailed information about the
control of the display and its characteristics, I would recommend to you the study
pack “Programming the Franzis Maker Kit Graphic Display".
1.2 | The Joypad Shield
Joypad Shield
The Joypad Shield was specially developed for this project. It allows you to play
games conveniently and intuitively. The shield has six buttons. Four of them form
a directional pad so that directions can be given intuitively. Functions can be assigned to the other two buttons individually depending on the game. Thus, you
have got a total of eight buttons available that allow you to create plenty of games
and functions.
Beside the buttons, there is also a small Piezo transducer built-in on the board,
which serves as a loudspeaker. Apart from transmitting information via the display,
you are also able to provide acoustic feedback. ). Let’s go to the technical details:
As previously mentioned, the two shields fit an Arduino Uno perfectly. However,
you should make sure that the Display Shield lines up exactly with the top slots of
the Arduino Uno.
The Joypad Shield thus fits exactly onto the lower connector strips, as seen in the
picture. This constellation offers you optimum handling conditions and you can
also pick up the Arduino together with the shield and operate it while holding it in
your hand.
1.4 | The Documentation
This quick start guide gives you introductory information and simple examples for
a successful entry into game programming. The main portion of information can be
found in the game programming handbook, which is available online. You can
download the full PDF from: http://www.buch.cd. The associated code is
Besides the handbook, you will also find there the library required and the examples used.
1.5 | The Community
Additional information as an extension to the project are found also on this website:
http://tiny.systems/spielekonsole
Here you get access to future updates for the library or programs, and also to
some other projects and information in regards to the two authors. Also important
on-line tools are offered here, which you will need when you work on your own and
also for the example projects.
1.6 | The Integrated Development Environment (IDE)
In any event, you will need an integrated development environment (abbreviated:
IDE) that is easy to use and of course some tools to develop something in the first
place. The IDE used here is the well-known and often used Arduino IDE. The
latest version for your operating system is available on the webpage:
www.Arduino.cc/Downloads
We are working with version 1.6.7 with regards to our projects; however, the in-
structions contained in this book should also work with newer versions. After you
10223-0
.
have downloaded and installed the environment, choose the right board and the
correct port under
game console.
In addition to Arduino, a few other tools are used, including sof tware to create and
edit graphics. This book uses Windows Paint and the open source editor Gimp.
Finally, an online tool on tiny.systems lets you convert th ese graphics into a compatible format - but more on that later.
For the time being, it is important to download the library and the examples from
the webpage http://www.buch.cd. The associated code is
10223-0
and to install them. To install the library, simply include the zip file via the Library
Manager. To do this, click on
select the library zip file you just downloaded. By now you should see a success
message at the bottom.
Settings
and you can start programming your Arduino or your
Sketch -> Include Li brary -> Add .Zip Library
and
1.7 | Hardware Test
IDE and the sample programs are now installed - time to load the first program in
Arduino. To do this, go to
the first program and click on the upload button. Soon after that, you will see a
success message below in the debug window. The display should look pretty
much like the one shown below. If this is not the case, play a little with the two
buttons located just below the display. In doing so, you are adjusti ng the contrast
of the display, and most probably you are fixing the reason why you are unable to
see anything. However, if you cannot detect anything on the display, check the
positions of the two shields on the Arduino.
Now adjust the contrast value that suits you and take note of this value. In the next
projects you will need to enter the value into the program, so that y ou can always
easily read the display.
File -> Examples -> GameEngine -> Starter
to open
In this program example, you can also test the various features of the shields. For
example, if you press a Joypad button, it will be highlighted on the display. You
can also test the sound. You should test the full functionality of all components
before you kick off for real.
BALL – GETTING
STARTED WITH GAME
PROGRAMMING
Now that everything is set up and tested - it is time to deal with the development of
the actual game. To do this, go to
open the programming example Ball.
This first, simple programming example is about drawing and moving a simple
object, that is, a ball. Adjust first the contrast in program line 9. This line c ontains
the
engine.init(20)
brackets with your individual contrast value. This is also required within the following projects. Then load the program in Arduino. If the upload is successful, you will
see a simple object in the centre of the display. But how was this implemented in
terms of programming?
command within the setup routine. Replace the number 20 in
File -> Examples -> GameEngine -> Ball
to
Loading...
+ 10 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.