Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (498)
Games in Android Showcase (115)
games submitted by our members
Games in WIP (562)
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 ... 8
1  Games Center / Featured Games / Re: We Shall Wake demo (v6.0) on: 2014-07-28 08:23:08
Freezes during loading screen, or kinda slightly after loading but before any game.

Quote
...

No gamepad support. Now come on guys - you really wanna play a game like this with a keyboard ? ^^'

Long time fan of these games: DMC 3, 4, Bayonetta, Prototype, Infamous, MGS Rising.   Actually did some DMC 3 and mostly 4 speedruns back then, so this excites me. Would love a well written story of course... x)

I'm working on the gamepad support. Unfortunately Java has terrible gamepad support due to Input issues, such as the infamous "triggers share the same axis" thing. It's really making this more complicated than I'd like it to be.

But I'll figure it out.

In terms of story, I think I've written a pretty interesting one - it's pretty off the wall. Haha. Most of it will be told through ingame documents though since I'd rather not drag the player through all of the background information. It'll basically be a basic rival-story with underlying themes and messages.
2  Games Center / Featured Games / Re: We Shall Wake demo (v6.0) on: 2014-07-22 21:29:37
I found an error when I pressed a menu title. It played the same 'select' sound in repeat, and I could't get it to stop.
I am using a dedicated audio card, (Asus XONAR DGX) if that helps.

Here's the log:

1  
...


Full log here: http://pastebin.com/FL9puiGA

I've managed to reproduce the problem, and I'm fixing it now.
3  Games Center / Featured Games / Re: We Shall Wake demo (v6.0) on: 2014-07-13 04:43:34
I've uploaded an updated version (uses the same link) that has numerous bugfixes. Try the new version if you've already downloaded it before.

Quote
Looks very interesting, somehow this reminds me of a modern take on classic beat'em'ups like Streets of Rage and Double Dragon. I guess from the fighting style?  Wink

It's actually based on the gameplay from Prototype - with combat influences from Devil May Cry 3 and 4.
4  Games Center / Featured Games / Re: We Shall Wake demo (v6.0) on: 2014-07-12 15:12:49
We have a YouTube channel too if you're interested in keeping up with the project, if blogs aren't your thing.

<a href="http://www.youtube.com/v/gu0iCRxYtEA?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/gu0iCRxYtEA?version=3&amp;hl=en_US&amp;start=</a>
5  Java Game APIs & Engines / Java Sound & OpenAL / Re: Streaming two OGG files at the same time causes crackling on: 2013-07-16 17:24:02
The LWJGL wiki has some examples on OpenAL, which include handling volume for a source. OpenAL isn't very beginner-friendly, so if you aren't understanding it, you are kind of "on your own."

Have you tried other libraries like Paul's Sound System? It should support multiple OGG streaming. Then at least you will know whether the problem lies with your own codebase, or something else.

There is also TinySound, which will do the mixing in software using JavaSound and in theory should get rid of OpenAL issues.

I understand a lot of it.

I personally didn't like Pauls system. It takes too much initialization and was extremely buggy when I used it. A lot of the locational based sound didn't work at all. Tiny Sound doesn't provide 3d sound, but is very well written.

I programmed my own to be a lot simpler yet provide the same amount of functionality. You can start it up and play a sound with 3 lines of code. It's been pretty successful up until this point. Like I said, streaming works perfect. Just two at a time stirs trouble. I can load and use as many WAVs as I want though, seeing as I load them completely in. (WAVs are being used for sound effects, so each one is about 10-50 KBs).

6  Java Game APIs & Engines / Java Sound & OpenAL / Re: Streaming two OGG files at the same time causes crackling on: 2013-07-16 04:47:10
I don't know a lot about the technologies you are using--I've used ogg & jorbis, and decided they were not for me. But they work for most people. However, I know a couple things about sound programming in general and maybe the following will help.

When you say crackle, does it seem to be related to a lot of starting and stopping, or are harsh sounds that are not on the originals playing?

