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

Pages: 1 ... 5 6 [7] 8
91
Support / GLSL? Egon?
« on: January 30, 2009, 10:27:07 am »
I was looking over some older forum posts to see if anyone managed to get shaders going. I found a thread from feb 9,2008 mentioning that Egon was going to add support for a render path in the pipleline. Did this ever happen? do we have some form of shader support or did it require to much of a change within in the system?

92
Support / Re: Primitives and Texture Wrap
« on: January 28, 2009, 12:08:42 pm »
The calcTextureWrap-methods are not meant to create great looking results. There are more or less for creating quick and dirty u/v-coordinates only. For creating a good looking planet, you need a textured sphere build in some modeler. I've uploaded the one that i was using for the planet-applet in ASC-format here: http://www.jpct.net/download/misc/terra.asc

yeah unfortunealty I find it a bit annoying since most of my smaller game ideas use Primitive Objects :(, but hey just make to with what you got.

93
Support / Re: Brute reset
« on: January 28, 2009, 12:07:29 pm »
oh thanks for the info. I will add these remove all stuff. After looking into it some more I missed. I may or may not end up reusing them, but really I am reseting so I can just "reset" when I make changes to the script code. that way I get code changes with no compiles or restarting the app. Works like a charm now :)

buffer.disableRenderer(IRenderer.RENDERER_OPENGL);

thank you. your awesome. escpecially at this late night. it's 3am where I am :)


94
Support / Brute reset
« on: January 28, 2009, 04:39:54 am »
Hi i'm back after needing to focus on some physics issues that came up.

Ok this seems a little simple and rather brute force ish. I am trying to recreate World for an initilizing and at the moment I'm looking for the simplest removal and reinitilize.

I have done a
world.dispose();
buffer.dispose();
...
world = new World();
... redoing all everything

what happens is that I am left with the last frame and nothing updates.
I know there is updating going because my window for the 2d physics is works fine.

95
Support / Re: Camera matching Object3d Z Axis
« on: January 10, 2009, 10:21:01 am »
hmm I never thought about .addChild(). I'll try this out soon.

Though one thing I noticed. The marioObject in question is prone to the physics engine alot. So I don't actually know how much I move objects. So I tend to use .setOrigin() base on the current position the object is in the physics world.

96
Support / Re: Camera matching Object3d Z Axis
« on: January 09, 2009, 02:17:37 pm »
hmm, I thought I was clear, but clearly what I'm thinking needs to be relayed better since I don't need to fill in the blanks. Since I know what I'm thinking about :)

ok let's say I have my 2d Mario jump into the air. The camera moves up with Mario keeping Mario at the center of the screen. 2d Mario is rotated say 90 degress. So his head is now "east/right". What i'm trying to figure is how to keep the camera looking at mario, but rotate the camera so that 2d mario "appears" to be upright.

97
Support / Re: Camera matching Object3d Z Axis
« on: January 07, 2009, 12:21:36 pm »
Sorry, doesn't seem to do anything :(

Sorry it's in lua, but it's pretty basic.
Code: [Select]
   update = function()
     player = _global:get("player"); -- works
     _camera:align(player); -- no rotation when watching the object rotate. the object rotates a lot
   
     o = player:getOrigin(); -- works
     _camera:setPosition(o.x, o.y, -70.0); -- works. follows the object really well
     _camera:lookAt(player:getOrigin()); -- looks at the object really well
   end;

98
Support / Camera matching Object3d Z Axis
« on: January 07, 2009, 12:33:44 am »
Ok so things are mostly going well. Outside of the other thread.

I've tried playing around with some of the axis, vectors, alligning.... but I can't seem to figure out how to make it work.

I'm trying to get the camera Z roation(ie looking at it from a 2d perspective) to rotate with the target object. So if I flip the target object upside down through rotation. I want the camera to match. So it seems like the object always is upright.

99
Support / Re: 2D Layer?
« on: January 06, 2009, 10:28:59 pm »
awesome, thank you both very much :)

