Sunday, February 5, 2012

Archive for September, 2009

C++ Friend Functions/Classes Example

Posted by Jason On September - 29 - 2009

An Example/Tutorial of how to use Friend Functions/Classes in C++

Friend Functions and Classes are Functions/Classes that can access another Class’s Private Members without having to be a derived class or member function.  This is done by the keyword “friend”

C++ Friend Functions/Classes Example

C++ Class Example

Posted by Jason On September - 29 - 2009

An example or tutorial on how to use Classes in C++

C++ Class Example

Dino Space Shooter in C++ and DirectX9

Posted by Jason On September - 29 - 2009


Above is the Flash ActionScript3 Playable Demo version but is missing features that the DirectX/C++ verison has!
Flash Source Here

This was a personal project for me to learn more about DirectX

It is a simple 2D space shooter where you use the mouse to control the player ship.

The 2D artwork is done by my girlfriend Heather Dugger.
The Music was created by me.

The Full Game and Source Code can be downloaded Here:
[Dino Space Shooter Release v 1.0] (the game)
[Dino Space Shooter Source v 1.0] (the source code)

To Run Game:
Requires: Windows, DirectX 9 August 2007 Redistributable
[DirectX 9.0 August 2007 Redistributable]

To Compile Code:
Requires: DirectX 9 August 2007 SDK
[DirectX 9.0 August 2007 SDK]
Requires: FMOD Sound API
Fmod Sound

This game shows my knowledge of:
2D vectors/math/translations/rotations/etc.
2D collision
2D Sprite Drawing in DirectX
2D Alpha Blending
2D Page Flip Animations
C++ Classes,Structs,Standard Template Library type DirectX initilization and callbacks
Windows Input/Screen
FMOD Sound API

Update : Added Sound, Player Animation, Full Working Release

Improvements I would like to make later on:
A Boss Enemy
Better Collision Detection
Particles

Little Red Hood

Posted by Jason On September - 29 - 2009

Colored in Photoshop, Drawn in Ink

black and white ink drawing

black and white ink drawing

little red hood colored

little red hood colored

Straight Lines

Posted by Jason On September - 29 - 2009

Ink drawing done with all straight lines.  I don’t have the hard copy anymore, its at The Ohio State University, as I did this for an Art Class (Art 206)

Ink and Straight Lines

Ink and Straight Lines

Abstract

Posted by Jason On September - 29 - 2009

Abstract art with Photoshop

Ink and Photoshop

Ink and Photoshop

Photoshop

Photoshop

photoshop

photoshop

Sketch

Posted by Jason On September - 29 - 2009
random sketch

random sketch

Random Drawing

Random Drawing

757 – Software Engineering

Posted by Jason On September - 28 - 2009

Principles of design, implementation, validation, and management of computer software; emphasis on reading and discussing papers from relevant journals and proceedings; term project required.

682 – Computer Animation

Posted by Jason On September - 28 - 2009
Spacehogs

Spacehogs

Spacehogs was an Xbox 360 XNA School Project for my CSE 682 Procedural Animations Class at The Ohio State University, in 2007. The class was a survey of computer animation algorithms and techniques; interpolation, path following, quaternions, object deformations, forward/inverse kinematics, rigid body dynamics, particle systems flocking, autonomous behavior, and L-systems. I was on a team of 5 people total, my responsibilities were: Player Control and Movement, Enemy Monsters, Weapons (Laser and Tractor Beam), and Boss Monster.

Full Source Download Here: Spacehogs!

Procedural Aspects:

Spherical Linear Interpolation

Spherical Linear Interpolation

For the player ship orientation in our game, it was represented as a Quaternion matrix, and we used Spherical Linear Interpolation to animate our ship tilting left and right and up and down. Using XNA’s built in Quaternion objects and SLERP we were able to accomplish our goal of procedurally animating the player spaceship for moving. I was responsible for implementing the player controls, movement, and making sure they “felt” good.

An Example Video: http://j1n.org/classes/682/quaternion.wmv

Monster AI

Monster AI

Boss Monster AI

Boss Monster AI

The Monster AI is a simple follow prey-predator algorithm that uses the player’s position and simply allows the enemies to follow the player. The regular enemies were programmed to try and crash “kamikaze” style into the player ship causing damage, while the boss monster shoots homing fireballs at the player. I was responsible for implementing the Enemy AI for the game.

Example Video http://j1n.org/classes/682/monsterchase.wmv

Laser Beam

Laser Beam

Tractor Beam

Tractor Beam

The Laser and Tractor beam were some of the weapons we created for our XNA game. We fired a ray into 3d space and used spherical collision to detect if the ray fired from the position of the player intersects with a target object. I was responsible for the implementation of the Laser and Tractor beam. The Laser would destroy objects such as asteroids/enemies, while the Tractor beam could push/pull objects towards the player.

Example Video: http://j1n.org/classes/682/lastertractorbeams.wmv

Performance analysis considerations in design of algorithms and data structures; asymptotic analysis, recurrence relations, probabilistic analysis, divide and conquer; searching, sorting, and graph processing algorithms.

Program Lab Samples:

The Six Degrees of Kevin Bacon – Breadth First Search Algorithm:
Language: Java

Concept of Six Degrees of Kevin Bacon : http://en.wikipedia.org/wiki/Six_Degrees_of_Kevin_Bacon

-Any actor can be linked to Kevin Bacon by 6 or less matches where an actor and another actor who star in the same movie is a link.