Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (491)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
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: Question about Multi-Threading and Working Together on: 2012-03-31 05:15:48
Hey guys thanks for the responses!

Yeah the Thread.yield() was just thrown in becasue I thought it would pause the thread and lower CPU usage but it sounds like that wouldn't be a good idea Smiley

Currently looking at concurrent threads. I'll update this and post back on how I restructure things.
2  Game Development / Game Play & Game Design / Question about Multi-Threading and Working Together on: 2012-03-27 22:59:03
Hey guys, I'm pretty far into making a networked top-down shooter but I feel that my code has begun to suffer from crude code done by myself to keep the code working together on different threads. In simple terms, here's the main concern: I have a thread (clientListener) that receives messages from the server and that will thus have to interpret those messages. I have a main class called Main (clever eh?) that contains the main game loop and the menu system for connecting to the desired server. My problem is that I need to find out on the main thread if the client was accepted by the server which would be on the main thread to figure if it should then prepare the screen for running the game. What is a good way to do so?

Here's the current code running on the main thread
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
clientListener.setupForWait(); // Resets the waitingForResponse, acceptedByServer, etc...
statusLabel.setText("Contacting server....");
               
while(clientListener.waitingForResponse) { Thread.yield(); }
               
if(clientListener.acceptedByServer) {
   // Removes all of the connect components
  // Will load map instructed to by server and display that
  this.removeAll();
} else {
    statusLabel.setText("Rejected from Server: "+clientListener.reason);
}


It works, but it seems ugly. Any suggestions?
3  Games Center / 4K Game Competition - 2012 / Re: Bounce 2 the End on: 2012-02-09 23:12:15
Thanks!  Smiley Glad to see it's turning out well.

I think that I will change the enter and r keys to mouse buttons instead. It would be nice not to have to use the keyboard. All that's left now is to finish making the levels I guess and fixing any more bugs I find.
4  Games Center / 4K Game Competition - 2012 / Re: Bounce 2 the End on: 2012-02-09 00:26:50
Runs too fast to really see what's going. You should probably limit updates per second Tongue Also my balls(squares?) sometime flew outside the window and I couldn't finish the level. Otherwise promising looking game Smiley

Really? It does have a frame limiter, not sure why it's doing that to you. Oh and I probably should have included that R resets the level.

