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

Pages: 1 2 3 [4] 5 6 ... 48
46
Support / Re: Problem with shooting
« on: November 11, 2008, 08:14:14 pm »
Thanks. ;D

And Yes, it may happens when the bullet or the ships moves  at great speeds, especially when they move one to each other, it may happen that. I should consider doing on that way having a max speed for a bullet considering the ship size/speed and the bullet size/speed!

47
Support / Re: Problem with shooting
« on: November 11, 2008, 05:35:41 pm »
Yes, I know that perfectly. But is about the target detection. In figure 3 the collision will be detected on the collisionListener on the ship, but the source will be the ship and the object will be ship too. In the another post before you told me that I must wait until the next bullet movement to get the next collision detection to have the objects needed to work but on the pic I am trying to show a case in which the collision is only made by the ship movement and not by the bullet movement. It was my fault to writte "NO DETECTION CASE" instead of "USELESS DETECTION CASE".

Egon, would be very very very difficult and imposible to add a:

 Object3d [] getTargets () {

 }

method??????

Sorry for being a pain in the ass!  ::)

48
Support / Re: Problem with shooting
« on: November 11, 2008, 04:25:26 pm »
Quote
If the ship moves into a bullet during the ship-move-phase, it doesn't matter, because in the next bullet iteration, the collision will be detected anyway



Yes, I was thinking on that too, but the problem is that it requires 2 movements to detectc the collision and that may result on a no detection on cases in which the bullet speed is too high. For example. (This can always happens but detecting on every movement reduces the posibilities)


49
Support / Re: Problem with shooting
« on: November 11, 2008, 03:31:27 pm »
Well, I am afarid I do not understand well what you said.

I added a new CollisionListener to each ship and bullet and the lag went to the hell, I will try what you say. but:

Quote
Not quite...if you attach the listener to the ship and the bullet moves, getObject() returns you the target,

And what if: if you attach the listener to the ship and the ship moves then getObject() returns you the target??????????

the problem is that both are moving, the bullet and the ship. first all the ships and then all the bullets, not on different Threads but anyway any of both can fire the collision.

Can you give a example about what you said before becausse I didnt quite understood.

50
Support / Re: Problem with shooting
« on: November 10, 2008, 07:07:57 pm »
Ok, I could add the listener to the ship too, but it wont change anything in that problem becausse I wont be able to know if the ship collided with an own bullet or with another one becausse Iwont be able to recognize the target. Of course that from one collision, one is the source and the another one is the target, but I cant relationate on event with the another one. Or does the Collision event has a unique numer to match?????

in my Thread. I first move all the ships, one to one, and then I move the bullets, ont to one.

But lets imagine this:

case1: Listener on the ship
Ship 1: moves and collides with Bullet 1 (I know there were a collision so I can remove the bullet from the world, and reduce the life of that ship, but as I dont know the target I cant know the kind of bullet to know: how much life to reduce and who shoted?????? and I cannot do the check for not colliding with its owner) Source: Ship1

or this another one case:

case2: Listener on the bullet
Bullet 1 moves and collides with Ship 1 (I know there were a collision so I can remove the bullet from the world and I know how much life to reduce from the target if it was a ship, but as I dont know the target I cant know the ship so I cant reduce the life to anybody and I cannot do the check for not colliding with its owner) Source: Bullet1

case3: Listener on Both, all ships and all bullet
Bullet1 moves and collide ship1 (Cant know which ship was afected becausse I cant know the target) Source Bullet 1.

I have a BulletListener class that is the collisionListener for all the Bullets, Maybe I would have to use a new CollisionCHecking class for each ship on both CLIENT and SEVER sides.  On that way I can solve the problem on case 3. I guess the only way to do it is to have exclusive Collision Checking instances for each bullet and ship in the world.
That class will hava a reference to the object, so when a collision happens I can know the objects involved. (I dont care about who was source or target, I just care about the objects involved).

Wouldnt this increase the resources needed or maybe generate a bit of lag, having a new class for each object3d?


51
Support / Problem with shooting
« on: November 10, 2008, 04:06:18 pm »
Hi again yesterday I coded a bit again on my project and I am having problems with this again. My problem is this one:


I create the bullets, set the collision mode and add a COlisionListener to them, on the client side, I move them until reaching an obstacle and then I drop the bullet from the world. My problem is, that as the bullet is shot from the craft position then it collides with their owner craft and are never shot.

I thouht about saving some information on the Bullet class to determine with craft shot it and avoid that collision to stop the bullet, but I cant determine this.

The bullet class has a String with the craft name, but when the collision is done I cant determine which object was the target of the collision generated by the bullet, so I cant know if it was the own craft or another object3d.

Would be very usefull to add a getTarget method on the CollisionListener / CollisionEvent becausse there are things that cant be done with the getSource. The getTarget should return an array with all the targets. and basicly the problem is that crafts and bullets move on the client. So, sometimes the source can be the bullet and in some other cases the source can be the craft, But I must check on somehow who was hit by a bullet. Any ideas about how to sove this?????

52
Projects / Re: SS3D
« on: November 05, 2008, 03:14:36 pm »
Well I decided not to take the images nor the maps  from a database but to save them on a web hosted visible path, and to ensure the privacy I will modify on somehow the bytes of them to make it unreadable until its loaded on the applet, and then I will fix it again.

