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 (307)
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] 2 3 ... 58
1  Games Center / WIP games, tools & toy projects / Re: State of Fortune on: 2013-06-03 14:21:28
I actually really enjoy your monologue just for the record Smiley. It inspires me to actually get off my ass (figuratively) and start coding Wink.
2  Game Development / Networking & Multiplayer / Re: [KryoNet] 'Field not declared as byte: 0' on: 2013-05-22 10:10:36
You said you made a change, I assume undoing that change fixes it? Because its entirely possible something else is the problem. I've had that happen to me in the past that I was looking in the wrong place.
3  Game Development / Performance Tuning / Re: Anyone else here get a major kick out of refactoring and optimizing regularly? on: 2013-05-19 17:09:45
I am absolutely the worst about this, I take forever just trying to find the best possible solution that takes the least amount of code possible. Its a really bad habit, but I REALLY hate writing inefficient code.
4  Game Development / Newbie & Debugging Questions / Re: Player wall collision sliding problem [Need Help] on: 2013-05-03 14:24:31
I'm not sure I understand completely because some of the code isn't there (collision() for example).

However, I think you are doing things a little backwards, you're moving then verifying that move. An easier way is to verify the move and only move if it is a legal move.

If you can give more information I can help further Smiley.
5  Game Development / Newbie & Debugging Questions / Re: Re-Spawning in same position with same enemy states [Help Needed] on: 2013-04-26 16:16:30
I may be mistaken, but I think GlennBrann was asking how to keep htem in the same position as they were before the player died. In which case you should have a block of code in your update procedure that only runs when the player is alive, so if the player is dead the enemies stop moving and when he comes back they resume.
6  Game Development / Newbie & Debugging Questions / Re: [Java2D] findind x and Y after Rotation on: 2013-04-26 14:36:46
I'm also not sure about your question, but I'm gonna make an assumption that you are looking for  the tip of the gun's x and y?

If that is the case, then you just use your basic trigonometry knowledge:

Sin means the y value of an angle on a unit circle (r=1).
Cos means the x value.

In order to find the tip of the gun you would do this:

1  
2  
gunTipX = math.sin(gun.angle)*gun.length + gun.x;
gunTipY = math.cos(gun.angle)*gun.length + gun.y;


Hope I could be of help Wink.

If I misunderstood your question, then please clarify Smiley.
7  Game Development / Newbie & Debugging Questions / Re: Collision Detection for tiled map via cross products? on: 2013-01-16 09:34:12
well, with your current setup it might be a little tricky. This is something I've seen very commonly with people using Slick.

Instead of checking each time which keys are down for movement, you could respond to the events keyPressed and keyReleased, and then set a velocity for your sprite (rectangular form), and then if you run into a wall going up, you just set your y component to zero which won't affect your x component at all.

Does that make sense?
8  Game Development / Newbie & Debugging Questions / Re: ConcurrantModificationException on: 2013-01-01 02:16:19
yeah, I guess, but you could just do a counter-- if it is critical. while not optimal, still easier than making another list.
9  Game Development / Newbie & Debugging Questions / Re: [unsolved] Recalling an int, gives an "empty" spot. on: 2012-12-31 15:26:54
I'm not sure I entirely understand your question, but can't you just make a variable that stores it?

for example StoredX and StoredY? and then use those?
10  Game Development / Newbie & Debugging Questions / Re: ConcurrantModificationException on: 2012-12-31 15:14:27
I personally just use the simple for-loop  persecutioncomplex

