The built in Image object in Java is very nice.  One thing you might not know already is that Java already support animated-gif.  There are times however, when things might not seem to work correctly.  For example: The gif only displays the first frame and never animates The gif only animates when the application/applet repaints. […]

BACKGROUND The Image object in Java is very nice.  It handles many details for you and it is sufficient for most programming tasks; however, there are times when you might want to be able to access the pixel data within an Image object.  For example: To change the transparent color key To swap a color […]

ASCII stands for American Standard Code for Information Exchange.  The purpose of ASCII is to create a standard for character-sets used in electronic equipments.  The standard ensures that different devices (which might be manufactured by differing companies) can communicate to each other with the same character-code.  With this kind of standardization, programmers and computer manufactures […]

This tutorial explains how a Flash 4 movie can retrieve data from an external CGI program.  To understand this tutorial, it’s recommended that you are already familiar with: how to access variables in Flash 4 Flash 4 Action Scripting how to program in Perl or C how to run and create CGI (Common Gateway Interface) […]

Usage: <body background=”imageFileName”> For example: <body text=“#000000” bgcolor=“#CCCCCC” link=“#FF0000” vlink=“#FF0000”alink=“#FF0000” background=“bgrImage.jpg”> Where image can be a GIF or a JPG image.  Newer browsers also supports PNG images. Using tiled-background-image was a popular rage not so long ago, when the web was new. Arguably, it makes the web more interesting… but often, it could also make […]

<<PREVIOUS | TABLE OF CONTENTS BIBLIOGRAPHY Abrash, Michael. Zen of Graphics Programming. Scotsdale, AZ: The Coriolis Group, 1995. Anderson, Greg, et al. More Tricks of the Game Programming Gurus. Indianapolis, Sams Publishing, 1995. Finegan, James. “Implementing Games for Windows.” Dr. Dobbs Sourcebook 239 (1995): 42-47. Foley, James D.,et al. Computer Graphics: Principles and Practice. 2nd ed. […]

<<PREVIOUS | TABLE OF CONTENTS | CONTINUE >> SHADING When an object is farther away from the viewer, the object should appear less/more bright. To accomplish this, a shading effect is needed. But first, we need to know about how colors are represented. The standard 256 color VGA mode registers contains three numbers between 0 to […]

<<PREVIOUS | TABLE OF CONTENTS | CONTINUE >> C. Combined effects. The effects explained above can be combined to create even more interesting motions such as illustrated below. A castle viewed from the sky  <<PREVIOUS | TABLE OF CONTENTS | CONTINUE >>

<<PREVIOUS | TABLE OF CONTENTS | CONTINUE >> B. Flying and crouching. Recall that the player’s height is set to be 32 units. This means that the player’s eyes (imagine the player’s eyes are exactly on top of the player’s head) are looking straight at the walls at point 32. Since 32 is one half of […]