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

Pages: [1]
1
Projects / Re: Ninja Wars Multiplayer RTS [jPCT, JGN, 3DSoundSystem]
« on: August 05, 2009, 12:25:52 am »
Thanks for trying it out  :D

I've fought against myself many times as well XD.. it really isn't fun. Trying to find people to play against is really hard I've found.

Sorry about the in-game help, it was yet another thing I had to scrap because of time constraints  :-\

2
Projects / Ninja Wars Multiplayer RTS [jPCT, JGN, 3DSoundSystem]
« on: August 02, 2009, 09:37:36 pm »


Hi. This is a project I did for a game programming course at my university. I had originally planned to have single player campaigns where the computer would use a genetic algorithm to evolve it's AI, but the AI took too long to train and I ran out of time.. Hence, the game is multiplayer only ;)

Anyway, Ninja Wars uses jPCT for rendering, JGN [http://forum.captiveimagination.com/index.php/board,4.0.html]
for networking and 3DSoundSystem for music and sound effects. It has only been tested on Windows XP. It may have bugs since I had to rush at the end to finish it in time...

Additional Controls:
F3 - shows debug info
F8 - toggle sound on/off
F9 - money+resource cheat ;D

You can try it out via webstart here: http://hsaka.webs.com/lib/ninjawars.jnlp

3
Support / Re: Rotated Blitting
« on: April 22, 2009, 10:47:05 pm »
Changing to Overlays would not be a problem, in fact, I probably should have been using Overlays in the first place.

Thanks a lot Egon.

4
Support / Re: Rotated Blitting
« on: April 22, 2009, 08:45:22 pm »
Thanks for the quick reply Egon.  :)

5
Support / Rotated Blitting
« on: April 22, 2009, 08:34:58 pm »
Hi,

Is it possible to incorporate a rotation when blitting? For instance, something like :

Code: [Select]
public void blit(Texture src,
                 int srcX,
                 int srcY,
                 int destX,
                 int destY,
                 int sourceWidth,
                 int sourceHeight,
                 int destWidth,
                 int destHeight,
                 int transValue,
                 boolean additive,
                 java.awt.Color addColor,
                 float rotationAngle)

Also, does jPCT use a textured plane in the background when blitting or does it blit directly to the screen?
Thanks in advance.

6
Support / Re: Texture Opacity
« on: April 16, 2009, 09:21:59 am »
Thanks Egon.

In the former order, the map was blitted with transparency, so that was why I could still see the planes through the map even though the map was being blitted on top of the planes.

7
Support / Re: Texture Opacity
« on: April 16, 2009, 02:06:53 am »
Thanks for the quick answers guys.

As it turns out, I was drawing in the wrong order. I had something like this:
Code: [Select]
buffer.clear(java.awt.Color.BLACK);               
world.renderScene(buffer);               
world.draw(buffer);               
buffer.update();
...
currentMap.render(buffer);

Now I've changed it to this:
Code: [Select]
buffer.clear(java.awt.Color.BLACK);               
world.renderScene(buffer);   
currentMap.render(buffer);           
world.draw(buffer);               
buffer.update();
...

Is there any problem if I do this? Then reason I ask is because my map will now not show for a short while (I suspect until all the Object3Ds in the world are displayed), and this:
"renderScene: When using the OpenGL renderer, this method has to be called at least once before blitting into the OpenGL FrameBuffer will work correctly. If you are not abusing jPCT as a pure 2D blitting engine, then this shouldn't be a problem anyway."

Quote
Why is the building a plane at all? Why don't you blit it like the rest of the map?
I'm building a 2D RTS, and I'd like the buildings to be built anywhere on the map, and I think I'm pretty close to abusing jPCT as a blitting engine  ;D

8
Support / Texture Opacity
« on: April 15, 2009, 08:08:57 am »
Hi. I have a tile map made by blitting a set of textures onto the screen. I'm trying to place a textured plane onto the map. The texture image is a png file with an alpha channel:
http://img12.imageshack.us/my.php?image=build1.png



I use this to create the texture:
Code: [Select]
game.getTextureManager().addTexture("build1", new Texture("res/build1.png",true));
I'd like the opaque areas of the texture to remain opaque on the textured plane. However, this is what I get:
http://img12.imageshack.us/my.php?image=83972871.png

Code: [Select]
plane.setTransparency(-1);
http://img22.imageshack.us/my.php?image=76106834.png

Code: [Select]
plane.setTransparency(0);
http://img11.imageshack.us/my.php?image=43452437.png

Code: [Select]
plane.setTransparency(0);
plane.setTransparencyMode(Object3D.TRANSPARENCY_MODE_ADD);

Any help will be appreciated.

Pages: [1]