oh ok thanks. also, is there a way to add lighting to an animated object? When I add a light it seems still objects get affected but if I have an object that has an animation sequence it doesnt get affected by the light?
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.
Show posts MenuQuote from: EgonOlsen on July 05, 2010, 05:41:43 PMOh so it looks like u might be right. When I export 3ds from diffuse maps it renames the jpg files because their filename is too long but it doesnt do that with the paint maps, which means maybe it doesnt export the materials with the paint maps at all.
I'm not sure if this is actually a jPCT or 3ds related question. If it's the latter, maybe it can be solved by a differentn exporter setting that converts the paint map into something else!?
Quote from: EgonOlsen on February 15, 2010, 08:39:44 PMWell I don't mean my objects move in the wrong direction but you can see like stuttering/rubber band type thing (very small, but noticeable) if an object is say for example running in changing circles/curves (not sure if its a problem in a constant circle) as opposed to a straight line. That site jayderu linked, the first 2 choices on there are basically what I have tried (kind of combination of the two, i send the points each time and then use the velocity in between to keep the object moving in the same direction). However, that site basically says they both suck and to use cubic splines. Before that, though, I'm just gonna try to send the positions faster than 50 ms, since u said u do 30ms and thats almost double as fast as 50ms.
Robombs sends every 30ms if possible. I've never noticed a problem with entities moving in directions in which they shouldn't unless the lag is really bad. All the bots are running on a separate client too, which uses the same time interval to synchronize with the server and the other clients (including the local one) and that works fine...![]()
Quote from: paulscode on February 08, 2010, 03:12:18 PMhey I just noticed in the api doc it says:
In the game I'm currently working on, for collision between enemy ships for example, what I did was to iterate through the list of ships setting check_others and check_self to test them one at a time. The time required is similar to sorting a list I think, so I don't know how well this would work for a huge list of objects. It works well in my case, anyway. I'd be interested to see if there is another way to do this, too.
public static void pickingObject(int mouseX, int mouseY){
SimpleVector ray=Interact2D.reproject2D3D(Main.world.getCamera(), Main.getBuffer(), mouseX, mouseY);
int[] res=Interact2D.pickPolygon(Main.world.getVisibilityList(), ray, Interact2D.EXCLUDE_NOT_SELECTABLE);
if (res!=null) {
Object3D selection = Main.world.getObject(Interact2D.getObjectID(res));
System.err.println(selection);
if(selection.getClass().equals(NPCObject3D.class)){
System.err.println("OPEN_CHAT_WINDOW WITH " + ((NPCObject3D)selection).getNpcName());
}
}
}
Quote from: EgonOlsen on February 06, 2010, 08:21:35 PMHi can you explain what you do? Is it better than sending the rotational matrix and the translational matrix (what is position vector is that just sending the position itself instead of the translational matrix, and it has the same result but requires less bandwidth?) ?
For my game Robombs, i'm doing just that. I'm transfering a matrix and a direction as well as a position vector for each object. I'm transfering the rotational part of the matrix only (i.e. the upper 3x3 matrix), which results in 9 floats plus the direction/position vectors with 6 floats. So it sums up to 15 floats/object. Because in Robombs some objects never rotate, i'm treating the identity matrix as a special case and transfer a magic number instead, which means that those objects only need 7 floats. I'm zipping the final data set and transfer it. It's all in the sources: http://jpct.de/download/robombs_src.zip
I'm not saying that this is the best way, but it seems to work reasonable well.
Page created in 0.024 seconds with 10 queries.