Add/Remove Directories

June 4th, 2008

I just wanted to share with you 2 small, yet very useful, functions that you could use in PHP: dir_create and dir_remove. The name of the function gives away the purpose of what they will do. From time to time, I will get stuck with “Why is PHP not creating the directory?” or “Why isn’t PHP removing the directory completely?”, and that is where these two functions come into play to help you with those pesky little simple questions. Here are the functions:

Read the rest of this entry »

PHP > Website

Star Field Optimized

June 1st, 2008

This sort of method is very useful for creating a star field. With a lot of stars. I thought of this method when reading through the book “Macromedia Flash Professional 8 Game Development” by Glen Rhodes. In his book he provides an example of creating a star field with a effect called “parallax”. A parallax effect is created by multiple objects moving at different speeds. For example, a small ball in the distance would move very slowing and a large ball would move more quickly. Both the balls are on the same level/depth, but the appearance of the different sizes and speeds give it the effect. Parallax effect is highly used to create a 3D environment.

Read the rest of this entry »

AS2 > Flash