Ok last question. I'm not sure how it works. I'm asking here first because this forum is more about rotation than physics.

Is there a way to match a 2d angle to an Object3d rotation. I find that with rotation I activly rotate it by the applied value. So I can't just object3d.rotateZ(box2dBody.angle). I end up with a box spinning insanely.
I've tried applying only the difference between last and current frame. This works much better. You can't really see a problem when it's moving, but when it stops bouncing and is still. The graphical Obejct3D box is at angle with a corner sitting in the ground.

So basiclly I need to figure how to mesh the 2d.angle with a 3d.rotation or pivot.

I think this will pretty much cover it. I hope.

100
Support / Re: 2D Layer?
« on: January 06, 2009, 08:07:20 am »
Thanks for the coord listing. That will help line up with the physics engine.
So assuming we are simulating a 2d view.
X+ goes to the left.
Y+ goes down
Z+ is further into the background.
Ok got it thanks.

I'm using hardware in an applet

I have another question.
When I create an object with a 0.01 height(2d view so little depth is needed) I believe that the box, cylinder are created along the X axis. So with the camera panned out I can see very little.
What Z rotation would I need to set it perfeclty along the Z axis.

101
Support / 2D Layer?
« on: January 05, 2009, 08:37:22 am »
Ok things are going nicely. I guess :P

I'm having some other problems. So If you could bear with me.

1. What angle system does JPCT use? Right, Left? Is towards the user +Z? is in +Z +X to the right....

and more importantly

2. I am using JBox2d. I can get the physics to work and "bind" the Object3d to the Physics body. There is however a problem. In relation to 1. I don't know if i'm seeing the physics matching the 3d. So here is what i'm looking for

A layer ontop of the 3d where I can line draw the physics objects where it is transparent. That way I can maybe see somekind of merger to validate what's happening.

102
Support / Re: camera.getPosition() a copy?
« on: December 30, 2008, 06:05:15 pm »
thank you. It's helpful knowledge. I now know not to continue looking for a better solution.

103
Support / Re: camera.getPosition() a copy?
« on: December 30, 2008, 11:59:53 am »
I'm really stupid sometimes. While I can't find an ideal solution. I at least have one to avoid any memory mis management problems.

Code: [Select]
local cameraTask = luajava.createProxy("sre.util.Task",
  {
   update = function()
     position = camera:getPosition(); -- get copy? of current camera position. updating purposes
     --when updating the camera, x&y match the player. eventually
     bridge:setSimpleVector(position, 150, -60, -150); -- set the new position into the vector
     camera:setPosition(position);  --apply the vector
     
     bridge:setSimpleVector(position, 0,0,0); -- repeat above
     camera:lookAt(position);
   end
  });

I would still like to know if getPosition is a copy or if i'm doing something wrong :)

104
Support / camera.getPosition() a copy?
« on: December 30, 2008, 11:26:19 am »
ok so i'm slowly hacking away at getting my core elements going  :P

I've come across a pecularity that came up. I am using LuaJ. It has the problem that it's internvalues don't refer back to floats naturaly in it's enviroment. So if I
Code: [Select]
camera:setPosition(1.0, 2.0, 3.0); // in lua. This will fail. Ok so I came up with a solution

SimplerVector v = camera:getPosition(); //get the simplevector
bridge:setSimpleVector(v, 1.0, 2.0, 3.0);
 
this doesn't work, no error though. this is my custom class that converts the lua values to floats in the java enviro.

I can however do this
Code: [Select]
camera:setPosition(bridge:createSimpleVector(1.0, 2.0, 3.0));  this however creates a new SimpleVector

It seems that geting the camera position get's a copy not the the actual vector that camera uses. Am I doing something wrong?
Also if there is no other solution will creating a new SimpleVector per camera update cause a memory problem?




105
Support / Re: How to create an Applet
« on: November 29, 2008, 12:54:34 am »
hey Paul. I think you should put together a comprehensive jpct + applets post|tutorial. Then ask Egon for it to be stickied.

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