Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning LibGDX Game Development- Second Edition

You're reading from   Learning LibGDX Game Development- Second Edition Wield the power of the LibGDX framework to create a cross-platform game

Arrow left icon
Product type Paperback
Published in Jan 2015
Publisher Packt
ISBN-13 9781783554775
Length 478 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Suryakumar B Nair Suryakumar B Nair
Author Profile Icon Suryakumar B Nair
Suryakumar B Nair
Andreas Oehlke Andreas Oehlke
Author Profile Icon Andreas Oehlke
Andreas Oehlke
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Introduction to LibGDX and Project Setup FREE CHAPTER 2. Cross-platform Development – Build Once, Deploy Anywhere 3. Configuring the Game 4. Gathering Resources 5. Making a Scene 6. Adding the Actors 7. Menus and Options 8. Special Effects 9. Screen Transitions 10. Managing the Music and Sound Effects 11. Advanced Programming Techniques 12. Animations 13. Basic 3D Programming 14. Bullet Physics Index

Game project – Canyon Bunny

To make this guide both easy and fun to read, it makes perfect sense to show you how to plan and develop a whole game project throughout this book. As we now know, planning should be the first step to take on the journey of any new game project.

So, let's begin with the outline:

  • The name or working title for the game will be Canyon Bunny
  • The genre will be 2D side-scrolling jump and run
  • The list of actors are as follows:
    • The player character (can jump and move forward and will be controlled by the player)
    • Rocks will be serving as platforms for the player character and items
    • Canyons in the background (for level decoration)
    • Clouds in the sky (for level decoration)
    • Water at the bottom of the level (which will be deadly for the player character)
    • Collectible items (such as gold coins and feather power-up) for the player

Next, it is always helpful to write down some supporting text to further describe the overall behavior of the game, and how the features should be implemented.

Description of the game

The game world is presented in a 2D-side view to the player. The view will scroll horizontally to the right-hand side when the player character moves forward. The background shows distant canyons and clouds in the sky. The bottom of the level is filled with water and will instantly kill the player character if both get in touch with each other.

The player character will move on and jump over to random rocks, sticking out of the water. The width and height will be different to make the game more challenging. The player is only in control of a jump button, which will keep the automatically forward-moving player character from falling down into the deadly water.

The level will be randomly populated with collectible items consisting of gold coins and feather power-ups. Collecting the gold coins will increase the player's high score. The feather power-up grants the player character the ability to fly for a limited time and can be used by repeatedly pressing the jump button. The player's goal is to beat the last high score.

As a picture is worth a thousand words, creating a sketch based on our outline can help us even more to get a better idea of the resulting game. Moreover, changing a sketch is usually a lot easier than having to change (complex) game code. So, you really want to keep it very simple; just grab your pen and paper and start to draw. If you feel lucky or have some time to spend, you can do something more elaborate, of course.

Here is a mock-up for Canyon Bunny:

Description of the game

The previous mock-up has been created entirely by using vector graphics. Using vector graphics in favor of raster graphics for your sketches can be an advantage as they are infinitely scalable to any size without losing the image quality. However, the final graphics used in games are almost, always, rasterized graphics, simply because vector graphics are costly to render in real time. So, the common approach is to create vector graphics and later on export them choosing an appropriate rasterized graphics file format, such as Portable Network Graphics (PNG) for lossless compression with alpha channel support, or Joint Photographic Experts Group (JPEG) for lossy but high compression without alpha channel support.

For more details, check out the following Wikipedia articles:

There is a free and open source tool called Inkscape similar to Adobe Illustrator. It allows you to easily create your own drawings as vector graphics and is available for Windows, Linux, and Mac OS X. Check out the project's website http://inkscape.org/.

You have been reading a chapter from
Learning LibGDX Game Development- Second Edition
Published in: Jan 2015
Publisher: Packt
ISBN-13: 9781783554775
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime