Results 1 to 8 of 8

Thread: How to point the gun

  1. #1

    Thread Starter
    Fanatic Member pradeepkrao's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey
    Posts
    534

    How to point the gun

    Hi,

    I am developing a game.
    Please see the attached screen shot.

    I can move my gun the arrow keys.. (I am positioning .. But i want to direct it...)..

    Also i can launch the bomb.. I want it to go towards the the direction of the gun..

    Can somebody pop up some ideas..

    Thanks,
    Pradeep
    Attached Images Attached Images  
    Learn by others experience as you cannot live long to experience them all.
    www.freewebs.com/pradeepkrao

    LOOK AT MY GAMES AT MY WEB SITE.

  2. #2

    Thread Starter
    Fanatic Member pradeepkrao's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey
    Posts
    534

    Solved

    Hi,

    I have solved it...

    I rotated the gun according to the direction of keys and then moved it respectively....


    And then launched the bomb...

    Pradeep
    Learn by others experience as you cannot live long to experience them all.
    www.freewebs.com/pradeepkrao

    LOOK AT MY GAMES AT MY WEB SITE.

  3. #3

    Thread Starter
    Fanatic Member pradeepkrao's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey
    Posts
    534

    Hae....

    See the screen shot...

    I will post the entire code after adding the music...

    ..

    Pradeep
    Attached Images Attached Images  
    Learn by others experience as you cannot live long to experience them all.
    www.freewebs.com/pradeepkrao

    LOOK AT MY GAMES AT MY WEB SITE.

  4. #4
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    hey! those kind of games are really cool with stereo 3d!
    i think you should add an option for it!
    do you know what it is?

    btw. the screenshots are really nice!
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  5. #5

    Thread Starter
    Fanatic Member pradeepkrao's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey
    Posts
    534

    Hae Cyborg...

    Hae Cyborg,

    I have some samples for stereo 3d effects. I know the concept as i am an electronics engineer.. But i have not gone through the code...

    A friend of mine will be creating the music for the game..

    I want to know how to make the explosions.

    Well the collision detection was simple.. as i calculated the distance between the astroids and the bombs.. if the distance was less than say X then i reset the astroid and disable the bomb..

    I have an example for billboarding... I have done such in 2d using graphic cell..

    But I have not done in 3d, could you please help me out...

    Thanks,
    Pradeep
    Learn by others experience as you cannot live long to experience them all.
    www.freewebs.com/pradeepkrao

    LOOK AT MY GAMES AT MY WEB SITE.

  6. #6
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    there are different kinds of tereo-3d, the anaglyphic and the one with glasses you hook up with the computer...

    heres a image of the anaglyphic kind...

    when everything on the right eye is faded in red, you cant see the red objects...that will fool the eye that there are another picture than it really is....
    its the same for the left eye only its in blue...

    when the brain puts the pics together it does what it does when looking into a real 3d object, it puts the pics together and check the distance between objects from left to right to know the distance from the eye to the objects...

    it works almost the same with those glasses you hook into the comp, only those are shaded so you cant see through them....but when using them, the picture flashed from the left eye and the right eyes pictures and only makes it possible to look through one of the sides at once.....

    sorry if this was a bad explenation, but if you dont understand, just tell me!


    Attached Images Attached Images  
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  7. #7

    Thread Starter
    Fanatic Member pradeepkrao's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey
    Posts
    534

    Hi

    Cyborg,

    Thanks for the explanation..

    Well What i had done is ..

    I created few litvertex
    (My camera is still and astroids move towards me....)

    I loaded an array of bmp's (Explosion images..)

    Made a class with the above..
    and when ever there is a collision i set the object of the above class at that point...

    it was working fine.. But it gave me false locations..
    Also the explosions were not good..

    I am now doing a particle system..
    and when ever there is a collision i will set this particle system there and then explode...

    I will send you once i do it..

    Check out this billboarding...

    Pradeep
    Learn by others experience as you cannot live long to experience them all.
    www.freewebs.com/pradeepkrao

    LOOK AT MY GAMES AT MY WEB SITE.

  8. #8

    Thread Starter
    Fanatic Member pradeepkrao's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey
    Posts
    534

    Hi

    Cyborg..

    Sorry.. i have posted exe.. as it has other classes in different directory..
    Attached Files Attached Files
    Learn by others experience as you cannot live long to experience them all.
    www.freewebs.com/pradeepkrao

    LOOK AT MY GAMES AT MY WEB SITE.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width