Jump to content

Road Kill Kenny

Members
  • Posts

    667
  • Joined

  • Last visited

Posts posted by Road Kill Kenny

  1. Hi all,

     

    I was wondering if anyone else has had this issue since the last LE update. Whenever I call the EntityCulled(TEntity, TCamera) my game crashes. I only use this in one part of my whole game for which I have not changed at all since I wrote it so I decided to do a simple test which basically consisted of the most simple thing as follows:

     

    int checker;
    TCamera cam = CreateCamera();
    TEntity cube = CreateCube();
    checker = EntityCulled(cube, cam);
    

     

    Every time without fail it crashes and points me to the EntityCulled() function... or should I say with fail.. lol.

     

    Is there an un-documented change. Is anyone else having this issue. Its just odd because it used to work perfectly for my targeting system and suddenly I can't even use it on a cube

  2. Hmm TForm Point & TForm Vector basically convert the point or vector from one objects orientation to another.

     

    So for example: Player A is in position (1,1,1) and Player B is in a position (5,7,2) relative to the global point (0,0,0)

     

    so if you use TFormPoint between Player A & B with B as the source and A as the destination point you will get the Position of Player B relative to player A and the point will be (4,6,1)

    So that the general jist of it, however that is assuming that Player A's rotation is (0,0,0) also. Its all about converting positions vectors etc. relative to certain objects.

     

    I'm not sure how you would use it to turn your fan around a new origin. Maybe others have the answer. Personally I would just have them separate and change the origin of the fan to its center. Then write some LUA for the Base that basically loads the fan when it is loaded and turns it.

     

    Hope that makes sense. There may be a better solution not sure tho.

  3. BP lua = GetLuaState();
    lua_pushobject(lua, fw);
    lua_setglobal(lua, "fw");
    lua_pop(lua,1);

     

    and so if there is an object that you load in C++ that you want to access in LUA you need to set it as global

     

    SetGlobalObject(object);

     

    Now all your LUA code should work when you load the model in c++ or via LoadScene().

  4. Basically instead of giving your camera collisions you are effectively giving your camera "sensors" instead.

     

    Using 'ray casts' or 'entity picks' you can fire out sensors to check if there is an object between the player and the camera. If the ray cast or pick hits something then you have move the camera closer by a distance. You have to calculate this distance from values you obtain from the raycast.

     

    Neway thats the jist of it though its a bit more complex than that because you have to check to a point behind the camera or else ur camera will cull a wall or something.

  5. It sounds like you are missing a file and have some code that doesn't check to see if a file was loaded. I've never heard of the engine failing to load a texture.

     

    I had 3 computers in a room, 1 on which I work on. Copied the entire folder over to the other computers without changing anything. It worked on the one with an ATI card and not on the one with the NVidea card. And of course it worked on mine which also has an ATI card.

     

    However, it failed on the one with the NVidea...... It is very odd yes I agree.

     

    I checked the file paths and I checked that all the files are there. It is not just failing to load one texture... it is failing to load every single texture for my menu system and if I look in the folder they are all there.

     

    Unfortunately this is not the problem. If it was I would be happy because I could fix it easily but alas it is not. Unfortunately I can't update that graphics driver right now because that computer is somewhere else. I'm hoping its just an isolated issue.

  6. I have been told by a few that possibly it is a problem with the latest NVidea driver. Apparently the new beta NVidea driver fixes this. Haven't been able to confirm.

     

    Either way I don't think you should need to download a beta driver to solve this. Hopefully doesn't happen too often. Kinda makes me think the current NVidea driver should be beta lol.

     

    Will let you know what happens when I try it.

  7. Ok but it's not the abstract path that is the problem. This has worked in the past on many other machines and I haven't changed the abstract path since then.

     

    GPU is NVidea 8600GT 512MB with the latest NVidea drivers. I have heard that that driver has had problems causing things to crash just wondering if that is the case.

     

    The attached file basically shows a whole bunch of failing texture loads. The paths that the textures are being found from are exactly right. I checked them manually.

     

    p.s. these are textures for a menu so no material files

     

    Engine.rar

  8. Hi I am having an issue sometimes when copying my game to by another computer.

     

    When I run the .exe it fails to load all the textures and then crashes because it tried to use a texture that failed to load. I don't understand why its not loading the textures because after looking in the folder the textures are in the exact file path mentioned in the console.

     

    Here's the wierd thing, it doesn't do this when I copy it to my Wife's computer and in the past I have copied the game to my Brother's computer and the same textures have successfully loaded. In fact I just tested that old exe which used the last Leadwerks build and it worked. However, I have not changed the abstract path or in fact anything to do with these textures since the last time. Could it possibly have something to do with the latest LeadWerks release?

     

    Any help is greatly appreciated.

     

    P.S. Mine & my wife's computer have ATI cards and my bro has an NVidea

  9. Is there a way to calculate how much the controller actually moves in a given frame? I know for example sake you say 7m but that would be a variable speed given speed of the app right?

     

    How would I do that? Would I have to calculate the move variable that passes to the controller and if so what is that calc? Using any sort of MoveEntity or PositionEntity would stop the physics on it. Maybe we don't care for such a small amount but could that cause issues somehow?

     

    I really wish LE had a MoveTo type of method :)

     

    yeh AppSpeed()...

     

    Well It depends how you move your controller. I don't use the LE Controller so I'm actually moving my controller by a physical distance every frame * AppSpeed()... Hence you calculate the '7m' by getting your distance*AppSpeed(). I'm not sure I know how the LE controller works but you could find out what the rate of movement at 60fps and then that would be your distance.

     

    Didn't have time to read what Aily posted though. I've never actually done this. It's just how I would attempt to do it.

     

    P.S. because the controller goes the same speed up hill and down and flat... you may want to not find the Entity distance in 3D space but rather in 2D space from top down.... as in the Z & X planes only.

  10. It still just boils down to one guy who probably has only been there a few months and just works 9-5, and probably doesn't give a **** what his cliffs look like, he just wants to pay his mortgage. Per capita, large companies have much lower worker efficiency.

     

    So true.

  11. Say you have 30m between nodes... and for example sake your controller moves 7 m per frame because your computer is going slow so we get some psuedo code like this:

     

    1. Get distance between player and next node

    2. If 'distance' >= 7m, move player 7m towards node goto step 5.

    3. else 'remainder' = 7-'distance'. Move controller forward by 'distance' (eg.28m in and only 2m to go to 30m so move forward 2... remainder = 7-2=5)

    4. Point controller to the next node in the list and Move controller forward by 'remainder' (eg. move controller 5m towards the next node)

    5. end

     

     

    That should do the trick.

  12. I gotta agree. Its a pretty darn nice day/night cycle.

     

    I do like how you have coded the camera to move like the player is stepping. Can't stand static fps cameras well done.

     

    Also good job on all that technical behind the scenes stuff with the shaders and custom rendering and all. I have noooo idea where to start when it comes to that stuff.. hehe maybe someday I'll learn it.

  13. Judging by the closer cliff in the foreground it looks like specific models placed on top of a terrain. I wouldn't imagine you could achieve the same look with the LE Terrain editor without adding models to it.

  14. I wasn't talking about the horizon.

     

    post-312-0-75062600-1325914885_thumb.jpg

     

    I say the exact same thing as my last post..... I know thats what you were talking about. I thought you meant the horizon as well.

     

    If you want you can add more if statements in that to smooth out that transition. Ultimately it is inevitable but you can smooth it out..

  15. Hi Andy,

     

    I simulated drag on a vehicle that I was doing in Leadwerks some time ago.

     

    The equation in your first post is correct. You just have to assume and approximate a lot of the variables.

     

    D = Cd * A * .5 * r * V^2

     

    Cd - Look up some standard coefficients of drag and pick one

    A - estimate the average facinga area of your model. Approximate is ok remember.

    V - well you can get that. Its simply the velocity of your object.

    r... ah remind me what this one is

     

    anyway all you have to do is get the opposing vector to the direction of travelt (i.e. a nomralized and negative velocity vector) and then apply the force D that you get from the approximate equation to your object.

     

    Now if you don't get a good result.. play around with Cd & A values till it looks right.

     

    P.S. I like the screenshot of your game on your blog. You're getting a nice natural look there :(

  16. Hi Kevin,

     

    You need to play around with the distance values (fCurrent) in this section and the negative values following fDDY to get it right for your scene.

     

     

    if(fCurrent<=0.5){                                                                                      
           fEdgeDepth = clamp((fDDX + fDDY - 0.001) * 10.0, 0.0, 1.0);
    } else if(fCurrent>0.5 && fCurrent<=5.0){
           fEdgeDepth = clamp((fDDX + fDDY - 0.02) * 10.0, 0.0, 1.0);
    } else if(fCurrent>5.0 && fCurrent<=9.0){
           fEdgeDepth = clamp((fDDX + fDDY - 5.0) * 10.0, 0.0, 1.0);
    } else if(fCurrent>12 && fCurrent<=15.0){
           fEdgeDepth = clamp((fDDX + fDDY - 7.0) * 10.0, 0.0, 1.0);
    } else if(fCurrent>25 && fCurrent<=28.0){
           fEdgeDepth = clamp((fDDX + fDDY - 12.0) * 10.0, 0.0, 1.0);
    } else {
           fEdgeDepth = clamp((fDDX + fDDY - 20.0) * 10.0, 0.0, 1.0);
    }      

     

    Generally when you use a comic shader you want to use assets that compliment it. Grass is not the best type of thing to use with a comic shader and tree's not so much either. You may notice the lack of trees in games like borderlands. As comic shaders generally simplify the look in an artistic way you sort of have to simplify your scene a bit to suit. Ideally you don't want the comic shader to work on the grass because it is too detailed but this shader applies the comic look to everything. I'd imagine you'd need a material shader for something like mesh_diffuse_bumpmap_specular_comic.frag .... or something like that. However this shader applies the effect to everything. I'm not a shader programmer so I'm not sure how to do that.

     

    Concerning the big line in the distance. All you have to do is make your horizon 'non-flat'. I can't imagine that you would make a game with a flat environment anyway. This should avoid the line. playing with the numbers above as I said will help with too.

  17. Hi Clackdor,

     

    Very good I see you have some decent object avoidance. There are just a few things I'd like to point out. Tree of them is really easy to fix. The other not so.

     

    1. The camera can go upside down. Try limiting the X rotation of the camera

    post-3220-0-96569600-1325827933_thumb.jpg

     

    2. Your collision with the floor is very good. However you don't have many walls in your scene so you may not have noticed that if you get too close to a wall the wall disappears. I managed to position the camera against the structure to show what I mean. As you can see some of the structure is invisible and the camera is looking through this. I don't know if there are any conventional ways of solving this but I came up with a way myself. Check my youtube channel for Third Person Camera stuff I think I explain it somewhere in there.

    post-3220-0-15603900-1325827947_thumb.jpg

     

    3. What Josh said. Curve() should not be too hard to implement

     

    4. Character needs to strafe. Difficult to position the character freely without a strafe left and strafe right option.

     

    Otherwise its coming along very nicely. My camera is not perfect but I think it is good enough for now and I'll make it better after I program some gameplay. I'd suggest just do points 1, 3 & 4 and then move on to something else for now. Point 2 will be necessary in the long run but its not generally a quick fix and may take some time.

  18. but if it uses Lua as 3D Game Studio use it :

    each entitie have some action function that is called every frame so i'll instead use Lua only indeed :)

     

    You can kinda do that already in LE2..... not that I'd recommend it for a whole game though.

  19. For sculptris, you should tru it one day !

    All people having tried it have been very happy , it's very simple to use, it have great basic tools, and your surface can be like you wan tany time, no

    constraint like it was before Zbrush R2 ! And you have a tool to reduce polygons on surface also.

    You go very fast , if you need you can continue hight detail in Zbrush !

    And indeed i use Retopology , but with 3D Coat that have the better i've seen for the price, and it's very very fast , specially with tools like the lines drawing for

    example or the auto Quad creation, the last version have also som auto retopology.

     

    If you have time , just search on youtube for Sculptris tutorials, and 3D Coat retopology.

     

    Ok, you have bones sepcially to attach by code the weapons and shield ?

    I would be interested in that "attaching" code when you'll reach that part of programming :)

     

    Have a look at the Octopus in my DP. That was done in sculptris. I already have it. I also already have 3D Coat and use it a lot. lol

     

    Here is the code for attaching:

    http://www.leadwerks.com/wiki/index.php?title=Entities#FindChild

    http://www.leadwerks.com/wiki/index.php?title=Entities#GetEntityMatrix

    http://www.leadwerks.com/wiki/index.php?title=Entities#SetEntityMatrix

    http://www.leadwerks.com/wiki/index.php?title=Entities#EntityParent

     

    lol nothing fancy

  20. I agree its is Free, and my only prefered tool to rig, animate and do solid or low poly modeling.

    For Characters i use Sculptris , and sometiems my Zbrush licensed tool.

    But Sculptris is the best if you don't need to go in crazy details (pipeline Sculptris -> Zbrush exist with export / import in Obj format and now with "Goz" directly).

     

    So do you plan some special editor to define the offset for attaching points, or will it be to objects to attach to have some bone at the right place ?

     

    1. Unless you are doing a lot of retopo then you pretty much can't use sculptris to do your modelling because you would get way too many poly's. Also why would you bother with Scuptris if you have Zbrush?

     

    2. No I don't plan on some special editor to define offset for attaching points. It is totally not necessary and would complicate things. Basically I will just attach armour to my rig in separate files and it will be loaded into position and animate with the character no probs. As far as attaching weapons is concerned its even easier. I made bones in my rig that don't deform the body. These bones are weapon bones.All I need to do is copy the entity matrix of the weapon bones to my weapon meshes and then parent the weapon to the weapon bone. No need for an editor.

  21. I could be wrong, but i think that AppTime() just returns the system time (time in milliseconds since startup).

     

    Yes it does. And it loops at some number but I can't remember what that number is.

  22. Sometimes some of us prefer to put all time on game creation and gameplay than coding.

     

    Are u serious dude?

     

    How do you think game creation and game play is achieved? Yes the answer is coding. It certainly as hell is not with the artwork.

  23. We just have now to make some clothes and accessories :D

     

    Well until my game mechanics and coding are well implemented he's probably gonna stay naked. I will probably give him a texture and with that some underwear for now hehe. For my game players will be able to switch armour and weapons etc. Therefore S.Generic Man will just become my base male character. probably will also make S.Generic Woman too but Also need to do more coding.

     

    BTW I made a running sequence. Took me ages to get it nice and smooth where it actually looks like he's running and not stomping around really fast. Been tweaking it for ages and had to re order my rigging hierarchy to make it better. But its coming along and I implemented the running and idle animations into my game. I think I'm going to code some of the animation as well to get a more natural look. By that I mean things like tilting the whole body when running and turning at the same time to make it look more dynamic.

×
×
  • Create New...