If the first case, the code that is playing back probably is having trouble keeping current. Enlarging the buffers would help, but would also add to the latency. Usually with sound tracks (as opposed to cues for game play) latency is not such a big deal.

In the second case, the volumes from the two tracks could be overpowering the playback code. In this case, you would have to come up with a way to play back the cues at a lower volume. One possibility is to rerecord the cues at lower volumes before saving them as oggs. Another is to programmatically lower the playback volume and see if that helps.

Why two at once? This is unusual, yes? Ogg is computationally expensive, and you are doubling the cpu cost. Is this a situation where the two files can be remixed together outside the program into a new, single cue? Audacity is great for that sort of thing, and free. (Just make sure you don't download a fake version.)


Well, my idea was to have ambience playing along with the music. However, I can see the possibility of fusing the ambience and the fighting theme files and then making a mixer of some kind to just turn up the fighting channel when I'm in combat. However, I wouldn't even know where to start on such a feature in OpenAL.

The crackles happen in a pattern, as in there's like a rhythm to how often it happens. I think it may be the first case. Right now, the ByteBuffer that streams them is allocated to be 4096 * 8, but do you think I should increase it? If so, how much?

Right now the streams are updated in their own thread separate from the game, and I have it sleep for 1000/30 milliseconds to try and keep the engine from stressing the computer too much.

I could also try lowering the volume. Isn't there a command in OpenAL for this? I think it was changing the Sources gain, correct?

Thank you very much for your input.
7  Java Game APIs & Engines / Java Sound & OpenAL / Streaming two OGG files at the same time causes crackling on: 2013-07-16 03:25:38
Hello guys.

I'm making a sound engine for my game, and so far, it's been pretty easy and straight forward. Everything is working pretty well.

I use and load WAV files into memory and dispose of them later for sound effects, and for music I stream in OGG files with the OggInputStream class I found on this very site. I also use jorbis for loading in the sound.

Now, everything works, but when I stream two OGG's at the same time, the sound crackles really bad. After doing some research on the internet, I found that people who use OpenAL in Objective-C had the same problem, and apparently solved it by changing how the buffers allocate memory. Of course, I'm completely unsure if such a fix is possible in Java. Neither do I know anything about Objective-C. I'm also fairly new to OpenAL, so a lot of this is pretty Alien to me.

Does anyone know anything about this? If you need more elaboration, please do just ask.
8  Game Development / Game Mechanics / 3d camera locking onto a target/z-targeting on: 2013-01-01 02:42:40
So, I'm trying to recreate z-targeting from the zelda games in my own, and to do this I plan on using the lookAt function. Unfortunately, it's not working out for me, even if it is basic trigonometry.

I read the following articles on it:

http://www.euclideanspace.com/maths/algebra/vectors/lookat/index.htm
http://www.ehow.com/how_5717908_calculate-lookat-function.html

My problem is, even if I have the eye coordinates, and the target coordinates, I don't know what to do about the current target coordinates. All I have available to use are the Yaw and pitch of my camera, so I don't know how to take these and make the coordinates I need to get the proper dot product.

And even when I do get the dot product, I don't know what to do about the arccos. In the second tutorial, the author says he got his angle from the arccos of 10. Of course in Java, the input of arccos can't be over 1, so how do I get around this?

I'm sorry if these are obvious questions, my geometry teacher was terrible so most of my trig is self taught.

Thank you.
9  Game Development / Newbie & Debugging Questions / Re: Sprite Sheets in lwjgl, unable to move? on: 2012-12-18 03:48:11
That code looks pretty long and I don't have the time to read it all, but if you need it to move, you can just push the matrix, use loadIdentity and center the sprite at 0,0; then translate to where you want it. Something like this:

1  
2  
3  
4  
5  
glPushMatrix();
glLoadIdentity();
glTranslatef(x,y,1f);
drawSprite(x,y)
glPopMatrix();


Have the actual camera in the render/update method move to where you want it and you'll see the player where he's been placed. I suggest always doing it like this, because if you translate the matrix to the player so that he's the center, you'll have more control over him later with rotations and such.

If it's in the case of controls:

1  
if (Keyboard.keyDown(Keyboard.KEY_RIGHT) x++;


If that's not the problem, and you don't know how to go about animating the sprite itself, try to do something like this:

1  
2  
if (animationNext < 100) animationNext++; else animation++; animationNext = 0;
drawSprite(x,y,animation);


If you elaborate on your problem more I'll try to be more help, I know this is all basic stuff but I don't really understand what your problem is.
10  Discussions / General Discussions / Re: Where are you from? on: 2012-12-09 00:25:22
I'm from Philidelphia, but I live in Bel Air.

It's a story all about how my life got flipped-turned upside down, but I'll tell you how I became the prince of a town called Bel Air.

In west Philadelphia born and raised, on the playground was where I spent most of my days. Chillin' out maxin' relaxin' all cool, and all shootin some b-ball outside of the school, when a couple of guys who were up to no good started making trouble in my neighborhood.

I got in one little fight and my mom got scared, she said "You're movin' with your auntie and uncle in Bel Air!"

I begged and pleaded with her day after day, but she packed my suite case and send me on my way; she gave me a kiss and then she gave me my ticket.
I put my walkman on and said, "I might as well kick it".

I whistled for a cab and when it came near, the license plate said fresh and it had dice in the mirror. If anything I can say this cab is rare, but I thought "Now forget it - Yo homes to Bel Air"

I pulled up to the house about 7 or 8, and I yelled to the cabbie 'Yo homes smell ya later'. I looked at my kingdom, I was finally there, to sit on my throne as the Prince of Bel Air.

I found this website a month or two later.
11  Game Development / Newbie & Debugging Questions / Re: how to draw Sprites that turned to the left. on: 2012-12-08 04:17:10
I'm not sure I understand.

do you mean that my spritesheet should have some sort of x and y offset that should be used whenever i draw?

for example, if i extend my arm to the left, the x offset would be at like -30 or something, which would draw the entire image to the left.

I'm pretty sure that wasn't what you were talking about at all, but that actually seems a lot better than the "fix" that i have now... cool!

Here's how I do it.

When making a sheet, make a set frame width/height before putting it together (make sure it can hold all of the animations) So, when you're working on the sheet, be sure to center the sprites in the frames. That way when it animates, they aren't jittery.

To solve your left and right problem, if the character is symmetrical you could always flip the image horizontally. If you animated it right, the center alignment won't be messed up.

If you need an example I can throw one together.

Good luck bud.

EDIT:
To reiterate, each frame would be equal in width and height. Every sprite would go in a frame of the same size. So, a sheet would have 3x3, 16x16 frames. The first set containing an idle animation, the second running, and the third attacking. They would all be centered, so making an individual offset would no longer be necessary. Just be sure the frames are large enough to fit ALL potential sprites later or you may run into trouble.



ohhh... yeah yeah that's f**king brilliant.

My game was f**king up because i was using the dimensions of the actual Image as the collision hitbox, rather than having a separate invisible rectangle that represents the hitbox, so whenever the image changed dimensions it would f**k my game up (if i was beside a wall or something).

but yes, that seems like a really really good fix, (it seems so easy too, i'm stupid as f**k for never thinking of it).

Thanks a bunch!

No problem man. I'm glad I could help you out with your problems.
12  Game Development / Newbie & Debugging Questions / Re: how to draw Sprites that turned to the left. on: 2012-12-08 03:53:15
I'm not sure I understand.

do you mean that my spritesheet should have some sort of x and y offset that should be used whenever i draw?

for example, if i extend my arm to the left, the x offset would be at like -30 or something, which would draw the entire image to the left.

I'm pretty sure that wasn't what you were talking about at all, but that actually seems a lot better than the "fix" that i have now... cool!

Here's how I do it.

When making a sheet, make a set frame width/height before putting it together (make sure it can hold all of the animations) So, when you're working on the sheet, be sure to center the sprites in the frames. That way when it animates, they aren't jittery.

To solve your left and right problem, if the character is symmetrical you could always flip the image horizontally. If you animated it right, the center alignment won't be messed up.

If you need an example I can throw one together.

Good luck bud.

EDIT:
To reiterate, each frame would be equal in width and height. Every sprite would go in a frame of the same size. So, a sheet would have 3x3, 16x16 frames. The first set containing an idle animation, the second running, and the third attacking. They would all be centered, so making an individual offset would no longer be necessary. Just be sure the frames are large enough to fit ALL potential sprites later or you may run into trouble.
13  Discussions / Community & Volunteer Projects / Re: Looking for people (well, teenagers) who can help me with a project...? on: 2012-12-08 03:43:34
I'm surprised anyone would mistake you for being older than 10 to be honest.

RPG-FPS's never go well. Not even 2D RPGs.

Think simple.

Stop being a bad troll.

I believe in you, now go!

Pic related, it's you:

14  Games Center / WIP games, tools & toy projects / Re: Open Source Metroid Fusion based Java game on: 2012-12-04 01:29:42
Yes I did.
You send some emails, pay for it and that's it. Nobody can use the pics except me but you may play the game.
Oh gosh, I needed a good laugh. Thanks man.
15  Game Development / Newbie & Debugging Questions / Re: Neural Network Help on: 2012-11-14 00:32:35
I have no problem in PM'ing/copying, the problem is translating. They're not written in English Grin
If you could translate the important stuff and send them to me I'd be thankful. If you write in a language with a relatively similar alphabet to english I can translate them myself though. I'd be quite thankful!
16  Game Development / Newbie & Debugging Questions / Re: Neural Network Help on: 2012-11-12 03:44:11
Unfortunately I got them from books and college chairs Smiley
You wouldn't happen to be interested in PM'ing me some of your notes would you? lol
17  Game Development / Newbie & Debugging Questions / Re: Neural Network Help on: 2012-11-12 03:14:41
I never read about that, but considering Hopfield who uses matrix as its "memory" it maybe true.

Atually same problem goes for neural network too, but you can do quick fix by adjusting the number of layers and each of its neurons.
Alright. Thanks. Any specific reads you recommend? Possibly stuff I get can get off the internet, because I'm an impatient person and I don't want to order a book. Hahah
18  Game Development / Newbie & Debugging Questions / Re: Neural Network Help on: 2012-11-11 22:52:46
Yes, Hopfield needs more learning and training data.
Sorry to reply so late, I've been busy.

Anyway, I've read from a lot of places that Hopfields is a bad technique due to the fact it can't fix errors. Is that true? Plus, the bigger ones apparently get pretty slow.
19  Game Development / Newbie & Debugging Questions / Re: Neural Network Help on: 2012-11-09 01:25:42
@theagentd
Homework doesn't count Smiley

Back propagation is best use on prediction or data mining. For pattern like you saud, you may need hopfield. Actually, rather make one by yourself there's already Neuroph library which quite powerful and you'll have a working network by less than 20 lines of code Smiley

It's a lot cooler to do it yourself. I thought hopfields were slow learners?
20  Game Development / Newbie & Debugging Questions / Re: Neural Network Help on: 2012-11-08 00:47:27
This is one of my subjects in study and fortunately my strongest one. ANN is kinda general, what are you planning, back propagation? kohonen?

to your questions, IMO
1. yes it can
2. the more hidden layers you have, the adaptive/learning skill will be better. For example if you use it to recognize pattern, it can spot minor details. It can also reduce error margin between literation.
3. college Smiley nobody want to read calculus books at home *.

*) applied to common people, especially non gamer ones.

For one, I'm glad to have someone who's experienced in this, because I need a lot of help! Hahah.

Anyway, I need it to recognize mostly photos, as I'm working on an adapative AI. Essentially it will be trained to recognize people and things, along with text. Even person/thing will be marked with a good or bad meter so it knows how to react to certain stimuli and so on. I've chosen to give it "eyes" because I plan on welding some parts and making a nifty little robot arm or something for fun over the summer.

But yeah, I need it to recognize places and things. Problem is, I have no real idea on how to, and a lot of the examples are written so mathematically I struggle to comprehend a lot of it. I wanted to use backpropagation because it seemed best for allowing it to learn by itself in some cases.
21  Game Development / Newbie & Debugging Questions / Neural Network Help on: 2012-11-07 02:33:30
Anyone here good at neural nets? I've been studying some of the algorithms behind it, but seeing as I haven't taken Calculus yet I've had to pick a lot of the concepts for this on the way through.

Anyway, I generate and put weights into the net, it provides an output in which I send to be backpropagated so that the weights can be corrected for maximum correctness.

Unfortunately, all it achieves is making the results worse..

Weights are generated, and 1 and 0 are inputted for an ideal output of 1. This is based on the XOR system for testing networks.

Here's the  code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
public class ANN {
   private static final int HIDDEN_WEIGHT = 0;
   private static final int HIDDEN_OLD_WEIGHT = 1;
   private static final int HIDDEN_SUM = 2;
   private static final int HIDDEN_OUT = 3;
   
   private static final int OUTPUT_SUM = 0;
   private static final int OUTPUT_OUT = 1;
   
   float[][] weights;
   float[][] weightHistory;
   
   float[][] hlayers;
   
   int neurons; //Rows
  int hiddenLayers; //Columns
  float idealOutput;
   
   float learningRate = 0.8f;
   float momentum = 0.6f;
   
   public ANN(int neurons, int hiddenLayers, float idealOutput){
      this.neurons = neurons;
      this.hiddenLayers = hiddenLayers;
      this.idealOutput = idealOutput;

      weights = new float[neurons+1][hiddenLayers];
      weightHistory = new float[neurons][hiddenLayers];
     
      hlayers = new float[hiddenLayers+1][4];
     
      //Randomize weights, can be overwritten
     Random r = new Random();
     
      for (int i = 0; i < neurons+1; i++){
         for (int j = 0; j < hiddenLayers; j++){
            weights[i][j] = r.nextFloat();
            hlayers[j][HIDDEN_WEIGHT] = r.nextFloat();
         }
      }
     
      hlayers[hiddenLayers][HIDDEN_WEIGHT] = r.nextFloat();
   }
   
   public void overwriteWeights(float[][] newWeights, float[] hweights){
      weights = newWeights;
     
      for (int a = 0; a < hlayers.length; a++){
         hlayers[a][HIDDEN_WEIGHT] = hweights[a];
      }
   }
   
   public float[] recall(float[] input){
      float output[] = new float[2];
     
      for (int j = 0; j < hiddenLayers; j++){
         float sum = 0f;
         
         //Apply weights to inputs
        for (int i = 0; i < neurons; i++){
            sum += weights[i][j] * input[i];
         }
         
         //Add bias
        sum += weights[neurons][j];
         
         //Send to hidden layer and apply sigmoid
        hlayers[j][HIDDEN_SUM] = sum;
         hlayers[j][HIDDEN_OUT] = sigmoidActivation(sum);
      }
     
      //Apply weights to outputs
     for (int j = 0; j < hiddenLayers; j++){
         output[OUTPUT_SUM] += hlayers[j][HIDDEN_OUT] * hlayers[j][HIDDEN_WEIGHT];
      }
     
      //Apply bias 2 and apply sigmoid
     output[OUTPUT_SUM] += hlayers[hiddenLayers][OUTPUT_SUM];
      output[OUTPUT_OUT] = sigmoidActivation(output[0]);
     
      System.out.println("SUM: "+output[OUTPUT_SUM] + " OUTPUT: "+output[OUTPUT_OUT]);
      backPropagate(output, input);
     
      return output;
   }
   
   public void backPropagate(float[] output, float[] input){
      float error = getError(output[OUTPUT_OUT], idealOutput);
      float outDelta = getLayerDelta(output[0], error);

      float[] gradient = new float[hiddenLayers];
     
      System.out.println("Error is at "+error);
     
      //Now we back propagate to the output
     for (int j = 0; j < hiddenLayers; j++){
         //float hiddenDelta = (sigmoidDerivative(hlayers[i][HIDDEN_SUM]) * hlayers[i][HIDDEN_WEIGHT]) * outDelta;
       
         gradient[j] = outDelta * hlayers[j][HIDDEN_OUT];
         
         float newWeight = (learningRate * gradient[j]) + (hlayers[j][HIDDEN_WEIGHT] * hlayers[j][HIDDEN_OLD_WEIGHT]);
         
         hlayers[j][HIDDEN_OLD_WEIGHT] = hlayers[j][HIDDEN_WEIGHT];
         hlayers[j][HIDDEN_WEIGHT] = newWeight;
      }  
     
      for (int j = 0; j < hiddenLayers; j++){
         for (int i = 0; i < neurons; i++){
             float newWeight = (learningRate * gradient[j]) + (weights[i][j] * weightHistory[i][j]);
             weightHistory[i][j] = weights[i][j];
             weights[i][j] = newWeight;
         }
      }
   }

   public float getError(float output, float idealOutput){
      return (float) output - idealOutput;
   }
   
   public float getLayerDelta(float sum, float error){
      return -error * sigmoidDerivative(sum);
   }
   
   public float sigmoidActivation(float x){
      return 1f / (float) (1f + Math.exp(-x));
   }
   
   public float sigmoidDerivative(float sum){
      return (sigmoidActivation(sum) * (1f - sigmoidActivation(sum)));
   }
}


Here's the output when tested:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
Commencing test...

Initializing network.

Overwriting weights for control variable.

Recalling [1.0, 0.0]

Test 0
SUM: 1.1265055 OUTPUT: 0.7551935
Error is at -0.24480653
Test 1
SUM: 0.7995221 OUTPUT: 0.68987226
Error is at -0.31012774
Test 2
SUM: 0.8105837 OUTPUT: 0.6922339
Error is at -0.30776608
Test 3
SUM: 0.80390143 OUTPUT: 0.6908084
Error is at -0.30919158
Test 4
SUM: 0.8040238 OUTPUT: 0.6908346
Error is at -0.30916542
Test 5
SUM: 0.803821 OUTPUT: 0.69079125
Error is at -0.30920875
Test 6
SUM: 0.80381775 OUTPUT: 0.69079053
Error is at -0.30920947
Test 7
SUM: 0.8038115 OUTPUT: 0.6907892
Error is at -0.30921078
Test 8
SUM: 0.8038112 OUTPUT: 0.6907891
Error is at -0.3092109
Test 9
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109
Test 10
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109
Test 11
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109
Test 12
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109
Test 13
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109
Test 14
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109
Test 15
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109
Test 16
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109
Test 17
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109
Test 18
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109
Test 19
SUM: 0.80381095 OUTPUT: 0.6907891
Error is at -0.3092109


The error is supposed to be negative in some cases, but I'm not so sure about if I did it right.

Please point out flaws, there's bound to be a bunch because of how mathematically retarded I am when it comes to calculus.

Also, few questions,

  • Can Neural Networks only learn one pattern for each network?
  • What's the point of having more than one set of hidden layer nodes?
  • Where's a good place to learn some basic Calculus fundamentals?


Thank you very much.
22  Games Center / WIP games, tools & toy projects / Re: - Space based first person shooter - Haxel on: 2012-11-01 01:37:59
Another voxel game!
With a slight twist! 
Take all of my money!

The graphics are good, and you're obviously a good coder, don't get me wrong, but maybe you should invest time in a more original idea.
Not being mean, I'm just giving constructive advice. Originality man. Originality.
23  Games Center / Showcase / Re: Base Invasion on: 2012-10-22 02:20:31
Thanks for the comments! I particularly tried to make this game because I had A LOT of fun playing Rise of Nations, Warcraft, and Age of Empires. But yeah, they aren't really popular anymore.
Well, don't forget that the sign of a good game is originality. Putting gameplay features present in every single more popular game doesn't bring people in, what does bring people in though is features not present anywhere else. Never forget that man.
24  Games Center / Showcase / Re: Base Invasion on: 2012-10-21 02:17:49
It's not bad programmatically, but I noticed a few problems that essentially rendered the game unplayable for me personally.

There are a few depth issues with buildings, (people appear under them, I used to solve this by drawing them higher than they are, e.g. their feet at their y value), and there were problems with clicking and giving commands.

To remedy the clicking/commands, I suggest broadening their click radius, displaying a notification they are selected, and also giving them a stack of commands to carry out. (You may already do this, but there seems to be no visual representation to alert me of this)

So all in all, add more visual notifications of what's going on. I usually didn't know which guy was selected, what they were supposed to do, nor what they actually were doing.

But overall, not bad man. Good job!
25  Discussions / General Discussions / Re: Java is pretty cool on: 2012-10-19 01:29:55
Lots of people get really strong opinions about the indent thing in python, but it really is one of the least interesting things about the language.  By that I'm not saying you get used to it or that you get to love it, or tolerate it or whatever, I'm saying that when you've used python for a few years, you pretty much stop noticing the whole indent thing at all.  

Python has lots of other problems besides a layout rule that some people dislike, and that includes duck typing without even so much as a keyword to distinguish introduction from assignment, fairly pokey performance, the GIL, and an intolerably over-opinionated screechy and self righteous IRC and mailing list culture.  I decided I had enough of that culture a couple years back, and while I still prototype a lot of stuff in python, I still don't have a lot of use for it in production.

When I do want lack of type declaration boilerplate plus enough syntax sugar to give you diabetes, I reach for Scala.  It's not all roses of course: scala compiles so slowly it makes C++ look zippy, but just leave the incremental compiler running and you usually do okay.


I'm googling it now. I've never heard of it.

Yeah, Python isn't bad by any means, I just honestly didn't like the way it felt, because I'm so used to more strict forms of programming, it's painful to just drop those habits. I agree with you on the users as well.
26  Discussions / General Discussions / Java is pretty cool on: 2012-10-18 03:08:14
So, I've been bro's with Java and I've been hanging out here for maybe a year or two now, and I have to say Java is great.

Recently I tried playing around with Python and C because I'm constantly reminded by older more experienced people that both are superior languages. To my surprise, C ran literally at about the same speed, and most importantly generally required longer code. Not to mention the fact I have to explicitly manage memory use. Python had its own kinks, while I personally found it better than C due to the fact it was relatively more fluent, I still found the code to look ugly. For example,

1  
2  
if a = 0: 
print "Python!"


For one, there are no brackets, but instead a single colon. I found it to bother me extremely that there was no strict closure on a piece of code, and that it kind of "hanged". I need that closure that you get with the enclosing brackets because of that simple security it gives me! Hahah. I may be wrong, there may be a way to "close" if statements that I don't know about, as I only played with Python for a day or two.

Nonetheless, not only does Java work simply, look beautiful in code, and take care of garbage for me, it also works on pretty much any device, and most of the libraries built for Java give me every option I could possibly want.

Enough advertising though, I'm done. Hahah.

Anyway, I guess all of this was leading to the question of why people seem to dislike Java so much? Most coders don't consider it a "real" programming language for some reason.
27  Game Development / Newbie & Debugging Questions / Re: Threads hanging themselves. on: 2012-10-13 00:24:28
Have you tried removing the randoms?
Yes, and it works fine when I do.

Edit: I managed to fix it. It was a problem with my loop. I replaced the one above with the one that works.

It seemed that Java wasn't breaking at the right spot, so the loop itself turned into an indefinite loop, holding up the Thread.
28  Game Development / Newbie & Debugging Questions / Re: Threads hanging themselves. on: 2012-10-12 23:48:17
After debugging to see where the thread was deadlocking, I arrived at this point inside the local map generator.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
         if (mapType == MAP_TOWN){
            int tries = 0;
            ArrayList<House> houses = new ArrayList<House>();
            int maximumHouses = r.nextInt(MAXIMUM_HOUSES);
           
            while(houses.size() < maximumHouses && tries < MAXIMUM_HOUSE_PLACE_FAILS){
               House house = new House(r.nextInt(32), r.nextInt(32), 4 + r.nextInt(16), 4 + r.nextInt(16));
               
               for (int a = 0; a < houses.size(); a++){
                  if (house.intersectWith(houses.get(a))){
                     tries++;
                     break;
                  }
               }

                  houses.add(house);
            }
           
            for (int a = 0; a < houses.size(); a++){
               map = houses.get(a).placeHouse(map);
            }
         }


According to the debugger, the locked thread had stopped at this point:

1  
House house = new House(r.nextInt(32), r.nextInt(32), 4 + r.nextInt(16), 4 + r.nextInt(16));


So, is it Random that's killing everything? It's odd because it generates a few houses before this point generally and the House constructor just sets its values to the ones passed in. I've tried slowing down the thread and it still inevitably freezes over.
29  Game Development / Newbie & Debugging Questions / Re: Threads hanging themselves. on: 2012-10-12 22:53:24
So why dont you use for(int x = 0; x < planetSize; x++){   }
I dont understand whou your using a while loop, it makes your code alot less readable.

Maybe it stops because you have x < planetsize-1 and  y < planetsize-1, you skipped the last row of the x and y.
your code just creates confusion.

Yeah, I fixed it by doing this.
I'm really inexperienced with using Threads instead of just While statements, so my dumbass thought a while statement was a must in a Thread.

I can program neural networks to learn how to speak but I can't use a thread, I feel so ignorant! Hahah

Edit:
I'm still getting hangs. I've implemented runnable and tried that as well. It still stops about a quarter in.
I'm going to try concurrent and see what that does.

Edit, Edit:
I used executorService, and it hangs too. Sad
30  Game Development / Newbie & Debugging Questions / Re: Threads hanging themselves. on: 2012-10-12 20:07:14
try to make the boolean value volatile, I find that fixes alot of problems in my threads!

If you don't know why, don't screw around with random fixes.  In this case, it's a wildly inappropriate mechanism.  First, Thread has its own completion flag built right in.  Second, if you want to take action or wait on the completion of a thread, you should be using java.util.concurrent.

In fact I'd go so far as to say if you start out with concurrency by typing T-h-r-e-a-d you are doing it wrong

I'm going to check out runnable, but I'll also read up on concurrent like you said I should. The code looks nasty because it's basically a rough draft. Usually I try to make it work, and then I clean it up so that it looks pretty. Just how I am, Hahah.

The thead looks kinda odd, using a lot of data outside the scope.
Didnt even know this would really work.
For my planet generation i made a class to do alot of diffrent stuff (implements Runnable).
You just pass some parameters like planet size and leave it alone until its done.

But about the error, finished = true; probably gets triggered, why dont you use a for loop for this, much cleaner i guess.
And these lines are still inside the loop and get triggered 55-59 times, is this supposed to?

done = true;
System.out.println("Done");

I dont know what you do on done = true, but maybe another thread stops it then?

It works great until it just stops itself. That's the thing, it's supposed to get triggered around 128 times but stops about halfway through for no apparent reason.
Pages: [1] 2 3 ... 8
 

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

The first screenshot will be displayed as a thumbnail.

BurntPizza (28 views)
2014-09-21 02:42:18

BurntPizza (18 views)
2014-09-21 01:30:30

moogie (20 views)
2014-09-21 00:26:15

UprightPath (27 views)
2014-09-20 20:14:06

BurntPizza (29 views)
2014-09-19 03:14:18

Dwinin (46 views)
2014-09-12 09:08:26

Norakomi (74 views)
2014-09-10 13:57:51

TehJavaDev (102 views)
2014-09-10 06:39:09

Tekkerue (50 views)
2014-09-09 02:24:56

mitcheeb (71 views)
2014-09-08 06:06:29
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!