Saturday, February 22, 2014

Worms - An Animation

The worst part of software is either you have everything or you have none. Till recently my blog was having only a few posts and that too my original code. Now i decided to post all the projects that i have. This is done purposefully as i am not sure till what time these projects will be with me. Can't believe my hard disk. I have experienced it first hand. If i share something i treasure it stays with me longer.

This is the last project of the 2011 year submitted by students of 2012 passout students. This is worms. If you click inside the window all the worms moving randomly till that time congregate at the point clicked.

Snapshot:



Here is the source. If in any of the posts, the code does not match the project or snapshots it is entirely due to the pipelined and the time division specialization of work approach that i used to post these.

Water Ripples - An Animation

This project draws dots on a rectangular plane. The plane surface acts like a water surface and behaves as when a stone is thrown into the water. Interesting code which i have not gone through as yet. The plane can be rotated by dragging the mouse. I was not able to get the snapshots of the waves.

Snapshots:






Here is the code.

Tic-Tac-Toe - A Game

This is the one played against the computer. I hope i have not mixed(code) the two.

Snapshot:


Here is the code.

Tic Tac Toe - A Two Player Game

This is a project about playing tic-tac-toe. There are two submitted in this batch and somehow the students fooled me into accepting two similar projects saying one is a two-player game and the other is a game which is played with the computer at the other end.

Snapshot:


Here is the code.

SurfGrid - An Animation

This is a project called surfgrid and it is a torus which rotates in an undefined axis. It can be shaded or only a wireframe model of it can be displayed by playing with settings in the popup menu.

Snapshots:




Here is the source.

Steam Engine - An Animation

This is an animation of a steam engine. Im working on steam, cloud and water simulation right now(Got hold of a really good book from the library detailing render-man shading language). Will update everyone if anything.

Snapshots:



Code is here.

Rubiks Cube - An Animation cum Puzzle Game

Something strange is happening. I am getting requests for code download from schools across the world. I am embarrassed at this as what i teach and what we do is at the level of an engineering college here in Bangalore.

Nevertheless, this is an interesting project. Rubiks cube as everyone knows is a cube with six sides and six different colors on each of those sides. If a cube is jumbled then to solve it needs special intelligence. The code in this project dutifully obeys the input commands and changes the display accordingly. So a really good enhancement would be given a jumble the computer should make moves to solve the puzzle.

Snapshots:




I am sure you are salivating at the prospect of getting hold of the source.


Planes - Rockets - An Animation

A few paper rockets flying around and never colliding with each other. Their colors are different. They fly on a path determined by a hotch potch of trignometric functions. It is a demo program written by someone whose name appears at the top in the code.

Snapshots:



Here is the source.

Olympic Rings - An Animation

Its an year of olympics and a simple animation of the olympic rings flying from nowhere and congregating into the olympics symbol of five rings.

Snapshot:



Here is the code.

Helicopter - A Game

This is a helicopter project. Very simple. A copter moves up if you hold the mouse button down. If not it keeps going down. An obstacle appears from the right and the task is to jump over it.

Snapshot:



Here is the source.

On request i am posting a crude algo of this program as i understand it...
display function has the following steps:
1) Check if the helicopter comes in contact with the wall. If so end the game and display appropriate message.
2) If wflag==1 that means start of the game so display messages indicating the way to start the game ie by clicking the mouse.
3) If its not start of the game and the game has not ended then in the second else part do the following
i) Increment the score and if the score overflows increment level
ii) Translate the helicopter by hm in the y direction and draw it.
iii) move the position of the wall to the left by bspd(block speed)... If it has already gone out of the window reinitialize its bx to 50 and by to any random value between 20-44.(width of the block is always 5 and height 35. So a block can range from 20 to 55 minimum to 44 to 79 maximum leaving 20-20 distance at the top and bottom)
iv) Draw the block at position bx,by by drawing a rectangle(red polygon)
Mouse function steps are:
1) If left mouse button is pressed or unpressed
   i) if the left mouse button was pressed
       initialize the idle function to moveHeliU
   ii) if the left mouse button was unpressed
       initialize the idle function to moveHeliD
