Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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
1  Game Development / Networking & Multiplayer / Re: Servers on: 2012-11-16 06:47:58
And if you actually want your server to run stable, don't go with the cheapest one.

Linode is one I can recommend.
2  Game Development / Newbie & Debugging Questions / Re: Debug Uncaught Exceptions on: 2012-10-14 00:54:43
IIRC Eclipse does this automatically if you start the program in debug mode.
3  Game Development / Newbie & Debugging Questions / Re: Got XYZ cordinates, now I have to move it further away from its current location on: 2012-07-07 12:24:15
EndPoint + EndPoint.normalize().mul(amount)
4  Game Development / Newbie & Debugging Questions / Re: JFrame.setPreferredSize() is not working consistently on: 2012-06-23 10:10:43
What works for me is calling setSize and setPreferredSize both with same value.
5  Game Development / Newbie & Debugging Questions / Re: FPS difference on: 2012-04-10 10:24:35
Maybe the hardware graphics acceleration is enabled on your computer but not on your friend's
6  Game Development / Newbie & Debugging Questions / Re: Array of ArraList? on: 2012-03-17 20:17:24
It does work.

Initializing generic array however doesnt (T[]) which is probably what you meant.
7  Java Game APIs & Engines / OpenGL Development / Re: Where to go? Wich Java OpenGL 3D engine on: 2012-03-04 13:39:59
LibGDX sounds like a perfect choice then. It abstracts model loading and even mdl animation (+ tons of other things) but allows you to use opengl where-ever you want.
8  Game Development / Newbie & Debugging Questions / Re: java.awt.Shape and mouse event on: 2012-02-29 16:02:23
Are you having performance problems with the current solution?
9  Games Center / 4K Game Competition - 2012 / Re: Bounce 2 the End on: 2012-02-08 07:09:07
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
10  Game Development / Game Play & Game Design / Re: your turn / my turn logic on: 2012-02-07 11:18:29
1  
2  
3  
4  
    public interface State extends KeyListener, MouseListener, MouseMotionListener{
        public void next(Graphics g);   //I'm not allowed to call it Update for some reason  :(
       //Probably because of a collision with the built in function in Swing with the same name
   }

And then just register the current state as a listener and you won't have to pass events through to the current state in your state handling code.  Wink

Whaaat. I didn't know interfaces can extend multiple interfaces. Life quality improved!
11  Java Game APIs & Engines / OpenGL Development / Re: Vertex Array - beginner problem on: 2012-02-01 08:30:38
You probably missed the vertex array..
12  Game Development / Newbie & Debugging Questions / Re: Tile Map Distortion? Or just general screen distortion? on: 2012-01-30 20:25:59
Do you use lwjgl, slick or java2d? Shaders would probably do the job.
13  Game Development / Newbie & Debugging Questions / Re: Multi-Dimensional Generic Arrays on: 2012-01-29 19:41:51
http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/reflect/Array.html#newInstance(java.lang.Class,%20int[])
14  Game Development / Newbie & Debugging Questions / Re: Checking arrays equal on: 2012-01-29 19:38:15
Probably because its a multidimensional array and Arrays.equals is therefore comparing int[] array references. You could for loop through first dimension and use Arrays.equals on each second dimension array.
15  Game Development / Newbie & Debugging Questions / Re: problems with animation on: 2012-01-24 20:49:07
Unable to check the applet but I'm fairly sure the problem is that you're not using double buffering. Luckily its fairly easy to implement
16  Game Development / Game Mechanics / Re: Simple AI Programming on: 2012-01-22 20:56:15
Position += Velocity

