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

Pages: 1 ... 37 38 [39] 40 41
571
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.

572
Projects / Re: Labyrinth Z
« on: February 21, 2008, 09:38:47 am »
There look like there are some around.  I'm just not ready to check into them yet, though.  Have you tried the Eclipse editor?  That is the nicest editor I've ever used, the way it underlines mistakes and things.  The search on it is kind of complicated, though.

As an update to this game.  I've got most of the game mechanics worked out now with gravity, collision, and jumping.  Although, there is more work to do and animations to add.  It's roughed in anyway.  Pretty soon I'll be playing around with puzzle ideas.  I'm already getting some so I think this is going to be a fun project.  From what I've used of it so far, I'm pretty happy with the animation system.  It seems to allow quite a bit of control.  One complaint I have is with ellipsoidal collision.  It doesn't tell you what you collided with or that you collided at all, so I had to set up another collision to do that.

573
Support / Re: key released
« on: February 21, 2008, 03:49:11 am »
Oh, never mind.  I made a flag equal to the last state of the downPressed value and checked for a change.

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

575
Projects / Re: Labyrinth Z
« on: February 20, 2008, 07:15:01 pm »
I think an installer would take care of most problems, but I better worry about having a game to install first.

576
Projects / Re: Labyrinth Z
« on: February 20, 2008, 09:10:34 am »
I don't think a program really needs to bundle the runtime.  I think it just needs to tell you what's wrong when it can't run.  That hardly ever happens for me and java programs.  I just get some java error I don't understand, or I just see the dos box flash for about a half second.

577
Support / Re: Collision not working
« on: February 20, 2008, 09:00:22 am »
Ha, you beat me to it.  I just tried that.  That's what it was.

578
Support / Re: Collision not working
« on: February 20, 2008, 08:36:12 am »
Way in front.  He starts at the middle of the platform.  And I can walk him all the way to the other side, turn around, and he goes through.  I know the block is doing collision.  It's combined, but I can drop the mouse from high up and it will stop on top the block if I move him over to where the block is when the program starts, so the move function isn't working for some reason.

579
Support / Re: Collision not working
« on: February 20, 2008, 08:20:53 am »
He's in front of the block and walks right through it.

580
Projects / Re: Labyrinth Z
« on: February 20, 2008, 08:11:08 am »
Quote
I think it would be nice if you could write generic java code, and then with the FREE jdk distribute a file that could be run way that the user is most used to starting native programs

I agree.  There's some installers around I think, I haven't checked that out, but I don't like all this classpath stuff.  I've downloaded java jars that were supposed to be self executing and double clicked on them and nothing happens.  It's irritating.  If you don't know java, how are you supposed to know what to do with that?  I don't mind a bat file in Windows.  I haven't used it on other systems so I have no idea what they do.  The byte code, though, is a very good idea.  That way a 64 bit system can run it in 64 bit and a 32 can run it in 32 and other platforms can all read it.  In c++, you would actually have to recompile the program on every one of those systems.

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

582
Support / Re: Cloned object
« on: February 19, 2008, 08:21:24 pm »
O.K.  It wouldn't take much file space to use one object, either.  I can just reuse switches and elevators and things.

583
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?

584
Projects / Re: Labyrinth Z
« on: February 19, 2008, 04:24:03 am »
Quote
I still like XP, and when I buy a new computer I will probably use Linux.

I'd be using it right now, except I have a phone modem for an internet connection and winmodems are just better and faster than the external serial phone modems that work on linux.  There are a few drivers that some people have come up with for winmodems but not very many.  Maybe some day I'll afford high speed and then it won't be a problem.  I like Ubuntu.  I used it for about a year, and then I wanted some freebie sound software that Windows provided and went back to Windows.  I could easily do without the sound software, now, but the modem is a problem.  I didn't mind XP and it doesn't use nearly the resources, but I had a school license that expired.  I think Vista will be OK once I get another gig of memory.  An OS really isn't that important, especially with Java.

585
Projects / Re: Labyrinth Z
« on: February 18, 2008, 02:36:43 pm »
Quote
What do you mean by "Don't stab out your eye"

The colors aren't nearly as bright as Windows XP.  It's a lot softer, nice shadow effects and transparency,also.

Quote
Also, does Vists not work with almost all old hardware like I've heard?

I'm not sure about old hardware.  I have an older printer and I found a driver for it.  It's really up to hardware manufacturers to supply drivers so it's not Microsoft's fault or anything.  I've heard some complaints.  Mostly it's that games tend to run slower than in XP, which tends to get people frustrated.  I think it's mainly a memory thing.  If you have enough memory, I think it's not going to be much problem.  If I don't get at least another gig, I'm going to go crazy because I can tell it's a drag on Java also.  This game I'm working on keeps running at different speeds.  I'm sure I can put some kind of a timer on it, but it's the code from Hello World right now.  If you get it, make sure you get at least 2 gigs of memory.  But, you know, it takes Microsoft a while to get things right.  Usually by about the 2nd or 3rd service pack it's working pretty good.

Pages: 1 ... 37 38 [39] 40 41