Code Monkey home page Code Monkey logo

starfox's Introduction

Star Faux - Space Shooter in OpenGL

Created using GLUT and GLEW libraries.

Team:
Allen Zhang
Vincent Kyi
Kevin Nguyen
Stanley Xu
William Tam

  1. Introduction Our project is based on the Nintendo's StarFox game. It features a main player that flies a ship. So far, there are asteroids and the player must shoot down the asteroids while avoiding crashing into them.

Keys: w: fly up a: turn left s: fly down d: turn right e: accelerate forward r: accelerate backwards : shoot p: pause q, Q, Esc: quit

  1. Results A. Bump Mapping We used bump mapping on the asteroids. We currently have three different asteroid geometries that are bump mapped with three different normal maps (stepstone_normal.tga, cobble_normal.tga, and many_normal.tga). The asteroids are placed in random locations and given random rotations. Bump mapping (aka normal mapping) is mostly done in the fragment shader. We researched bump mapping online and found some really good tutorials (see references below). One implementation calculates the tangents and bitangents in the application while another calculates only the tangents in the application and the bitangents in the vertex shader (by cross product normal and tangent). The best implementation that we found was through a new method of normal mapping. An article posted below shows that the previous methods of calculating the TBN matrix to get to tangent space is misunderstood and only works via tricks to get the tangent frame to be orthogonal. The new method uses linear algebra, calculus, and gradients to compute what really should be called cotangent, cobitagent and normals. It calculates the TBN matrix in the fragment shader and returns a perturbed normal based on the normal map sampler.

B. Collision Detection

C. Particle System

References: To compute tangents and bitangents in the application for bump mapping. http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-13-normal-mapping/

To do bump mapping only in the fragment shader. http://www.thetenthplanet.de/archives/1180

starfox's People

Contributors

allenzhangcodes avatar recreate avatar lmtedition avatar vincekyi avatar

Stargazers

Raúl Roa avatar  avatar  avatar

Watchers

Raúl Roa avatar James Cloos avatar  avatar  avatar  avatar  avatar  avatar

Forkers

allenzhangcodes

starfox's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.