For path finding you should probably look up A*. There is this tutorial (for tile based maps though) on kevglass's site http://cokeandcode.com/index.html?page=tutorials/tilemap2
17  Game Development / Game Play & Game Design / Re: Very slow start up on: 2012-01-21 22:21:38
Ah crap, somehow misread that they are static. They're loaded in constructor then   Roll Eyes
18  Game Development / Game Play & Game Design / Re: Very slow start up on: 2012-01-21 22:00:21
Because the images are loaded in a static initializer block before the gui is shown. You could just load them locally instead of downloading from internet  persecutioncomplex
19  Game Development / Newbie & Debugging Questions / Re: ConcurrentModificationException on: 2012-01-18 07:42:43
1  
2  
3  
public void menuInit()
{
   for (Boulder b : boulders) boulders.remove(b);


I didn't download the sources but if the loop looks like that you could use boulders.clear() instead of that.
20  Discussions / General Discussions / Re: Noticed something on minecraft.net... on: 2012-01-05 12:32:39
and 100 Guests are viewing this topic.

 Grin
21  Game Development / Newbie & Debugging Questions / Re: Runtime.getRuntime().exec in different directory on: 2012-01-03 00:02:26
Try Runtime.exec("java -jar game.jar", null, new File("game/"))
22  Game Development / Newbie & Debugging Questions / Re: Extremely confusing NoClassDefFoundError problem on: 2012-01-02 13:01:46
Eclipse somehow stops compiling classes in specific project for some weird reason (have had it a couple of times and only way to fix it was to make a new project and copy sources to it) Maybe check the errors view of eclipse because they might prevent compiling yet keep old classes there.

Edit: didn't read you confirmed the subclass files are there. Hmm, no idea then :/
23  Game Development / Newbie & Debugging Questions / Re: Sound Blocking Problem on: 2012-01-01 10:27:48
That's not a thread. You're just calling a method normally. To make it run in a thread replace
1  
soundManager.run()
with
1  
new Thread(soundManager).start();
That's not an optimal solution though because you load sounds from a file everytime you play them, thus generating massive IO traffic. Instead you should cache SoundManagers beforehand and use single instances of them from the main logic thread. And if you for some reason (there are pretty much none) decide to go with threaded way, at least use thread pools.
24  Games Center / LWJGL16k - 2011 / Re: Roll up, roll up! on: 2011-12-16 13:26:37
Yes I do
25  Games Center / Cube World Projects / Re: VBOs not working on: 2011-12-03 13:53:13
Okay solved this in IRC with assistance from ra4king and MatthiasM! In case someone in distant future reads this you need to flip the buffer as ra4king said and the VBO size must be in bytes.
26  Games Center / Cube World Projects / VBOs not working on: 2011-12-03 13:18:00
So I tried to get VBOs to work but it doesn't render anything and I couldn't find anything being the noob I am  Shocked

Here's the code for rendering a box
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  
public class TestModel implements Model {
   
   int vertexBufferID;
   
   // cube ///////////////////////////////////////////////////////////////////////
  //  v6----- v5
  // /|      /|
  //v1------v0|
  //| |     | |
  //| |v7---|-|v4
  //|/      |/
  //v2------v3
 
   //vertex coords array
  FloatBuffer vertices = BufferUtils.createFloatBuffer(3 * 24).put(new float[] {1,1,1,  -1,1,1,  -1,-1,1,  1,-1,1,        // v0-v1-v2-v3
                      1,1,1,  1,-1,1,  1,-1,-1,  1,1,-1,        // v0-v3-v4-v5
                      1,1,1,  1,1,-1,  -1,1,-1,  -1,1,1,        // v0-v5-v6-v1
                      -1,1,1,  -1,1,-1,  -1,-1,-1,  -1,-1,1,    // v1-v6-v7-v2
                      -1,-1,-1,  1,-1,-1,  1,-1,1,  -1,-1,1,    // v7-v4-v3-v2
                      1,-1,-1,  -1,-1,-1,  -1,1,-1,  1,1,-1});   // v4-v7-v6-v5
 
   //normal array
  FloatBuffer normals = BufferUtils.createFloatBuffer(3 * 24).put(new float[] {0,0,1,  0,0,1,  0,0,1,  0,0,1,             // v0-v1-v2-v3
                     1,0,0,  1,0,0,  1,0,0, 1,0,0,              // v0-v3-v4-v5
                     0,1,0,  0,1,0,  0,1,0, 0,1,0,              // v0-v5-v6-v1
                     -1,0,0,  -1,0,0, -1,0,0,  -1,0,0,          // v1-v6-v7-v2
                     0,-1,0,  0,-1,0,  0,-1,0,  0,-1,0,         // v7-v4-v3-v2
                     0,0,-1,  0,0,-1,  0,0,-1,  0,0,-1});        // v4-v7-v6-v5
 
   //color array
  FloatBuffer colors = BufferUtils.createFloatBuffer(3 * 24).put(new float[] {1,1,1,  1,1,0,  1,0,0,  1,0,1,              // v0-v1-v2-v3
                    1,1,1,  1,0,1,  0,0,1,  0,1,1,              // v0-v3-v4-v5
                    1,1,1,  0,1,1,  0,1,0,  1,1,0,              // v0-v5-v6-v1
                    1,1,0,  0,1,0,  0,0,0,  1,0,0,              // v1-v6-v7-v2
                    0,0,0,  0,0,1,  1,0,1,  1,0,0,              // v7-v4-v3-v2
                    0,0,1,  0,0,0,  0,1,0,  0,1,1});             // v4-v7-v6-v5
 
   public TestModel() {
      vertexBufferID = createVBOID();
      System.out.println("VBO id: " + vertexBufferID);
      renderToVbo();
   }
   
   public static int createVBOID() {
      if (GLContext.getCapabilities().GL_ARB_vertex_buffer_object) {
         IntBuffer buffer = BufferUtils.createIntBuffer(1);
         ARBVertexBufferObject.glGenBuffersARB(buffer);
         return buffer.get(0);
      }
      return 0;
   }

        // Helper method
  public int sizeof(FloatBuffer fb) {
      return fb.capacity();
   }
   
   public void renderToVbo() {
     
     
      ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vertexBufferID);
     
      ARBVertexBufferObject.glBufferDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, sizeof(vertices)+sizeof(normals)+sizeof(colors), ARBVertexBufferObject.GL_STATIC_DRAW_ARB);
      ARBVertexBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 0, vertices);                             // copy vertices starting from 0 offest
     ARBVertexBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, sizeof(vertices), normals);                // copy normals after vertices
     ARBVertexBufferObject.glBufferSubDataARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, sizeof(vertices)+sizeof(normals), colors);  // copy colours after normals
     
   }

   
   @Override
   public void render() {

     
      ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, vertexBufferID);

      GL11.glEnableClientState(GL11.GL_NORMAL_ARRAY);
      GL11.glEnableClientState(GL11.GL_COLOR_ARRAY);
      GL11.glEnableClientState(GL11.GL_VERTEX_ARRAY);

      GL11.glNormalPointer(GL11.GL_FLOAT, 0, sizeof(vertices));
      GL11.glColorPointer(3, GL11.GL_FLOAT, 0, (sizeof(vertices)+sizeof(normals)));
      GL11.glVertexPointer(3, GL11.GL_FLOAT, 0, 0);

      GL11.glDrawArrays(GL11.GL_QUADS, 0, 24);
     
      GL11.glDisableClientState(GL11.GL_VERTEX_ARRAY);  // disable vertex arrays
     GL11.glDisableClientState(GL11.GL_COLOR_ARRAY);
      GL11.glDisableClientState(GL11.GL_NORMAL_ARRAY);

                ARBVertexBufferObject.glBindBufferARB(ARBVertexBufferObject.GL_ARRAY_BUFFER_ARB, 0);

   }

}


