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.


Topics - fireside

Pages: 1 2 [3] 4
31
Support / Converting Hello World to Applet
« on: July 25, 2008, 07:36:11 am »
I finally got a little applet running on my free website.  The next thing I'd like to do is convert the helloworld jpct software example to an applet.  Would I just drop the main function and use the init for that?

32
Support / web start
« on: July 18, 2008, 03:33:09 am »
I'm somewhat of a java dummy and I am wondering now if it wouldn't be better to start out with a web start program rather than an applet.  Is it easier to do a web start and are there any problems with using it on a freebie web page? 

33
Support / Collision Listener not working
« on: March 15, 2008, 12:28:14 am »
I'm not sure if I'm way off base trying to use the Collison Listener, but I have this class as follows:
Code: [Select]
public class Mouse extends Base implements CollisionListener {

public Mouse(Object3D obj) {
super(obj);
// TODO Auto-generated constructor stub
}

private Object3D colObj;

@Override
public void collision(CollisionEvent event) {
colObj = event.getObject();
// TODO Auto-generated method stub

}

@Override
public boolean requiresPolygonIDs() {
// TODO Auto-generated method stub
return false;
}
public void update()
{  if(colObj != null)System.out.println(colObj.getID());
colObj = null;
}

}



In the loop, I have mouse.update();

I walk the mouse around, he collides with things, but the println() command never gets called.

34
Feedback / return for ellipsoidal check
« on: March 10, 2008, 11:58:43 am »
Not sure where to put this, but it would be nice if the check for ellipsoid collision returned an array with both the new vector position and an object ID if there was a collision.

35
Support / translation and removing, replacing objects
« on: March 08, 2008, 04:04:26 am »
1.  Is there a way to move the object back to zero,zero,zero so you can translate in world space?  Once an object has been moved it gets confusing to place it in world space.

2.  What do you recommend for removing an object and putting another in it's place?

3.  There are some things in javadoc about getOrigen(), setOrigen() could this be used to reset objects to their initial positions?  I would like to reset all objects to their initial position, I guess that means I don't want to actually destroy the objects that will be replaced with other objects.


36
Bugs / collision with corner of object
« on: March 07, 2008, 03:06:44 am »
I get a repeatable collision problem when an ellipse hits the corner of an object.  It mainly affects this character when it jumps.  It sticks there, even though gravity is set and works in all other instances.




It occurs when the center of the ellipse hits the corner of the platform.

37
Support / Java suggestion needed
« on: March 04, 2008, 06:25:13 pm »
I was wondering if someone would have a suggestion for this.  My gravity objects will have an active property.  When the object is active, I want it to be tested in the game loop for gravity, but not tested when it is not active.  So, what I have in mind, but am not sure how to implement, is a container for active objects.  This would be accessible from the main game loop.  The gravity objects would add themselves to this container when they are active and remove themselves when they are not active.  How could I make these objects have access to the container in the main class?   

38
Support / Inventory items
« on: February 28, 2008, 02:06:16 am »
I'm thinking of introducing inventory items.  My first thought is to have them either real or billboarded in the upper left corner of the screen.  How would I go about doing that.  Would I parent to the camera somehow?

39
Support / setName
« on: February 26, 2008, 04:17:09 pm »
I'm not quite clear if the setName requires a unique name or not.  I'm interested in using simple collision to check for a type.  Since the ID is unique, and returned,  I can set the name to a type, and can get it that way, I think.  Will that work, or do you have another suggestion?

40
Support / extending Object3D
« on: February 24, 2008, 09:25:13 pm »
Would you give a small example of this?

41
Support / animation problem
« on: February 21, 2008, 06:03:18 pm »
I've just used a walk and stand animaton with sub sequences up till now and everything was working fine.  However I set up a jump, where the characters size is quite a bit different.  He's scrunched down now getting ready to leap.  Jpct makes garbage out of the model.  If I set the default model that loads at the start as the jump model, then it looks all right, but the stand and walk animations turn into garbage.

edit:  I might get that worked out by using more gradual changes, I'm not sure.  But I'm also getting an error for too many key frames defined when I get to the sixth one with this code:

Code: [Select]
    Mouse = loadModel("data/stand.3ds",1); 
// Object3D Mouse;
  Mouse.translate(0, -5, 0);
 // Mouse.createTriangleStrips();
TextureManager tm = TextureManager.getInstance();
    Texture tex=new Texture("data/fur.jpg");
    tm.addTexture("fur", tex);    
    tex = new Texture("data/red.jpg"); 
    tm.addTexture("red", tex);    
    Mouse.setTexture("fur");
world.addObject(Mouse);
  Animation mouse = new Animation(5);
  mouse.createSubSequence("walk");

  mouse.addKeyFrame(loadModel("data/walk2.3ds",1).getMesh());
  mouse.addKeyFrame(loadModel("data/walk3.3ds",1).getMesh());
  mouse.addKeyFrame(loadModel("data/walk4.3ds",1).getMesh());
  mouse.addKeyFrame(loadModel("data/walk1.3ds",1).getMesh());
  mouse.createSubSequence("stand");
  mouse.addKeyFrame(loadModel("data/jump.3ds",1).getMesh());
  mouse.addKeyFrame(loadModel("data/jump2.3ds",1).getMesh());

The last key frame gives me that error.  Doesn't seem like very many.  I was planning on using quite a few more animations.
OH  DUH!!!  I forgot I defined the animation size.  I'll get back on if the more gradual animations helped.

42
Support / key released
« on: February 21, 2008, 02:53:13 am »
I'm trying to figure out how to get a key released event.  I'm using code from the helloworld

Code: [Select]
   private void keyAffected(KeyState state) {
      int code=state.getKeyCode();
      boolean event=state.getState();
      switch (code) {

         case (KeyEvent.VK_LEFT): {
            left=event;
            break;
         }
         case (KeyEvent.VK_RIGHT): {
            right=event;
            break;
         }
         case (KeyEvent.VK_DOWN):{
        downPressed = event;
         }

      }
   }

A key released is false, but that's sort of a do nothing state also.

43
Support / Collision not working
« on: February 20, 2008, 06:13:02 am »
I tried doing a search for collision and came up with this function for the mouse:
Code: [Select]
private void doGravity()
{
      SimpleVector msPos=Mouse.getTransformedCenter();
      msPos.add(msHgt);
      if(world.checkCollision(msPos, dr, .6f)== Object3D.NO_OBJECT)
      {
    Mouse.translate(gravity); 
      }           
}
private void move()
{
SimpleVector a = Mouse.getZAxis();
a.scalarMul(-.15f);
a = Mouse.checkForCollisionEllipsoid(a, elipse, 2);
Mouse.translate(a);
}

The gravity part works, but the mouse walks through as in this picture:


The elipse is (2,5,2)  The five is the mouse height and works for gravity.

The platform is set for collision with this code:
Code: [Select]
    platform.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);
    platform.setCollisionOptimization(Object3D.COLLISION_DETECTION_OPTIMIZED);

I tried setting collision for the mouse but it didn't help.  I had to use -.15 in the scalermult or else the mouse went backwards.

44
Support / Cloned object
« on: February 19, 2008, 06:44:47 am »
I thought about using cloned platforms in this game to save file size, etc.  I'm wondering how this will affect performance, or what would be the best way to get good performance from a lot of cloned platforms and walls rather than a larger structure like the castle that is octree.  What do you recommend for that?

45
Support / applet site
« on: February 18, 2008, 05:13:20 am »
Out of curiosity mostly, what type of site would I need to host a game applet?  I have a phone modem so a home server is out.

Pages: 1 2 [3] 4