Jump to content

Arska134

Members
  • Posts

    119
  • Joined

  • Last visited

Posts posted by Arska134

  1. Hello!

     

    Long time no posting. biggrin.png Ok i faced new problem with my project and i tried everything to go around it but no... :/

     

    I am trying to clear everything from memory and load new level. I know it's not best way, but everything else has failed.

     

    Problem is that when game loads second time after i cleared everything it crashes when creating new body and setting mass to it. To clear everything i have been using this "freeFramework(fw)". (Also tried to freeworld(), clearworld()) But always that body variable has been hanging around.

     

    What is best way to change level?

     

    (I am using LE2 with Blitzmax)

  2. Hello!

     

    As somebody already knows i'am programming multiplayer FPS game. I have some questions.

     

    1. When syncing multiplayer game, it's necessaey make packets to get "old". What i mean is that new players who joining to server late won't be receiving these packages. (Gunshots, chat messages, etc...) Currently i use server time to determine which packages are way too old to be happened now, but it has little problem... When server time reaches maximum value of "int", server crashes. What would be better way to do this?

     

    2. Next question is about syncing physics. How it's done in most of multiplayer games? Who calculates physics? Server or clients?

    If server calculates all physics for clients, what is best way to determine if physics entity was hit? Server side physic calculated would increase bandwidth, but it's accurate. There would be some laggy moving objects without network smoothing.

    If clients will calculate physics it can be very inaccurate, but bandwidth would be lower.

    For example if i choose to use client side calculations, how i can tell every player that something was hit, and then make it accurate as possible?

     

    So how it's best way to be done?

  3. Works nicely on my computer. Specs are in my signature. I agree with Gandi's improvement suggestions. Kind of boring when waves are coming and all i can do is watch. :D

     

    I don't play these kind games, but this is great because it's made with Leadwerks. :)

  4. Well.. i don't really know LUA, but thanks Daimour.

    If someone take a look my code and knows what problem might be. Let me know.

     

    And... how those numbers at end of the line should be set, and how do i know they need to be that way?

    CreateJointHinge( pelvisp, spinep, vec3(ppos.x,ppos.y,ppos.z), vec3(0,0,0 ))
    

  5. Ball Joint doesn't work properly in LE2. Try to use Hinge Joint instead.

    About CreateJointHinge... What is pin parameter and what values should i use when making ragdolls?

    Another question. Should my ragdoll work right if i only make one leg as ragdoll?

     

    I would really really appreciate some kind of example about ragdolls. I have no idea how these work.

     

     

    Edit:

    Here is my "Ragdolize" function if someone want to take a look:

    http://pastebin.com/raw.php?i=uN9xeAfK

     

    As pin parameter there is only Vec3(0,0,1) as in command example, because i don't know what it stands for.

     

    Yes, only left leg is tried to make ragdoll like.

     

    Edit 2:

    I just found that i misplaced global parameters in entityposition function. I fixed it and it looks little bit better, but it still can't be identified as human body.

     

    Edit 3:

    Looks like it's taking shape when i add more joints...

  6. This isn't right way to do ragdolls i assume...?

     

    Global ppos:TVec3
    ppos = EntityPosition(soldier)
    
    ' LEFT LEG
    LThighp:tbody=createbodysphere(.35)
    positionentity LThighp,entityposition(LThigh), 1
    setbodymass LThighp,1.0
    entitytype LThighp,1
    entityparent LThigh,LThighp
    setbodymass LThighp,10
    SetBodyElasticity LThighp,0
    
    LCalfp:tbody=createbodysphere(.35)
    positionentity LCalfp,entityposition(LCalf),1
    setbodymass LCalfp,1.0
    entitytype LCalfp,1
    entityparent LCalf,LCalfp
    setbodymass LCalfp,10
    SetBodyElasticity LCalfp,0
    
    Lfootp:tbody=createbodysphere(.35)
    positionentity LCalfp,entityposition(Lfoot),1
    setbodymass Lfootp,1.0
    entitytype Lfootp,1
    entityparent Lfoot,Lfootp
    setbodymass Lfootp,10
    SetBodyElasticity Lfootp,0
    
    LThighCalfJoint:tjoint=createjointball(LThighp,LCalfp,vec3(ppos.x+0,ppos.y+3+1.25,ppos.z+-.01))
    LCalfFootJoint:tjoint=createjointball(LCalfp,LFootp,vec3(ppos.x+0,ppos.y+3+1.25,ppos.z+-.01))
    

     

    Is there any examples about ragdolls?

  7. Alright, so i am now trying to find bones from soldier.gmf entity, but i am getting pretty strange results.

     

    This code:

    soldier = loadmesh("abstract::soldier.gmf")
    positionentity(soldier, vec3(-6, 2, 63))
    Print "X "+entityposition(FindChild( soldier, "Bip01" )).X
    Print "Y "+entityposition(FindChild( soldier, "Bip01" )).Y
    Print "Z "+entityposition(FindChild( soldier, "Bip01" )).Z
    

     

    Is outputting this:

    X 0.000000000
    Y 0.992219925
    Z -0.0203169920
    

     

    What am i doing wrong. Same thing occurs when i try to find child named "Bip01 Head".

  8. Thanks Daimour, but here is still problem.

     

    erroru.png

     

    It is pointed to this line:

     

    AddMesh(am.bullethole, spick.entity)

     

    If i change it to this:

     

    addMesh(am.bullethole, TMesh(spick.entity))

     

     

    No error, but no bulletholes either. :/

    Is this Blitzmax bug or what?

  9. I am not programming with LUA, but here is BMax code:

    am.bullethole = CreateDecal(spick.surface, TFormPoint(Vec3(spick.X, spick.Y, spick.Z), Null, spick.entity), 20.0/16.0, 32);
    EntityParent(am.bullethole , spick.entity, 0)
    PaintEntity(am.bullethole , bulletholeMat)
    AddMesh(am.bullethole, TMesh(spick.entity))
    

     

    And here is .dds and .mat files:

    http://www.mediafire...6qpqibdxq68qqx6

×
×
  • Create New...