Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualwarnexus

Posted 06 January 2013 - 09:40 PM

I am working on making a Top-Down Shooter Clone in Java. After an hour or so, I was able to figure how to position the ship's projectile which is a laser relative to the direction of the ship's sprite. Problem is, if I move the ship, the projectile follows relative to the ship direction when I move the ship. As you can see this is a problem because the laser should be moving independently regardless of where the ship is when it is fired.

 

Here's the code which presents my problem:

 

gameProblem1_zpsb4ee2df9.png

 

 

Here's the picture mainly to prove I have a working game(the ship can move with left and right arrows keys and fire a projectile with z button!):

gameProblem_zps60f87d95.png

 

 

 

#4warnexus

Posted 06 January 2013 - 09:38 PM

I am working on making a Top-Down Shooter Clone in Java. After an hour or so, I was able to figure how to position the ship's projectile which is a laser relative to the direction of the ship's sprite. Problem is, if I move the ship, the projectile follows relative to the ship direction when I move the ship. As you can see this is a problem because the laser should be moving independently regardless of where the ship is when it is fired.

 

Here's the code which presents my problem:

 

gameProblem1_zpsb4ee2df9.png

 

 

Here's the picture mainly to prove I have a working game(the ship can move with left and right arrows keys and show a projectile with z button!):

gameProblem_zps60f87d95.png

 

 

 

#3warnexus

Posted 06 January 2013 - 09:37 PM

I am working on making a Top-Down Shooter Clone in Java. After an hour or so, I was able to figure how to position the ship's projectile which is a laser relative to the direction of the ship's sprite. Problem is, if I move the ship, the projectile follows relative to the ship direction when I move the ship. What are my options?

 

Here's the code which presents my problem:

 

gameProblem1_zpsb4ee2df9.png

 

 

Here's the picture mainly to prove I have a working game(the ship can move with left and right arrows keys and show a projectile with z button!):

gameProblem_zps60f87d95.png

 

 

 

#2warnexus

Posted 06 January 2013 - 09:36 PM

I am working on making a Top-Down Shooter Clone. After an hour or so, I was able to figure how to position the ship's projectile which is a laser relative to the direction of the ship's sprite. Problem is, if I move the ship, the projectile follows relative to the ship direction when I move the ship. What are my options?

 

Here's the code which presents my problem:

 

gameProblem1_zpsb4ee2df9.png

 

 

Here's the picture mainly to prove I have a working game(the ship can move with left and right arrows keys and show a projectile with z button!):

gameProblem_zps60f87d95.png

 

 

 

#1warnexus

Posted 06 January 2013 - 09:36 PM

I am working on making a Top-Down Shooter Clone. After an hour or so, I was able to figure how to position the ship's projectile which is a laser relative to the direction of the ship's sprite. Problem is, if I move the ship, the projectile follows relative to the ship direction when I move the ship. What are my options?

 

Here's the code which presents my problem:

 

gameProblem1_zpsb4ee2df9.png

 

 

Here's the picture mainly to prove I have a working game(the ship can move with left and right arrows keys and show a projectile with z button!):

gameProblem_zps60f87d95.png

 

 

 

 


PARTNERS