Any way this 3d part is delayed until all the documentation and the web development is done. It wont be a big thing, so dont expect too much of it when released becausse I am very dissapointed about the project but must be finished.

53
Support / Re: sampling mode
« on: November 05, 2008, 03:08:57 pm »
BTW: Which app is it?

I am working on something via applets focused for ordinary people too. This app is about watching house plans, doing a virtual walkthrough, and making them able to change dinamicly the floors, wall, and ceiling textures to get and aproximation of the final cost of the construction project. Its a Thesis project but the 3d part is delayed until finishing all the  documentation and the web page to admin that.

Is your app something similar??

54
Support / Re: sampling mode
« on: November 04, 2008, 11:24:30 pm »
enableGLCanvasRenderer ... look at the GL word. it means it uses OPEN GL, that means hardware renderer. if you want to hace software render on a canvas just put the render stuff on the paint methos over an awt canvas. There are some examples over there. On the download section, there is a project called Maze, it was my first jpct applet, it may help you.

55
Projects / Re: Flier Match
« on: October 29, 2008, 05:20:44 pm »
mm I was thinking on this:


for each iteration the client sends an array with the events id to the server (As actually does)

the server takes that information and moves the craft inside the server World (As actually does)


But instead of sending the fixed position, rotation matrix of all the crafts, and upgrading that into the client. I will let the cliente to do the movement for about 6 or 8 iterations, and each 8 or 6 iterations I will send the fixed position and rotation Ms of all the player (Aas actually does). If not cheating then it should be no difference for the player, the position and direction will be changed only if cheating. Anyway an aimbot can always be implemented.

56
Projects / Re: Flier Match
« on: October 24, 2008, 10:58:22 pm »
Well, yes now the listener is firing the events. Thanks. I a running into a problem now. A problem os my design. Is about precision. Actually, for each iteration the client sends the events to the server and the server moves everything, so I have a defined speed for turning and moving, but in a FPS the most important thing is the presision of the movements, for example:

         A.                         B.                           C.
         |---------5f--------|----------5f---------|
         |-----------------distance----------------|


Supose my cam is lokking at A and for each event I turn certaing degree to make the camera look at C.

Then I will never be able to aim B. point.  making it turn a lower angle or move a smaller distance will make the game too slow. Any idea about this issue?

I was thinking about moving the cam a smaller angle/distance. But separating the moving thread from the networking and from the rendering threads. The problem is that letting a free independent movement
on the client will lead to cheating. Thats why evertything is controled on the server.

57
Projects / Re: Flier Match
« on: October 21, 2008, 11:06:25 pm »
Is the collisionMode keeped inside the world when serializing it?

Each tima a new player gets it, I send all the World from the server to the specified client. But I do not know if those objects inside that world will have the same collisionMode set on them.

58
Projects / Re: Flier Match
« on: October 21, 2008, 08:12:34 pm »
mmmmmmm Yes, I set The collision mode before constructing a new Bullet from the model. Well, I guess I should use a clone method the have an exact copy? I will set the CollisionMode after creating the bullet to see if it helps, I will post the results by tomorrow! Thanks a lot, and please replace the old version of my project beucasse that was a version in which nothing works! Hopefully I will finish the first realease of the game sooner. And of course after that I will have to spend some time modelling some good maps, spacecrafts, bullets, misiles, etc!

59
Projects / Re: Flier Match
« on: October 21, 2008, 08:00:40 pm »
I am adding it to the new created bullet. I have a method on the Disparo class


public void setBulletListener (BulletListener BL) {
       bala.addCollisionListener(BL);
}


here I am adding the collition listener to the new created Bullet called "bala", bala is a global Bullet var inside the Disparo class.


Here on the ManejadorDisparos class, when I add a shot to the shot list I have:

Code: [Select]
public void addDisparo (SimpleVector pos, SimpleVector dir, int tipoBala, World mundo, Camera cam) {

Bullet bala=null;
if (tipoBala==Bullet.BULLET_BALA1) {
bala=new Bullet (bala1);
}
if (tipoBala==Bullet.BULLET_BALA2) {
bala=new Bullet (bala2);
}
if (tipoBala==Bullet.BULLET_MISIL1) {
bala=new Bullet (misil1);
}
if (tipoBala==Bullet.BULLET_MISIL2) {
bala=new Bullet (misil2);
}//CREATE THE BULLET
System.out.println ("Disparo AGREGADO EN POS: "+pos+" - DIR: "+dir);
Disparo D=new Disparo (pos, dir, SoundManager, bala, mundo, cam);
                          //SHOT CREATED WITH THE NEW BULLET
D.setBulletListener (ManejadorColisionesBalas);
                          //COLLISIONLISTENER ADDED TO THE NEW SHOT
disparos.add (D);
}


May it be due to my Bullet class is a subclass of Object3D and maybe is losing the capacity of firing events???? I am just guessing!

60
Support / Re: Applet & memory concerns
« on: October 21, 2008, 04:41:22 pm »
Its okay. The search engine of the forums is not working well, and asking is the only way to get knowledgment. Feel free to ask whatever you need.

Pages: 1 2 3 [4] 5 6 ... 48