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 ... 3 4 [5] 6 7 ... 48
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!

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) {

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

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.

Projects / Re: Flier Match
« on: October 21, 2008, 04:38:31 pm »
 :-[ :-[

The problem about not being shot from the camera center was a problem when modeling the bullet. It was moved a bit from the center. Anyway rotating it the PI/2 over the Y axis was helpfull too. Now the bullets are being fired correctly.

Now my problem is that they doesnt fire any collision event. I added a collisionListener to the bullets but they does not fires the event. I have used the collision listener before when moving the crafts on the server but when shooting the bullets on the client they dont.


When I create the bullet I add the colissionlistener, the bullet and the map has CHECK_SELF | CHECK_OTHERS as the collision mode. I am calling the checkforcollision and checkforcollisionelipsoid methods and they doesnt fire any event. The project is posted at:

Egon, can you please replace the one in the download section with this new one, is still not finished but it is closest to be finished. And please can any one help me with the collisionListening on the bullets?

About the code: Well, I have this classes:

 - BulletThread (Thread for moving the bullets and detecting the collisions)
 - ManejadorDisparos ("ShotManager"--> add the bullets to the List of bullets to be moved, moves the loist of bullets, creates the predefined bullet types to be used in the game)
 - Disparo ("Shoot"--> Is the shot class, it has the position, direction, speed, and the bullet. Has the methods to move the bullet it has)
 - Bullet (Is an inherited class from Object3d that has the damage, type, sounds to play)

The code and var names are in Spanish and the code is a kind of messy but any help would be very appreciated. Actually the shots are being fired with the control key or the space key. They are being shoot from a class called ManejadorEventos an the end of the method EventosJuego.

Support / Re: Applet & memory concerns
« on: October 21, 2008, 04:10:44 pm »
That question has been asked before and the answer was "Becausse I want it on that way".  8)

Projects / Re: Flier Match
« on: October 20, 2008, 09:51:09 pm »
Thanks, that should solve the problem about the bullet orientation. But I am still having the problem that when setting the position of the bullet on the camera position , it is placed near but not in the exact place.

Projects / Re: Flier Match
« on: October 20, 2008, 08:48:22 pm »
Well, I exported to a md2 model as is a very simple model. I checked the model orientation inside max and seems to be well, I will post everything by tomorrow, today I am at office and forgot my pen drive.

I will check that and try to post the project tomorrow.

Support / Re: Applet & memory concerns
« on: October 20, 2008, 08:24:58 pm »
You dont have to apply the textures to the objects manually and merginh them doesnt mean using the same texture. If the 3ds file has the information about the textures to use, u just have to add the textures to the texture manager and they will be loaded on the model automatically.

dont build the object until adding it to the world.

Support / Re: Applet & memory concerns
« on: October 20, 2008, 06:45:09 pm »
for (Object3D o2 : objects) ????? I have never seen this for before, anyway.

Well, the loader3DS method loads a 3ds file into an array of Objects3D, this is becausse of the file format. each part can have a different texture inside the whole model. When you load a 3ds file into jpct you usually merge all that parts into one. and then you will have the  model loaded into an Object3D. as I see, you are taking all the subparts of the model, asigning the 1MB texture to each part and building them many before adding to the world. You should add it first and after that build it. check about the testure becausse you are applying the whole texture to each part of the 3ds file.

Projects / Re: Flier Match
« on: October 20, 2008, 04:37:27 pm »
Thats exactly what I am doing. But the bullet is rotated 90 degrees and I dont know why. another problem is that I set the initial position of the bullet on the camera.getPosition SimpleVector but is not being fired exactly from the camera position. And when I move the camera down and lookAt the old camera position I dont look ant the center of the bullet. I also checked about the pivot of the bullet and everything is right.

I will continue trying it and post the code by tomorrow to see if I can fix it on somehow.

Support / Camera getZAxis vs getDirection
« on: October 20, 2008, 03:45:42 am »
Hi, Should be the same the getDirection and the getZAxis methods? as the Z axis of the camera should be looking to the front of it. The same of getDirection.....??  ???

or getZAxis gets the projected vector of the get direction over a World plan or something? In my game I was trying to use the getZAxis for seting the direction of my shots by I had strange results like shotting the right and the bullet moving the left. shooting up and the bullet moving to down. Anyway I tested the getDirection method and worked perfectly.

Projects / Re: Flier Match
« on: October 20, 2008, 03:40:12 am »
Hi, I am having problems here. My problem is mainly that I am confused about how to set the initial position and direction from my bullets. I made some code here and there and I have now bullets being shot from my camera position "aparently". But I am having some problems, I guess I messed arround the rotation matrix of the camera and the bullets. Egon would you mind checking it a bit. Actually, I guess that is all that is missing from the client visulization. I have not added the shotting on the server yet. I just have a small code for shooting a bullet from my client. I will post the code tomorrow.

Feedback / Re: Getting some sounds!
« on: October 19, 2008, 06:30:55 am »
ok, and what about some explotion animations? Any idea?

Support / Re: Ongoing Support for jPCT?
« on: October 17, 2008, 09:38:20 pm »
Well, jpct is more a 3d engine than a game engine. I Mean, with jpct you can manage the 3d part of your project. The bullet demo uses another API for the physics and jpct for the 3d stuff. About the sound, jpct has no sound on it by now but you can of course use open AL to have audio 3d, the sound is linked to the space as you say, becausse objects that make sounds existes in the space, but inside a computer the linking is virtual. Anyway Paul Lamb (paulscode) make an audio API easy to use and 100% compatible con jpct and is free.

About getting the source code of jpct, well you cant. JPCT is not open source, is just free.

About the future of jpct well, I dont know but I discovered jpct some years ago and its an API that is always getting better so you can be sure is not a short term project.

Projects / Re: Flier Match
« on: October 17, 2008, 05:21:49 pm »
Well, I began coding this 2 days ago, I make a Bullet class, a Shot class and a movingThread for the bullets. I will have a Thread just for moving the bullets. On that way it wont depend on the speed of the rendering Thread nor on the lag from the server. I have not been at home this last 2 days (HANGOVER) but with a bit of luck I would have the basics of the shooting stuff by tomorrow.

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