I think it is a lot easier to just use that line of code (which shouldn't confuse you at all), and not have to worry about multiple lists and the like.

On another note, I don't agree with your use of a removal list, I would just use the boolean like ra4king recommended.

And also, look into having a single list if you can, it is much cleaner and often easier to handle as your game becomes more complicated (less loops).
11  Game Development / Newbie & Debugging Questions / Re: Thread sleeping not playing well with Java2D? on: 2012-12-31 15:09:13
Yeah, this is just a thought, but sleeping may prevent your program from rendering until after the sleep is over.

You could try using a timer instead?
12  Discussions / General Discussions / Re: Trying To Make A Shared JTextArea on: 2012-12-30 22:20:42
I think you're looking at this backwards. You aren't synchronizing the JTextField, you are synchronizing the String for the contents of the field, and as a consequence the JTextField.

Does that make sense?
13  Discussions / General Discussions / Re: Trying To Make A Shared JTextArea on: 2012-12-30 20:50:40
You could synchronize your two users using a database. Not sure how scalable that would be. Another alternative would be to have a server program that communicates with the clients and has a central copy of the edited document and uses it to keep the clients synchronized.

Hope I could help,
h3ckboy
14  Discussions / Miscellaneous Topics / Re: Free "Source" Steam Game For you?! on: 2012-12-24 09:28:33
Can I get portal Cheesy. Thanks man!
15  Games Center / Featured Games / Re: Droid Assault with christmas bonus pack! on: 2012-12-21 10:11:42
Well color me impressed. I thought that that was amazing. It handled very well, never once slowed down, and tbh it was actually really fun Cheesy.
16  Java Game APIs & Engines / Java 2D / Re: Pixel perfect collision detection on: 2012-12-20 00:37:24
check out this thread:

http://www.gamedev.net/topic/329033-pixel-perfect-collision-detection/
17  Java Game APIs & Engines / Java 2D / Re: Pixel perfect collision detection on: 2012-12-19 07:42:21
I must ask, why are you doing it this way? is this a learning experience? cause it would be a lot easier to just get some pre-existing code thats already in java.
18  Discussions / Suggestions / Re: How about a mobile site? on: 2012-12-19 07:35:54
Riven a very busy guy.

Tbh though, I've not had much trouble with using JGO on my phone.
19  Game Development / Newbie & Debugging Questions / Re: Mouse Input Per Second on Button Problems on: 2012-12-18 07:05:44
in the spot where you change the boolean for visible you could make the code something like this:

1  
2  
3  
4  
5  
6  
7  
if(msc.x==0&msc.y==0&isVisible==true)
{
isVisible=false;
}else if(isVisible==false)
{
isVisible= true;
}



Is that what you're looking for?
20  Game Development / Newbie & Debugging Questions / Re: GTGE, unknown amount of buttons on: 2012-12-18 07:00:46
well, what are the buttons representing?
21  Game Development / Newbie & Debugging Questions / Re: GTGE, unknown amount of buttons on: 2012-12-17 21:59:15
You could just include the counter, i, in the name.

so

1  
TButton button = new TButton("" + item, 8, 415 + (25 * i), 90, 25) {


becomes

1  
TButton button = new TButton("" + item + " #"+i, 8, 415 + (25 * i), 90, 25) {


does that solve your problem?
22  Game Development / Newbie & Debugging Questions / Re: WHY DOES THIS WORK o.0 on: 2012-12-17 20:48:21
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
public void render(){
      BufferStrategy bs = getBufferStrategy();
     
      if(bs==null){
         createBufferStrategy(3);
         return;
      }
     
      Graphics g = bs.getDrawGraphics();
     
      for(int i=0;i<pixels.length;i++){
         pixels[i] = new Random().nextInt(0x0000FF) << 16;
      }
     
      g.drawImage(img, 0, 0, getWidth(), getHeight(), null);
     
      g.dispose();
      bs.show();
   }


Is this not what your looking for? I'm sorry if I misunderstand the question.
23  Discussions / General Discussions / Re: Current game engines on: 2012-12-17 16:22:17
I've used GTGE and it was fine, despite the fact that it hasn't been updated in a while.

I've also used Slick and it was awesome.

It really is your choice, try making something simple with both and see which you like better.
24  Game Development / Newbie & Debugging Questions / Re: Run another program inside my program applet/canvas? on: 2012-12-17 14:23:55
You're half correct, it has to be java (or at least for the method described), but I am pretty sure that you don't need the source. I'm not 100% sure, but legal issues aside, you should be able to do the exact same thing with just a jar file AFAIK.
25  Game Development / Newbie & Debugging Questions / Re: Handling of entities on: 2012-12-03 16:45:24
well if it is a simple game one list should be perfectly fine. Atleast that has been my experience Smiley
26  Game Development / Networking & Multiplayer / Re: Wordpress Login on: 2012-11-12 15:05:17
I don't know how to use WordPress, but as for the nifty gui, a very short google search gave me the answer you were looking for.

1  
2  
3  
4  
5  
6  
public void submit1() {
      TextField textField = screen.findNiftyControl("username", TextField.class);
      String username = textField.getText();
      textField = screen.findNiftyControl("password", TextField.class);
      String password = textField.getText();
   }


Hope this is what you were looking for Smiley.
27  Game Development / Newbie & Debugging Questions / Re: I can't build my project on: 2012-11-12 14:44:22
Check your capitalization in your file names. The IDE lets you get away with it, but in a jar it will crash.

I've had that problem in the past Tongue.

However, if that isn't the problem, can you give us the actual exception? As far as I can tell you have only shown us the code that throws the exception.
28  Game Development / Newbie & Debugging Questions / Re: Creating an ingame chat/console. on: 2012-11-12 14:40:46
try using setVisible(false or true);

Or am i misunderstanding something?
29  Game Development / Game Mechanics / Re: Calculating angle to mouse on: 2012-10-30 19:02:44
Can you be more specific in "doesn't work"?
30  Games Center / Showcase / Re: EscapeMare- entry for Gamejolt contest #8 on: 2012-08-20 08:48:50
yeah, I just figured 9 levels in total was enough and submitted.

luckily though I caught a huge bug first Smiley.

best of luck to ya! Smiley
Pages: [1] 2 3 ... 58
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!
mrbenebob (14 views)
2013-06-19 14:55:23

BrassApparatus (22 views)
2013-06-19 08:52:37

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

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

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

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

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

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

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

Roquen (86 views)
2013-06-12 04:12:32
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!