Idle functions simply increment or decrement the hm value to move the helicopter up or down
Keyboard function can also be used to control the helicopter...
1) if 'w' key is pressed initialize the idle function to moveHeliU
2) if 'm' key is pressed initialize the idle function to moveHeliD
Init function
Initializes the window size by calling glOrtho with left=0,right=100,bottom=0,top=100

You might have guessed that moveHeliU and moveHeliD move the helicopter up and down respectively while also moving it to the right.

Graphics Package - A tool to draw primitives

This is an implementation of a polymesh editor code of which is in the text book(Edward Angel). With great difficulty i got a snapshot as i have only a few minutes to execute each project. If middle button is pressed a menu appears and you can draw a line, point and polygon and delete them or move them.

Snapshot:


Here is the source.
Here is the code of the same project submitted in 2012.

Flowing Fountain - An Animation

This is a flowing fountain. Remember it is a C++ project. I would love to go through the project but that will take lot of my time. Changes.... Hmmmm i guess making a different shaped pool of water and have multiple fountains where their water height varies would be a really tough modification. Something which can be pulled off by someone who is technically good.

Snapshots




This is the source.


Graphics Editor - A tool to draw images

This is again an unstable program and there is something wrong when it runs. I was fortunate to capture a snapshot.

Here it is:


This is the source.

Dancing Dolls - An Animation

This is a dancing dolls project and is very crude implementation of rotating the scene. If mouse is moved the dolls rotate and it is very difficult to get them inside the window. It is becoming a chore to acknowledge the student who submitted this so i will stop doing that hereafter.

Here is a snapshot:


You can find the source here.

Friday, February 21, 2014

Celestial Observatory - An Animation

 This is a project submitted by Deepthi N and Harshitha P of VI semester of 2012 pass-out batch.

 Here is a snapshot which looks beautiful:


 You can access the source from Here.

Catch Me If You Can - A Game

 This is a project submitted by Dheeraj Kumar and Jeevrajani Vaibhav of VI semester of 2012 pass-out batch. There is a problem with the project. It is a C++ project. Some warnings apart, if we click on the moving box at the center it should increase the points which it does not. The advantage with projects not working is that you get an opportunity to make it work. In this project after screen is maximized the rectangle inside which the white box appears should be at the center.

Here is a snapshot:


 You can download the code from Here.

Car Park - An Animation

 This is a project submitted by Monashree S of VI semester of 2012 pass-out batch.

Here are a few snapshots:

This is the initial view. You can press both left and right mouse button for two menus to appear.


This is the top view:


This is a solitary car which does not appear in the top view. It can be seen by moving back by a large distance. If you choose move car option then this car can be driven front, back, left and right.


You can download the source from Here.

Car Race - A Game

This is a project submitted by Manasa of VI semester of 2012 pass-out batch.

Here is the snapshot:

There is a problem with moving the car. It has to be incremented by floating point values and probably double buffering would give a smooth display.

Here is the source code.

Bullz Eye - A Game

This is a project submitted by Manasi V. and Nishkala C of VI semester of 2012 pass-out batch.

Here are a few snapshots:






You may get the code from here.

Archery - A Game

This is a project submitted by Priyanka R and Mamatha H of VI semester of 2012 pass-out batch.

This is a snapshot of the game in action:


You can download the source from here.

DEMOLITION OF A BUILDING BY AEROPLANE CRASH

This is a project submitted by Manish Saini and Neeraj Kumar Jha of VI semester of 2012 pass-out batch.

This is a snapshot of the aeroplane crashing with building:




You can find the code here
The code that i posted earlier was reportedly having problems. Now i have posted a different file which i have tested in ubuntu, eclipse.

3D House Scene - An Animation

This is a project submitted by Chandan Kumar A and Naveen Jevoora of VI semester of 2012 pass-out batch.

This is a snapshot of the top view of the house:


 This is a snap shot of the inside view of the house. The fan rotates and clock turns although time shown is not the right time.


 You can access the source from Here.

Prey Hunter - Bug Eater- A Game

This is a project submitted by Shruthi G and Sneha C of VI semester of 2012 pass-out batch. There is a problem with the project. The food for the snake does not appear on screen. It has 340 lines of code. You may modify the code and make it work well.

This is the front screen which needs to be maximized initially:


This is the snake moving:


You can download the source Here.