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 ... 102
1
Support / Re: Fog Of War Transparency With Software
« on: Today at 05:32:54 pm »
The planes are created with the Extended Primitives class. So are the ones in my test case.

2
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).

3
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.

4
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()");
     }

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

7
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.

9
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.

10
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));
}

11
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);

12
Same thread as the gameloop and just before Frame.dispose().

13
No. Do you know what I'm almost certain to be one of the causes? FrameBuffer.dispose().

14
I've tried replicating it during the game. Invariably, I will get it as I close it. Often during, but I can't seem to  cause it to happen while running. But whenever I close, there it is.

15
Support / ERROR: Texture '--*--BlittingWrapper_internal--*--' not found!
« on: October 04, 2017, 03:30:02 am »
Is this a jpct error? If so, what is it? I'm using the software renderer here.

Pages: [1] 2 3 ... 102