Main Menu
Menu

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.

Show posts Menu

Messages - Hsaka

#1
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


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
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
April 22, 2009, 08:45:22 PM
Thanks for the quick reply Egon.  :)
#5
Support / Rotated Blitting
April 22, 2009, 08:34:58 PM
Hi,

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

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

buffer.clear(java.awt.Color.BLACK);               
world.renderScene(buffer);               
world.draw(buffer);               
buffer.update();
...
currentMap.render(buffer);


Now I've changed it to this:

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

QuoteWhy 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
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:
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

plane.setTransparency(-1);

http://img22.imageshack.us/my.php?image=76106834.png

plane.setTransparency(0);

http://img11.imageshack.us/my.php?image=43452437.png

plane.setTransparency(0);
plane.setTransparencyMode(Object3D.TRANSPARENCY_MODE_ADD);


Any help will be appreciated.