BEWorld is a 2D top-scroller game written using the Brick Engine. It is similar to a real-time Nethack, but is more limited. It features both random and invariant maps, a map generator that should work in other games, support for compressed inline data (including music and sound effects), and more. It is intended to be a starting point for coders who are interested in developing similar games.
The class ScanDir provides a method to retrieve the list of all files and/or subdirectories from the specified path. The scan can: scan files and/or just the subdirectories; get only the filename or the full path+filename; give information on each file (size, dates, permissions, extension, and basename, or only filename and size); and filter the files list on some extensions files only. During a scan, all the unique extensions can be listed in an array. You can calculate the total size of files in the scan, and get a count of the number of files and directories. The class was developed because other similar classes seemed to be too complex for the author's requirements. Before running the scan, the class must be set up to enable/disable options. After the scan completes, you have an associative array with all the files and their information. This class can be use on the command line or in PHP Web pages.