O'Reilly logo

Android NDK Game Development Cookbook by Viktor Latypov, Sergey Kosarevsky

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Image gallery with Picasa downloader

In this recipe, we will integrate our Picasa images downloader with a carousel-based 3D gallery, and use it as a picture selection page in our game.

How to do it…

  1. To download the images and track the state of the downloader, we use the sImageDescriptor structure describing the state of any game image:
    class sImageDescriptor: public iObject
    {
    public:
      size_t FID;
      std::string FURL; 

    Now comes the image size code. We support a single image type only: small 256 pixel-wide previews. Multi-stage previews can be implemented when the game first loads very small images over the network, let's say not larger than 128 pixels. Then larger 256 pixel previews replace them to give crisp previews on Full HD screens. And after the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required