Thank you for visiting Blazing Games

Walls

The first step that is actually used to render the current location in Coffee Quest is to start out with a backdrop. There are two different backdrop images that are used in the game. Both images are of the same basic floor and ceiling, but the images are slightly different so that when the player moves there is a noticeable difference between the two locations. This is a feedback mechanism that helps give the player a sense of movement.

Walls are blocks of texture that are drawn on the screen. The wall images are loaded (again, two different images are used so that there is a sense of motion as the player steps from location to location). What should be done is the walls should be represented as textured polygons and rendered. In fact, the OpenGL version of the game, if I ever write it, will be done using this technique. Java, unfortunately, does not support 3D hardware within applets (there are a number of OpenGL libraries for Java, but they all make use of native calls so can not be used in applets) which would mean that to use the polygon rendering technique would require that I wrote a set of routines for rendering textured polygons. General purpose textured polygon rendering would be nice, but for this specific game, that was going a bit overboard. Instead, I decided to take advantage of the fact that the rendering of the walls was fairly uniform. Walls that are facing the player are simply scaled versions of the texture image.

The sides, on the other hand, can be thought of as simple distorted blocks. Based on which side you are looking at, the wall either starts small and grows or starts big and shrinks. To handle this, we simply break the texture into strips. Each column of a side wall is a single texture strip that gets drawn to the appropriate size.

Previous page
Chapter 3 Page 4

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