OpenGL First Person Shooter - A Time to Kill

A Time to Kill screenshotI had a final project for a 3D programmnig class to enhance the game “A Time to Kill” (included with the text Beginning OpenGL Programming). My project was to rewrite the game so that it compiled and ran independent of Microsoft DirectX, as well as code some in-game enhancements to demonstrate my knowledge of OpenGL programming.

The game “A Time to Kill” is a simple OpenGL first-person shooter where you run around and kill enemies. The enemies don’t fire back and run away when approached. The object of the game is to kill all the enemies before the time runs out. You are able to fire flame rockets and heavy missiles. Flame rockets fly faster and straighter, but heavy missiles have a larger impact area. The arrow keys move you around. The mouse will allow you to look around and aim, and the mouse buttons will fire your weapons.

DirectX provided all the sound and inputs controls for the game using its DirectSound and DirectInput modules, respectively. I replaced these as follows:

  • For game input I used Windows’ built-in mouse and keyboard functionality. I rewrote much of the keyboard and mouse code in the parent window class file. It should be noted that I don’t think the controls are as robust as with DirectX, but this might have been different if I had tried using SDL’s input library.
  • For sound I used SDL’s sound library called SDL MIXER. It provides a multi-channel sound engine I used to replicate all of the DirectSound functionality in the game. I added new sounds for weapon launching and explosions. In addition to sound effects, I added a looping “arcade-style” music file for some videogame ambiance. I wrote a new class AudioSystem from scratch to provide all the SDL MIXER functionality the game needed, including an interface for in game objects to play their own sounds.

Languages: C++

Coding tools: Dev-C++

Executable and source files: ATimetoKill-final_project.zip 1.5 MB

Required supporting installs:
gcc compiler
OpenGL
SDL
SDL Mixer

Project overview letter: ATimetoKill_README.doc

NOTE: This game is very rough and simplistic, but it was designed to demonstrate the fundamentals of OpenGL programming and DirectX and SDL software architectures.

Java Instant Messaging Client

AxeIM Java Instant MessengerI coded a Java instant messaging client called AxeIM for a networking class. This program will attempt to find a user’s “buddies” and establish a network connection to them for the purpose of sending instant messages. This program is crude and simplistic, but demonstrated the fundamental concepts of network and socket programming. Obvious enhancements would be easier administration of user settings and buddy-list maintenance (rather than storing buddy IP addresses in a configuration file).

Languages: Java

Coding tools: Notepad

Application and source files: AxeIM.zip 320 kB

Required supporting installs:
Java SDK

Programmer Guide: AxeIMProgrammerGuide.doc 31 kB

User Guide: AxeIMUserGuide.doc 32 kB

ASP eCommerce - Advanced Battery Services

Advanced Battery Services v1This was the first production website I designed for the company Advanced Battery Services. They needed a fresh new look that would attract customers looking for a professional service provider. It was also important that their product lines and vendor partnerships be clearly displayed. All products and services were fully searchable and could be administrated from an individual Access DB that provided the back-end.

Languages: ASP, Visual Basic, VBScript

Coding tools: Notepad, MS Access

J2ME MIDP - Weather Forecast Midlet

WeatherMIDletThis J2ME project is called WeatherMIDlet, and allows a user to get the current weather conditions from their cellphone for any zip code in the US. The user presets a list of desired zip code locations and their cellphone will display organized weather data for those locations.

I used Java’s small device application programming platform called J2ME (ME standing for Micro Edition). The J2ME framework is specially made to be lightweight and platform neutral for cellphone and small device development. These mobile apps are called midlets (as opposed to applets, servlets, and portlets), where MID comes from MIDP (Mobile Information Device Profile) which is the Java runtime environment for small devices.

WeatherMIDlet uses many standard objects and APIs. To navigate menus I used a CommandListener object. I used a ticker object for generating a scrolling banner that displays current temperatures for all stored zip codes. All the weather data is stored in a RecordStore object, and the weather server is re-queried periodically in order to keep the RecordStore current. I used a bean object to parse the string of raw uncategorized weather data from the weather service into its constituent parts. These are then stored by the main midlet which will output concatenated strings such as, “High of 67 today with a low of 49. Currently the skies are cloudy.” The internet weather web service I chose to use was wunderground.com.

Languages: Java, XML

Coding tools: Java Wireless Toolkit, Notepad, JCreator

Source files: WeatherMIDlet.zip 190 kB