To render it I simply use testModel.render()
27  Game Development / Newbie & Debugging Questions / Re: One Programinstance on: 2011-11-26 17:17:17
You're probably gonna have to use some shady Runtime.exec implementation then which is bad because debugging becomes a pain and screen just werks.
28  Game Development / Networking & Multiplayer / Re: [Kryonet] Client Listener does not react on: 2011-11-21 06:32:14
You should name your class to something else than Connection, because at the moment the received method doesn't override anything because Listener class doesn't obviously have corresponding method for receiving your Connection objects Smiley This is why suppressing warnings is bad if you don't know what they mean.
29  Game Development / Newbie & Debugging Questions / Particles on: 2011-10-29 16:42:32
So I stumbled upon this OpenGL benchmarking test that uses LWJGL.
http://www.have2chat.net/benchmark

I'm particularly interested in how was the particle swing made. It looks awesome and fairly easy to replicate but I'm not sure how.
30  Discussions / General Discussions / Re: Jagex kills reflection appearently on: 2011-10-29 16:24:13
Is that a freely available obfuscator or something they wrote themselves?
It's Jagex. Everything is in-house except javac. The obfuscator is a source-to-source compiler, which was harder to build than JL235 thinks - and if you think it would be easy, try reading the entire JLS.

That's strange because their string obfuscation is pretty much the same as Zelik klassmaster's. Also I really doubt it's source-to-source because most decompilers don't work with rs at all.

And kappa, proguard only obfuscates names and occasionally optimizes bytecode and that is very easy to bypass and make recompilable.
Pages: [1] 2
 

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

The first screenshot will be displayed as a thumbnail.

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

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

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

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

mitcheeb (55 views)
2014-09-08 06:06:29

BurntPizza (38 views)
2014-09-07 01:13:42

Longarmx (24 views)
2014-09-07 01:12:14

Longarmx (30 views)
2014-09-07 01:11:22

Longarmx (30 views)
2014-09-07 01:10:19

mitcheeb (37 views)
2014-09-04 23:08:59
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!