Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - AGP

Pages: 1 2 [3] 4 5 ... 104
31
Support / Re: Fog Of War Transparency With Software
« on: October 27, 2017, 07:13:43 pm »
Is this too big a scale for a Warcraft level, in your opinion?

Quote
************
World bounds:
X: -1133.6974, 318.40582
Y: -279.86633, 0.25386608
Z: -925.57733, 135.38232
************

32
Support / Re: Fog Of War Transparency With Software
« on: October 27, 2017, 06:50:39 am »
I got it working by calling recreateTextureCoords(). Is that costly? It seems like it would be.

Oh, and how could I come as close as possible to an orthographic view (in order to reduce the displacement between the fog and the gound)? Field-of-view? And would that be by increasing or decreasing it?

33
Support / Re: Fog Of War Transparency With Software
« on: October 27, 2017, 06:07:48 am »

34
Support / Re: Fog Of War Transparency With Software
« on: October 24, 2017, 07:34:53 am »
That's weird. The video is no longer up (I just signed in from a different computer and can't see it). I wonder if Google took it down. Try again in a few hours, please. As soon as I wake up I'll check this out.

35
Support / Re: Fog Of War Transparency With Software
« on: October 23, 2017, 05:32:54 pm »
The planes are created with the Extended Primitives class. So are the ones in my test case.

36
Support / Re: Fog Of War Transparency With Software
« on: October 20, 2017, 09:42:10 pm »
The solid-color ones are semi-transparent (and where they belong).

37
Support / Re: Fog Of War Transparency With Software
« on: October 20, 2017, 07:07:41 pm »
I tested both the application logic (by replacing them with solid-color textures) and the same loading line (TextureManager.getInstance().addTexture("fog-left.png", new Texture("Assets"+File.separator+"fog-left.png", true))). Could it be relative to the number of polygons, or the sheer scale of the world? Maybe force-sorting the transparency list would fix it. Because number of polygons and size of the world are the only two different things between my test and the actual game.

38
Support / Re: Fog Of War Transparency With Software
« on: October 19, 2017, 08:30:59 pm »
I wrote a simple test and transparency worked. So then I wrote the following method, and all I get are "End of printOddTransparencies()" prints. So now I'm stumped.

Code: [Select]
     public void printOddTransparencies(World theWorld) {
for (int y = 0; y < planes[0].length; y++)
     for (int x = 0; x < planes.length; x++)
if (theWorld.containsObject(planes[x][y]) && planes[x][y].getTransparency() != 0)
     System.out.println("Odd transparency at ("+x+", "+y+"): "+planes[x][y].getTransparency());
System.out.println("End of printOddTransparencies()");
     }

39
Support / Re: Fog Of War Transparency With Software
« on: October 16, 2017, 10:21:38 pm »
They are set to 0.

41
Support / Re: Fog Of War Transparency With Software
« on: October 13, 2017, 10:19:38 pm »
No, those are the edges of the fog of war. The fog is black, naturally.

43
Support / Re: Fog Of War Transparency With Software
« on: October 12, 2017, 07:41:14 pm »
The textures are right. I set transparency to 0.

44
Support / Fog Of War Transparency With Software
« on: October 12, 2017, 03:02:14 am »
I''m writing a strategy game and can't seem to properly paint a transparent PNG on my fog (so that its edges are rounded). The logic for the texture placement is sound and has been tested. But all I get is solid black.

Code: [Select]
if (!TextureManager.getInstance().containsTexture("fog-top")) {
     TextureManager.getInstance().addTexture("fog-top", new Texture("Assets"+File.separator+"fog-top.png", true));
     TextureManager.getInstance().addTexture("fog-left", new Texture("Assets"+File.separator+"fog-left.png", true));
     TextureManager.getInstance().addTexture("fog-right", new Texture("Assets"+File.separator+"fog-right.png", true));
     TextureManager.getInstance().addTexture("fog-bottom", new Texture("Assets"+File.separator+"fog-bottom.png", true));
}

45
Code: [Select]
     private void loop() {
....
     buffer.clear(java.awt.Color.black);
     theWorld.renderScene(buffer);
     theWorld.draw(buffer);
     buffer.displayGLOnly();
     canvas.repaint();
     Thread.yield();
}
buffer.dispose();//CAUSES THE PROBLEM
this.dispose();
buffer.disableRenderer(IRenderer.RENDERER_OPENGL);
System.exit(0);

Pages: 1 2 [3] 4 5 ... 104