Thank you for visiting Blazing Games

Texture mapping

So what exactly does grabbing pixels from an image have to do with downloading five megabytes of data? Well, let us assume that because the image wasn't loaded, every time pixel grabber was called it ended up reloading the whole image that it was grabbing clips from. Now, the texture bitmap is a very large file. It is 1024 by 256 and the file size is roughly 80k. If that image was loaded 64 times, you would end up loading 80x64k, which happens to be 5120k. That sounds like our five megabyte culprit, doesn't it!

Some of you are probably wondering, why are you grabbing 64 pieces of an image anyway? Coffee Quest 3 uses a technique that is known as texture mapping. Simply put, this takes a small image and distorts the image to fit the shape of the polygon that the image is being mapped on to. This technique allows for really good looking graphics without having to draw thousands of polygons.

Instead of having to deal with 64 small files, I combined all the texture files into a single larger image. The pixel grabber would then be used to get the pixel information from those images. Note that for texture mapping, I need the pixel data, not the actual images, so the use of the pixel grabbing class is required no matter what route I would have taken.

Previous Page
Coffee Quest 3 Problem page 3 of 5

About - Privacy Policy - Contact - Links - FAQ
Copyright © 2003-2006 Blazing Games Inc. All Rights Reserved