Required supporting installs:
Java Wireless Toolkit

Final project report: WeatherMIDlet.doc 240 kB

Additional screenshots:
WeatherMIDlet screen2WeatherMIDlet screen3WeatherMIDlet screen4WeatherMIDlet screen5

J2EE eCommerce Web App

ABS home screenBefore I designed a production website for Advanced Battery Services I did a J2EE (Java 2 Enterprise Edition) prototype of their site. J2EE is an enterprise framework from Sun as the key business element of their Java language technology.

This prototype is an e-commerce web store application with a working shopping cart that uses an MVC (model-view-controller) methodology. The front-end is coded in Java Server Pages (JSP) and runs in the TomCat web container. The back-end database is MySQL for all transactions and storage.

Future enhancements would have been user management features and more robust administration screens.

Languages: Java, JSP, XML

Coding tools: Notepad

Source files: abs.zip 513 kB

Required supporting installs:
MySQL (server & JDBC connector)
Apache TomCat Server
Java SDK (with servlet and JSP support)

Final project report: ABS Final Report.doc 2.1 MB

Additional screenshots:
ABS admin screenABS search screenABS shopping cart

RDBMS Programming - Kitchen Planner

Kitchen Planner DB applicationThis RDBMS project is called Kitchen Planner, and was designed to demonstrate database theory knowledge as well as practical application of database programming concepts. I did this in Access because it was the easiest way to encapsulate code and a DB table structure into a readily observable format for educational purposes.

Kitchen Planner allows someone to organize recipes, plan meals, and automate shopping lists. Based on who’s scheduled to be at a meal (and any dietary needs or culinary eccentricities these people have) appropariate stored recipes are chosen. Once recipes are selected, an automatic shopping list is generated from the required ingredients.

If I were coding this application for an actual commercial product there’d be several obvious features to streamline the workflow. But, this may be useful as it is to someone. I used Access from Microsoft Office Professional to create the database application file… and I made the source file available in the mdb file format.

Languages: Visual Basic

Coding tools: MS Access

Application file: Kitchen Planner.mdb 1.52 MB

Application database schema SQL: Final Project SQL file

Required supporting installs:
Microsoft Access

Final project report: KP-FinalProject.doc

Additional screenshots:
Kitchen Planner - RecipesKitchen Planner - RestaurantsKitchen Planner - Meals

NetCentral User Keycode Crack

NetCentral.com logoNetCentral was a popular web chatroom circa late nineties. It was one of the first popular web chatrooms, but was eventually closed in 1999.

While using NetCentral I had noticed that it passed my encrypted authentication token value in my URL to validate my handle per HTTP request. This authentication method was an extremely bad idea for security, but back then bad ideas were common.

Once, someone “hijacked” my handle when I unknowingly clicked a link that sent them my full URL (with my authentication value). Not knowing their technique was a simple and mindless URL hijack, I wrongly thought that they had somehow broken NetCentral’s handle encryption mathematically. This made me see the encryption as breakable, and it sent me on a mission to break this encryption myself mathematically.

And I did it.

/* Program to calculate the user id code for the NetCentral
 *    chatrooms based on the actual user's handle.
 *        - Steve "WarAxe" Mooradian - 9/20/98
 */

#include<iostream.h>
#include<string.h>

void main(void)
{
	char handle[20];
	int id, handle_length;

	cout << "Input handle:";
	cin >> handle;

	handle_length = strlen(handle);

	for(int i=0;i<handle_length;i++)
	{
		if(handle[i]>=97)
			handle[i] -= 32;
		id += handle[i] * 33 * (i+1);
	}
	cout << "ID number is " << id << "\n";
}

I wrote the little routine above to calculate the authentication token for any chat handle desired… even ones that weren’t registered with the website! The authentication token is calculated by multiplying the first handle character’s uppercase ASCII value by 33, the next character by 66, and so on, and then summing the values. For example, a handle of “Axe” would have a token value calculated as follows: (A=65)*33 + (X=88)*66 + (E=69)*99.

Languages: C++

Coding tools: Notepad

Required supporting installs:
gcc compiler

BTW, after breaking their encryption I informed NetCentral, but they were already going to shut down the chatroom soon so they didn’t really care.

 

Recent Pics


Fatal error: Call to a member function show_recent() on a non-object in /home/content/s/t/e/stevemooradian/html/wordpress/wp-content/themes/nuclear_magic2/index.php on line 47