Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (416)
games submitted by our members
Games in WIP (306)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Game Play & Game Design / Re: Shooting a Fireball on: 2012-03-21 02:26:56
Thanks for the help guys!  I've gotten the fireball firing mostly correct now.  I have one bug though, I have to change directions and shoot before being able to shoot again.  If I can't fix this i'll post the code, but if anyone might have any ideas I'm all ears!  Thanks again for the help!  Smiley

Edit: All fixed and working great now Smiley Thanks!
2  Game Development / Game Play & Game Design / Shooting a Fireball on: 2012-03-20 20:14:39
Hey guys,
In my game I've been trying to shoot a fireball.  So far I've been successful in getting it to shoot from the character, but I've run into a little problem.  I have two variables for my player's location, playerX and playerY, and when you move these are overwritten based on which key you hit (Ex. right = playerX += 25).  The problem i'm having is that the fireball draws from the original X and Y, where the character is originally drawn in, not the new X and Y coordinates from when I move.  I would post the code but it's a bit messy and lengthy.  Any suggestions?  Huh

P.S. I'm pretty fluent in Java, but still a begginner in Game development so anything helps Smiley
Pages: [1]
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
BrassApparatus (3 views)
2013-06-19 08:52:37

NegativeZero (10 views)
2013-06-19 03:31:52

NegativeZero (12 views)
2013-06-19 03:24:09

Jesse_Attard (17 views)
2013-06-18 22:03:02

HeroesGraveDev (59 views)
2013-06-15 23:35:23

Vermeer (59 views)
2013-06-14 20:08:06

davedes (58 views)
2013-06-14 16:03:55

alaslipknot (52 views)
2013-06-13 07:56:31

Roquen (73 views)
2013-06-12 04:12:32

alaslipknot (58 views)
2013-06-10 19:30:18
Smoothing Algorithm Question
by UprightPath
2013-05-28 02:58:26

Smoothing Algorithm Question
by UprightPath
2013-05-28 02:57:33

Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!