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

Pages: 1 ... 5 6 [7] 8 9
Support / small collision detection problem
« on: December 14, 2005, 04:46:31 am »
hello egon, thanks for answering so quickly...(must be midnight in germany :? )
The direction is the south compared to the first orientation of the model...
I can rotate the model without problem, and this rotation will affect the direction but whether i push forward or backward, the model will always go more or less south (depending on the z axis of the object)...
Here is the constructor. Maybe it can help:

Code: [Select]

public Player(Object3D obj, WorldInterface worldInterface, String playerName){
super(obj); // the md2 object
this.setRotationMatrix(new Matrix());

this.worldInterface = worldInterface;
this.playerName = playerName;

this.keyMapper = worldInterface.getKeyMapper();
this.terrain = worldInterface.getTerrain();
this.theWorld = worldInterface.getTheWorld();
SimpleVector v = this.getTransformedCenter();
this.myLight = theWorld.addLight(v, 0f,0f,0f);

And here is the code i call in my game loop to update the model

Code: [Select]

if (mainPlayer){
   x = this.getTransformedCenter().x;
   z = this.getTransformedCenter().z;  
   moveModel(); // basically it calls the correct function depending on the keys pressed detected in poll()
placeModel(); // in my previous post

Maybe it is related with getTransformedCenter().z?


Support / small collision detection problem
« on: December 13, 2005, 10:48:45 pm »
Hello, long time i haven t post anything... I m back on my jpct project and try to fix some small bugs.

I have this one:
When i want to have some gravity effects, I use this lines (more or less taken from one of JPCT demos
Code: [Select]

public void placeModel(){
SimpleVector dropDown = this.getYAxis();
Matrix rotMat = this.getRotationMatrix();
distanceToGround = terrain.calcMinDistance(this.getTransformedCenter(), new SimpleVector(0,1,0), 4*30);
if (distanceToGround!= Object3D.COLLISION_NONE){

It makes me the model fit perfectly with the ground but  it also affects my movements (i.e. whether i push forward or backward,  i always go in the same direction)

Here are my forward and backward functions :

Code: [Select]

private void moveForward(){
SimpleVector a = this.getZAxis();
a = this.checkForCollisionEllipsoid(a,ELLIPSOID_RADIUS, 5);

    private void moveBackward(){
SimpleVector a = this.getZAxis();
a = this.checkForCollisionEllipsoid(a,ELLIPSOID_RADIUS, 5);
animating = true;

When i suppress the following lines from my placeModel function, i have no problem with my movements, but (of course) no gravity. Do you see where my mistake is?

Code: [Select]

terrain.calcMinDistance(this.getTransformedCenter(), new SimpleVector(0,1,0), 4*30);
if (distanceToGround!= Object3D.COLLISION_NONE){

Support / about md2 and texture generation
« on: November 11, 2005, 11:26:03 pm »
Does anyone know a good md2 modeler and, more important, a freeware to redesign the texture of a specific md2 model?
I heard about milkshape...


Support / error loading in Linux
« on: November 11, 2005, 10:16:09 am »
My app runs a AWTGLCanvas... I didn t try with something else... What i suspect is that maybe an openGL driver for the video card is missing. I contacted the administrator of my univ and he was unable to answer me :?
I will check with a friend of mine who frequently deals with MESA on similar computers at my univ. And i will come back to you once i will have the answer.
I think it must be a crappy thing somewhere in my config...


Support / error loading in Linux
« on: November 10, 2005, 10:14:09 pm »
hello, I just tried to load my jpct application on a linux computer (for the first time at my university and i got the following exception. This application works just fine on a windows computer.

Code: [Select]

Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: org.lwjgl.LWJGLException: Could not create a direct GLX context
        at org.lwjgl.opengl.AWTGLCanvas.paint(
        at org.lwjgl.opengl.AWTGLCanvas.update(
        at sun.awt.RepaintArea.updateComponent(
        at sun.awt.X11.XRepaintArea.updateComponent(
        at sun.awt.RepaintArea.paint(
        at sun.awt.X11.XComponentPeer.handleEvent(
        at java.awt.Component.dispatchEventImpl(
        at java.awt.Component.dispatchEvent(
        at java.awt.EventQueue.dispatchEvent(
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(
        at java.awt.EventDispatchThread.pumpEvents(
        at java.awt.EventDispatchThread.pumpEvents(
Caused by: org.lwjgl.LWJGLException: Could not create a direct GLX context
        at org.lwjgl.opengl.LinuxContextImplementation.nCreate(Native Method)
        at org.lwjgl.opengl.LinuxContextImplementation.create(
        at org.lwjgl.opengl.Context.<init>(
        at org.lwjgl.opengl.AWTGLCanvas.paint(
        ... 13 more

I know this is a LWJGL error but do you have any idea?

Projects / ┐how much pleople still using jpct?
« on: October 21, 2005, 08:29:07 pm »
And i have to say that your project rolz is terrific... In itself it is a proof that jpct is very well done (congratulation Egon)... 2 or 3 years ago, i didn t thought something similar would be so easy to implement in JAVA (well in fact it s not that easy).
I m a graduate student and i m assistant professor for JAVA programming in my university... When I have shown your results (paranoid or technopolis) to my students, that gave a boost of motivation to many of them....
But i think what is really missing for helping the JPCT community to grow is a step by step tutorial whether we have the code of the FPS, or the car example, or the forum...
It appears that sometime some features are difficult to manage and it results in posting 3-4-5 times the same question...
 All of us are busy and have jobs... maybe a thread to discuss about that possibility (which content? how to organize it?) or maybe a wiki could be interesting. Currently i m too busy to launch such activity, but to my level i would gladly participate.
What do you think about that?

Projects / ┐how much pleople still using jpct?
« on: October 21, 2005, 01:37:35 am »
I do.... when I have time

Feedback / Lights
« on: October 05, 2005, 07:55:48 pm »
Hello, I have noticed in my application that there was a limit to the number of lights I can add in a scene (around 40 if I remember).
I suppose there is a way to redefine this limit but I wasn t able to find it.
How to do that?


Projects / Technopolies
« on: September 28, 2005, 01:45:52 am »
Yep, happy Birthday.... Libra rulez!  :lol:

Projects / Dissapointed
« on: September 27, 2005, 04:07:46 am »

Concerning your collision detection and how to do it in a online multiplayer environment, we already had such discussion with rolz and Egon in the technopolis thread (down of the page):
(there are also some posts before and after this page)I strongly suggest you to work again with ellipsoid detection, maybe modifying the size of the ellipsoid to fit better to your model.

Concerning your main question, I use prototyping which is more or less what rolz suggests (but I don t trust every recommandations concerning Xtreme programming, that s why I say "more or less"). You begin by doing a simple working system, and then step by step, you improve it and make it more complex.

If you want to do multiplayer online game, you should also look at the nio package of java and how to use channels, creating non blocking servers..., which is very useful for systems with high scalability.

And don't forget, "Never give up, never surrender" (I heard that in a stupid movie).

Good luck,


Projects / aptal karga (foolish crow)
« on: August 08, 2005, 09:19:21 pm »
Very nice! And yes... transparent panels are addictive :lol:

Projects / Technopolies
« on: August 02, 2005, 09:44:43 pm »
just to say that your screenshot is amazing Rolz... Very good work


Projects / Technopolies
« on: July 29, 2005, 12:17:05 am »
yes it s the algorithm I m using...  
And i suppose i will open my own thread one day but, cause i m doing this stuff for my students researches (it s not a game whereas it looks like it), I can t explain all the objectives of my application. That s why I haven t opened a thread for the moment... And I have to found a name for my project before :P But thanks for all your help anyway.


Projects / Technopolies
« on: July 28, 2005, 11:23:01 pm »
In fact this is the technopolis forum.... so i will stop sending screenshots not related to it
sorry...  :oops:


Projects / Technopolies
« on: July 28, 2005, 10:23:22 pm »
i did a small test today concerning collision detection. I was afraid that if two objects could move to the same position, they could block each other (some kind of "collision deadlock") and when you would like to move them in another position, they would detect a collision and refuse to move...
I have access to many computers. so I logged 2 clients side by side and make the two avatars run on the others.  I did this test many times and they never blocked... So i think i will keep my solution unchanged unless i see a "deadlock"... Maybe if the lag is bigger, it could happen.



PS : here is a small image of what my project looks like now

Pages: 1 ... 5 6 [7] 8 9