Jump to content

darrenc182

Members
  • Posts

    55
  • Joined

  • Last visited

Posts posted by darrenc182

  1. I have a quick video that shows what I have been able to do with recast and detour. The first part of the video shows a character, you all might recognize him, as he first see the player, shoots at him and then tracks him down to try and finish the job. The second part of the video is basically the same thing, however there is blue mesh on the ground. The blue mesh is the navmesh that shows where the soldier can go. The barrel in the scene, breaks up the navmesh and blocks the most direct path for the soldier to go. The soldier as a result has to take a less direct route. The video can be found

    .
  2. Does anyone know how to use Detour to handle dynamic obstacles? I've been looking online in Mikko's blog however I did not get any information about it. I saw a video in this forum that was using spheres as dynamic objects and showing Detour performing path adjustments when the path is being blocked. The video I am referring to is here:

    . Any and all help will, as always, be greatly appreciated.
  3. ah sorry... when you said the decal's entity in the first post i thought you meant the pick entity that it was being attached to... not the decal itself.

     

    I would suggest that you post your code because i can free a decal just fine... i assume it has something to do with however you are creating an array of them...

     

    Here is my code for creating a decal.

    Decal = CreateDecal(pick.surface, TFormPoint(Vec3(pick.X,pick.Y,pick.Z), NULL, pick.entity), 1.0f, 0);
    EntityParent(Decal, pick.entity);
    PaintEntity(Decal, LoadMaterial("abstract::dev_decal.mat"));
    UpdateMesh(Decal);
    AddMesh(Decal, pick.entity);
    time = AppTime();
    sprintf(key, "%f", time+5000);
    SetEntityKey(Decal, "killtime", key);
    SetEntityCallback(Decal, (byte *)UpdateBulletDecalCallback, ENTITYCALLBACK_UPDATEPHYSICS);
    

     

    And here is the code for freeing the decal once the specified time has been reached.

    void __stdcall UpdateBulletDecalCallback(TEntity entity)
    {
    float time, time_value;
    str key_value;
    
    key_value = GetEntityKey(entity, "killtime");
    
    time_value = flt(atof(key_value));
    
    time=AppTime();
    
    if(time>time_value)
    	FreeEntity(entity);
    }
    

  4. You could use/copypaste the MultiTimer class from gamelib to give each decal a decaying time, and then remove them when the time has passed.

    Thanks for the reply Metatron. How do I remove the decal when the time passes. I make a call to FreeEntity when the set time expires, but that doesn't remove the decal.
  5. Decals won't disappear when freeing the entity. This use to work fine and it was the way I erased bullet decals after a certain amount of time. Does anyone know why the decals no longer disappear after the decal's entity is freed? Also is there a way to remove a decal after a certain time frame? I will post some code if needed upon request. Thanks in advance for all help and suggestions.

  6. Well, I'm still young, only 42! :)

    I started programming already before I had a computer, so I made some logic machines with LEGO elements, where you could for example drop a marble in, and the program decided from which hole the marble came out.

    My first computer at age 9 or so, was a industrial paper machine processing unit which had Nova Advanced BASIC.

    Well now I know Lumooja is almost completely out to lunch, since the math doesn't work. I thought you were serious about FORTRAN being faster then C/C++ in I/O writing, but I couldn't wrap my brain around it since you can embed assembly language into C/C++ for the most optimization and therefore the fastest possible code for reading and writing to disk. I guess in the end it depends on what functions you use for your tests, but I can't see FORTRAN being faster than C/C++ and even if it was I don't see it being faster by much.

  7. lol! Maybe apple will release a new version of their OS too, with the tagline "choose your fate..." Harold Camping will be wrong once again! Technology will end this world, not God!

    Not likely. They have Lion coming out this summer

  8. My animation is working really well, doesn't seem to be starting on the wrong frame or anything, its just an issue of the blending so it doesn't look as choppy. I still don't get what you meant about the blend. I tried setting the blend by decreasing the idle by 0.01 and increasing the walk by the same value. I also set the min/max so it would reset after it hit those values. My character just walks as normal and I really do not notice any blending. (Yes I did set the Blend parameter).

    I think your choppiness is due to how quickly you update the frame that needs to be play per clock cycle. You may need to update how you are determining when to play the next frame. The code I use to determine when to play the next frame in a sequence is below:

     

    next_frame = (AppTime() - animationStartTime) / frameSpeed;
    next_frame = fmodf(next_frame, m_fEndFrame - m_fStartFrame) + m_fStartFrame;
    

     

    frameSpeed is set to 30.0f which is how many frames to play per second.

    animationStartTime is updated by AppTime every frame

    m_fStartFrame and m_fEndFrame are the start and end frames for the current sequence.

     

    This setup works well for me and I use it for all my animations. Also I keep my blend to 1.0. I think you may be misunderstanding how the blend parameter works. From what I understand it determines how strong or fast the transition from one sequence to another must take place. I set mine to one because I want to go from one frame to another right away. I think that a blend parameter of less then one would work best in a slow motion scenario. This makes sense to me if you are playing the animation twice as slow as normal. In my case that would be playing the animation at 15 frames per second instead of 30 and setting the blend parameter to 0.5. Well hopefully that helps you out a bit.

  9. I personally want to see more 3rd party libraries implemented. Josh had mentioned that it wouldn't be too dificult for him to raise the capital to hire people. I would rather that capital be spent on implementing better 3rd party libraries.

     

    1 - Umbra

    2 - Scaleform

    3 - Purelight (included with the license. Perhaps a special deal could be made with Purelight Tech)

    4 - RakNet

     

    Why do you need any of those implemented into the engine?!?! Why can't you just include them in your game code?!?! That's one of my big problems with this engine. Things that are packed into the engine like Lua and Newton should be separate and included by the user. This allows for the engine creator to focus on what he/she does best, which would be the graphics in this case, and would allow for other people do what they do best. I would like to see the engine do terrain carving and switch to using voxels for rendering terrain. I don't really care about Anti aliasing because I think that can be done by the user and I remember hearing that when using deferred rendering anti aliasing doesn't yield great visual results. Cascade shadows is essential in this engine when working with terrain.

  10. I am wondering how I can get rid of a message box that pops up when loading a scene in 2.32 and 2.4. The message box says can't open scripts/class. I do not use the leadwerks built in lua script and therefore I don't need any scripts made by leadwerks. Is there anyway to disable it or turn off?

  11. I don't see how you could parent a mesh's vertices to a body. I think you would only be able to parent a mesh to a body. Now you could always define a mesh with the vertices that need to get parented to the body. I guess the only other option would be to do it manually. Instead of using ParentEntity and letting the engine do all of the work, you can get the body's matrix and apply it to the vertices every clock cycle or whenever it is needed. Those are my thoughts on the subject. Rick if you don't mind me asking what do you need to do this for?

  12. I am having trouble implementing vehicles using the raycast vehicle implementation with Leadwerks Engine 2.31. Below is how I am creating the vehicle:

     

           pos = EntityPosition(vehicle);
    
    if(!CreateEntity(vehicle))
    	return false;
    
    PositionEntity(vehicle, pos);
    SetBodyMass(vehicle, 5.0f);
    EntityType(m_Entity, 3);
    
    wheel[0]=LoadModel("abstract::hmmwv_tire.gmf");
    wheel[1]=LoadModel("abstract::hmmwv_tire.gmf");
    wheel[2]=LoadModel("abstract::hmmwv_tire.gmf");
    wheel[3]=LoadModel("abstract::hmmwv_tire.gmf");
    
    tire_pos[0] = EntityPosition(FindChild(m_Entity, "Tire01"), 0);
    tire_pos[1] = EntityPosition(FindChild(m_Entity, "Tire02"), 0);
    tire_pos[2] = EntityPosition(FindChild(m_Entity, "Tire03"), 0);
    tire_pos[3] = EntityPosition(FindChild(m_Entity, "Tire04"), 0);
    
    m_vVehicle=CreateVehicle(m_Entity);
    int tire1 = AddVehicleTire(m_vVehicle,tire_pos[0], 5.0f, 0.0f, 20.0f);
    int tire2 = AddVehicleTire(m_vVehicle,tire_pos[1], 5.0f, 0.0f, 20.0f);
    int tire3 = AddVehicleTire(m_vVehicle,tire_pos[2], 5.0f, 0.0f, 20.0f);
    int tire4 = AddVehicleTire(m_vVehicle,tire_pos[3], 5.0f, 0.0f, 20.0f);
    

     

    The variable vehicle stores the vehicles chassis mesh. When the vehicle is created it does one of two things. The vehicle's chassis either falls half way through the floor of my level or it bounces all over the place.

     

    This image illustrates what I was talking about with the vehicle falling half way through the floor.

    post-212-037046400 1278110224_thumb.jpg

     

    This second image shows the physics bodies for the vehicle and the vehicle's wheels.

    post-212-016516200 1278110236_thumb.jpg

     

    This final image shows the start position of the vehicle when it is created. This is the position that is received from the PositionEntity(vehicle, pos) function call.

    post-212-038641300 1278110244_thumb.jpg

     

    Here is the update code for updating the vehicle every clock cycle.

           TVec16 chassisMatrix;
    
    SetEntityMatrix(wheel[0],GetTireMatrix(m_vVehicle,0));
    SetEntityMatrix(wheel[1],GetTireMatrix(m_vVehicle,1));
    SetEntityMatrix(wheel[2],GetTireMatrix(m_vVehicle,2));
    SetEntityMatrix(wheel[3],GetTireMatrix(m_vVehicle,3));
    
           SetSteerAngle(m_vVehicle, 25.0f, 0);
    SetSteerAngle(m_vVehicle, 25.0f, 1);
    

     

    I would really appreciate any and all help with this problem because it's been kicking my butt for a long time. I don't know if it's a problem with my implementation or if it is a limitation of the vehicle implementation within the engine. Like I said any and all help to correct this problem will be greatly appreciated. Thank you in advance.

  13. Hey Josh, I just had a few ideas. What if you included GMF file export for the character shop program and maybe give the program to licensed Leadwerks engine users/owners?!?! I was also wondering if you could include the ability for the user to select what animations they want to include in their animation sequence when saving/exporting from the program?

  14. I'm getting that value and values like it from a GMF model's vertex. Is there any way to identify these values programmatically and set them to zero so I can do other calculations? Never mind, I am able to round if off to zero.

  15. Thanks for the replies you wrote.

     

    I have another question, it doesn't concern the rendering pipeline, but network, and instead of creating a new thread I thought I would post the question there.

     

    Is networking supported by the Leadwerks engine Version 2.28? If it does, is it fast or, for a multi-player only game, I would benefit more from using a network library, such as RakNet? Because I see that the commands are in the wiki, and I try to use them, but I haven't any tutorials nor proper documentation for them.

     

    I am using RakNet with 2.31 and I have a master server, master client, dedicated server and client set up for my multiplayer component. I have no idea how to use the netwerk library.

  16. I believe backface culling is done automatically by the engine before any triangles are rendered unless the material being used for the surface says otherwise. I would think that view frustum visibility testing should be done before any occlusion testing since it is cheaper then polygon occlusion testing and I believe that every model is occlusion unless otherwise stated. Octrees will be used in 2.32 but I don't remember in what capacity. Anyway hope that helps out a little bit.

×
×
  • Create New...