Thursday, 27 April 2017

Computer Graphics- 23. Fighter Jet Using OpenGL

 FIGHTER JET USING OpenGL


IT IS A COMPUTER GRAPHICS PROJECT MADE USING VISUAL STUDIO. IN THIS PROJECT IT SHOWS ABOUT FIGHTER JET.

Programming in Visual C++ Using OpenGL, Introduces the three-dimensional computer graphics with OpenGL.

In this post I am going to show the OpenGL code on FIGHTER JET and the implementation and demonstration of FIGHTER JET using the computer graphics and OpenGL API.

There are many 2D program in our blog, today we are presenting Fighter Jet CG Programs in C. This cg OpenGL game look like video game. The game have a Fighter jet which moves in all direction and also fires bullets. User have control over the movement of jet and bullet.

Fighter Jet CG Programs in C

In this program the Fighter Jet is drawn with the help of simple line code using GL_LINE_STRIP and GL_LINE_LOOP. The Jet also have shield. The activation also is control by user with keyboard function. 

If the shield flag is turn on, drawshield() function is called. This will then activate shield. The shield is not shaped like cg OpenGL circle but some what similar to it. With sine and cosine functions and GL_LINE_LOOP it get close to circle.

After Jet and Shield, next is bullet. In the Fighter Jet CG Programs in C GL_POINTS is used with for loop function to draw the bullet points. The entry flag set the entry point for bullet firing, allocate the bullet when to fire. The allocBullet function check if bullet is in use.

User Interaction Fighter Jet CG Programs in C

This cg OpenGL program have keyboard interaction. Both alpha keys and navigation keys are allocated to the keyboard functions. 
ESC : Quit
S and s :
C and c : Show and Hide Cursor (More functionality is added by functions)
z and Z : Add 20 point in direction of motion.
f and F : Enter game mode.
l : Exit game mode
P and p : Pause the game
Q and q and Space : Fire bullet from fighter jet.

This cg OpenGL program have many keyboard functions. There are 4 keyboard functions  - key, keyup, special, specialup. 

Key function have the user interaction indicated above in the post. While in the Key function s, S setup the shield flag to one the same is set to keyup. Since different set of windows are created, it set the platform of shield and it's activation.  

The special and specialup function have up, left and right which give the thrust, left and right movement.

All these objects are designed with simple OpenGL graphics objects. Do buy the project and I think you will like this project as well put your comment and let us know what more need to be added in this. Also help by contributing your projects either modified or new, we are going to publish your project on this blog with your name. It is a humble request as I single can't help student reach that much of projects.

""Type your email-id in the comment box and pay INR 400 on 
1). Paytm no. 7795746605   or
2). Paypal id:- paypal.me/abhishekabhi/400inr
for code & send payment details to solutionsbyabhi@gmail.com""

Please Hit the like button and subscribe the channel (subscription is FREE OF COST) and you will get new video notification next time.

No comments:

Post a Comment