I slowed it down a bit more and added in a result screen (I think that's what you mean by too fast). I also tested it on a different computer and it ran fine. Might have been a bug in my frame limiter first time around Smiley
5  Games Center / 4K Game Competition - 2012 / Re: 4Kanvas - Online Voxelediting on: 2012-02-08 05:28:04
Nice! Always wanted to do this kind of graphic perspective but never got the time to sit down and learn about it. Solid job so far, online editing would be really fun like minecraft Smiley
6  Games Center / 4K Game Competition - 2012 / Re: WIP 4k Wargame on: 2012-02-08 05:26:25
I played a little war game before similar to what this one looks like and it was quite fun. Keep it up!
7  Games Center / 4K Game Competition - 2012 / Re: Bounce 2 the End on: 2012-02-08 05:24:24
Alright, after coding into the night (and having school tomorrow Tongue) I was finally able to put together a working demo of the game in its current state with 6 levels to play with that sample most of the concepts.

http://drsnipe.byethost10.com/Bounce2TheEnd.html

Enjoy, and let me know of any bugs or suggestions you may have Smiley
8  Games Center / 4K Game Competition - 2012 / Bounce 2 the End on: 2012-02-07 00:45:14
Alright, so I haven't been too active around here but I have been working on a submission to Javak4k. I originally found this forum and competition last year but I was too late to join so here I am this year.

This whole game is basically using physics to get your box to bounce the orange box into the circular goal. You must do this while staying under or at a certain par.



Completed:
- Rendering
- Level Loading
- Collision (I believe)

To Do:
- Fix physics
- Add in an easter egg Smiley
- Finish making levels

http://drsnipe.byethost10.com/Bounce2TheEnd.html


Any comments or questions are welcome Smiley
9  Java Game APIs & Engines / JOGL Development / Holes in Textures on: 2011-11-07 15:22:21
Alright, so in my engine there is a texture 512x512 that is being used on a map of points 512x512. The problem lies when the heights of the points are changed, the texture seems to not stetch to fit the change in height. The texture then appears see through and you can see the rest of the map. Is there a specific property I need to set for the texture?

The rendering 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  
gl.glNewList(listNumber, GL.GL_COMPILE);

   texture.enable();
   texture.bind();
   
   gl.glBegin(GL.GL_TRIANGLES);
   for(int z = 0; z < 512; z++)
   {
      for(int x = 0; x < 512; x++)
      {
         gl.glTexCoord2f((float)x/texture.getWidth(), (float)z/texture.getHeight());
         gl.glVertex3f(x, (int)points[x][z], z);
         
         gl.glTexCoord2f((float)(x+1)/texture.getWidth(), (float)z/texture.getHeight());
         gl.glVertex3f(x+1, (int)points[x+1][z], z);
         
         gl.glTexCoord2f((float)x/texture.getWidth(), (float)(z+1)/texture.getHeight());
         gl.glVertex3f(x, (int)points[x][z+1], z+1);
         
         // ---------------------------------
       
         gl.glTexCoord2f((float)x/texture.getWidth(), (float)(z+1)/texture.getHeight());
         gl.glVertex3f(x, (int)points[x][z+1], z+1);
         
         gl.glTexCoord2f((float)(x+1)/texture.getWidth(), (float)z/texture.getHeight());
         gl.glVertex3f(x+1, (int)points[x+1][z], z);
         
         gl.glTexCoord2f((float)(x+1)/texture.getWidth(), (float)(z+1)/texture.getHeight());
         gl.glVertex3f(x+1, (int)points[x+1][z+1], z+1);
         
      }
   }
   
   gl.glEnd();
   
   texture.disable();
gl.glEndList();


Previews of the problem:

You can see what it should look like in the wireframe:


And what it looks like with the texture. You can see the rest of the map because the texture is not stretching (or whatever the problem is)


Thanks in advance
10  Game Development / Game Mechanics / Re: Applet in a JFrame? on: 2011-10-16 03:13:34
Thank you both for your replies, greatly appreciated Smiley
11  Game Development / Game Mechanics / Applet in a JFrame? on: 2011-10-10 00:44:02
Hey all, this is my first real posting so I hope that this is in the right section (typical newbie remark).

So I've been thinking about how to do this and could not really figure out how. What I want to do is allow people to have the option of playing an applet game on their desktop and not just online. Is this possible? If so, what kind of class would I need to create to properly launch it?
12  Discussions / Business and Project Management Discussions / Re: Mythology Unbound, new game in development on: 2011-09-16 02:44:47
This sounds pretty interesting. I'm interested to see how it turns out Smiley
13  Games Center / WIP games, tools & toy projects / Re: Flesh Snatcher on: 2011-09-09 02:55:06
Very nice gameplay. The effects and graphics were well done. Overall good job so far Smiley
14  Discussions / General Discussions / Re: Art of Video Games meets Minecraft on: 2011-09-09 00:41:19
That was pretty cool. Especially like the foward/reverse of the explosion Smiley
15  Discussions / General Discussions / Re: Brainstorming the future on: 2011-09-07 01:15:00
Im sorry but why I am being referred to so much? Did I do something wrong?  Huh

I've been visiting these forums for a few months now just because I think they're interesting and have been trying to get into Java game development. I'm not sure if I came off wrong by the 2 posts I've made but they were simply just to give a little feedback on other people's games. I don't believe they were negative or insulting and I'm sorry if they came off that why because I did not mean it that way.

[size=12pt]EDIT:[/size] After doing some more reading in this thread, found out it was a placeholder tag. For a minute there, I thought everyone hated me for some reason  Smiley

An admin can delete this if they want.
16  Games Center / Showcase / Re: Fuzzy - a Java Platformer on: 2011-09-07 01:03:00
Nice little game. The graphics were great and gameplay was quite solid.  Smiley
17  Games Center / Showcase / Re: Gemserk - Super Flying Thing With No Name – New game prototype on: 2011-07-12 20:37:42
Nice, played quite well  Smiley

Not sure if you know but in practice mode once you reach the other planet it doesn't do anything except keep spinning you around it. Just thought it was supposed to reset itself or send you to a new level.
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

Nickropheliac (15 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (29 views)
2014-08-22 19:31:30

atombrot (41 views)
2014-08-19 09:29:53

Tekkerue (38 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (25 views)
2014-08-16 06:20:21

Tekkerue (34 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (48 views)
2014-08-09 21:09:32
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!