Jump to content

Road Kill Kenny

Members
  • Posts

    667
  • Joined

  • Last visited

Posts posted by Road Kill Kenny

  1. Will a complete game be able to be written interely as script ?

    (For example a game having Dialog, combat, system, inventory , special effects , levels loading , game save )

     

    Is there some approximative year quarter date for some beta access for LE 2.5 owners ?

    (It is a year already since i bought LE 2.5, but i'm more 3D artist and use lot more scripting and i'm betting on LE3 new system and workflow)

     

    Apparently you can write a game entirely in script but I doubt it will be very easy and will be very messy when you try make it more than just one level that plays instantly. I personally don't see how it would be any easier to write a full architecture in script than in code as the concepts will still be the same. If you are using script to write an entire game then it really isn't script is it.. it's actually just code using a different language with all the overheads that come along with that so I don't see the point of using it for an entire game.

     

    Fact is making games is hard and although LE3 may assist in that way more than LE2 it won't magically make your game for you. I can see a lot of people being dissapointed because their expectations were un-realistic.

  2. See LE3 is like an onion...

     

    ... or an ogre

     

    @Xaron the API commands will be similar, however, as it is written in C++ and there is some new functionality, and some less :|, there will be differences. It shouldn't be too hard but definately not a "Find & Replace" Job.

  3. Also, I have come along with another problem that's unrelated, just a noob question. How do I scale the objects?

     

    In LE2 you generally need to get the scale right before conversion.

     

    However, it is a static gmf mesh then Marley Ghost once made a scale tool and uploaded it somewhere not sure atm can't find the link to the post but maybe someone else can find it. Note that this doesn't work on animated meshes with bones only static meshes.

  4. Yes you don't need to update those if you are using framework.

     

    It may look like your framerate is droping but I think it might actually just be what it is printing. Because you UpdateAppTime here and the framework does as well, it might think it is going faster than it actually is. At least that the only reason I can think why you would be getting more fps with this.

  5. It's quiet because everyones had enough of ranting about the next big thing instead of talking about game dev... And then when it comes to talking about actual game dev there isn't much to say because only some of us are actually doing it while a vast majority sit in the corner waiting for LE3 to make their life magically easy....

     

    There really hasn't been as much substance on the forum in the past many months compared to what I've seen in the past. I think this is because there are many people just sitting on their hands waiting for LE3 and not doing anything with LE2. Of course waiting is boring so the majority of posts we're getting are either whining or talking about the next best thing or something like that.

     

    So even though its quiet just recently I think its been rather down for a long time compared to the past in terms of having any substance.

    • Upvote 2
  6. Do you use the LE controller? If so there is an IsAirborne() or something like that. You could check to see if they are airborne for x seconds.

     

    That should work pretty well except that does not take into acount jumping up... say for example you jumped all that time going up contributes to the damage you take + all the time going down. In a game where you jump on jump pads and your landing is actually higher than your starting then you could still take damage with this technique. Not a problem if jumping is minimal,

     

    However, if it is an issue, You could also try recording the Z height at the beginning of being airborne and then record the Z height of when the controller is no longer airborne. Get the difference between the two and you have the height distance fallen / gained and base your damage / death off of that height difference value....

     

    However, this doesn't take into acount if you jumped up you are getting more height from your initial airborne height. This may or may not be an issue but if it is you could find the height at the peak of the jump as your first Z height and then calculate the distance..

     

    There are a range of ways to do it. Pick the one that suites the mechanics of your game and gives the best benefit cost ratio for your game.

  7. I don't see why z-sort would do that....

     

    Are you animating the props with bones or are you just using LE::TurnEntity().. I don't see why z-sort would cause the one to turn around the other if you are using the latter... and I'm not sure why it would do this even with bones.

     

    From my very limited understanding z-sorting is all about which objects to draw first so that objects closer to you are drawn on top of objects further away. I would have thought this would only affect the rendering. Then again I don't know a whole deal about the topic so maybe I'm wrong. Can't say I know exactly what z-sort = 1 in the material does have only used it a few times and for what I can't remember lol.

  8. Yes thanks a lot Daimour. It works perfectly now. Never would have thaught the win32 Api function call had anything to do with it lol.

     

    Here's the new code for that function, works the charm biggrin.png

     

    static std::string K_Win::FileOpen(){
    
      OPENFILENAME ofn;
      char fileName[MAX_PATH] = "";
      ZeroMemory(&ofn, sizeof(ofn));
      ofn.lStructSize = sizeof(OPENFILENAME);
      ofn.hwndOwner = NULL;
      ofn.lpstrFilter = "SQLite3 Files (*.*)\0*.*\0";
      ofn.lpstrFile = fileName;
      ofn.nMaxFile = MAX_PATH;
      ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
      ofn.lpstrDefExt = "";
      std::string fileNameStr;
    
      char curDir[MAX_PATH];
      GetCurrentDirectory(MAX_PATH, curDir);
    
      if(GetOpenFileName(&ofn))
         fileNameStr = fileName;
    
      SetCurrentDirectory(curDir);
    
      return fileNameStr;
    }
    

  9. Look here: http://msdn.microsof...7(v=vs.85).aspx

     

    Pre-last comment.

     

    Hmm very interesting.... and rather annoying that it changes the directory. Not sure why it does, I can't see any value in changing the working directory considering the GetOpenFileName() function returns an absolute path and not a local file name.

     

    Thanks for the info. I should be able to solve it based on that info

     

    If I use SetCurrentDirectory() immediately after GetOpenFileName() to change the directory back to the default directory then it should work.

    http://msdn.microsof...0(v=vs.85).aspx

  10. Could that "Open file..." window change current working directory?

     

    Try to load a scene with hardcoded path without opening dialog.

     

    It is impossible for this to change the path for LUA... All the open file thing is is a function that uses the Win32 API to get an open file dialog box which returns a std::string

     

    static std::string K_Win::FileOpen(){
    
      OPENFILENAME ofn;
      char fileName[MAX_PATH] = "";
      ZeroMemory(&ofn, sizeof(ofn));
      ofn.lStructSize = sizeof(OPENFILENAME);
      ofn.hwndOwner = NULL;
      ofn.lpstrFilter = "SQLite3 Files (*.*)\0*.*\0";
      ofn.lpstrFile = fileName;
      ofn.nMaxFile = MAX_PATH;
      ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
      ofn.lpstrDefExt = "";
      std::string fileNameStr;
      if(GetOpenFileName(&ofn))
          fileNameStr = fileName;
    
    return fileNameStr;
    }
    

     

    And the it is simply called like this

    lvlDat->SetLoadFile(K_Win::FileOpen());
    

     

    The lvlDat is a LevelData* class and it has no ability to change the abstract path or any other path. SetLoadFile simply changes a std::string variable in the LevelData class that is then used to open an SQLite Database and query it.

  11. Tried the AppLog(pagage.path) thing and it was identical in both instances.

     

    Abstract paths do not work with the lua 'require', hence the fact you have to have the 'Scripts' folder located within your project to access the class script. The only thing that I could suggest is to have the Scripts folder be located in your editor's executable folder and have a reference to require it in 'Start' folder. I have never gotten this error either unless my project folder was missing the 'Scripts' folder.

     

    Thanks, for this work around mack.... I put the class script in the start folder and because it loads it at start up it works... .It still throws the error when loading the scenr but it should do the trick for now.

  12. I asked about LUA-script which invokes "scripts/class". How does it do? With require command? It must be somewhere in your attached to model "gate.lua" file I suppose.

     

    I can assume only that this two cases use LUA environment with different states. And search path may be changed. You can check search path in than lua script:

    
    

    AppLog(package.path)

     

    Add this line right before "scripts/class" invoking. And watch the LOG-file. For both cases.

     

    Will try this when I get home\

  13. This is why it is wierd guys... I've done this plenty of times before scripts folder is in the right place. Abstract path is not the problem... Even if I remove that line it still does the same thing. The binaries are ain the same folder as scripts folder.. no separate folders.

     

    The paths are correct.... If they weren't it wouldn't work ever.... not just in this one instance when loading a scene. That is what makes this problem strange.

     

  14. Well I'm not sure how you have it set up... but the only difference is that you just stop animating the character once that death animation finishes instead of looping it... Do you have any more detail on the problem you are having with it? it can differ greatly between animation systems exactly how you do it.

  15. Ok so here is the source code that matters. I'm rather certain it is all correct but I'll show you anyway:

     

    LE::TFramework fw = CreateFramework();
    if(!fw)
    MessageBoxA(NULL, "Error 03: Failed to Create Framework", "Error LE-03", MB_OK);
    
    
    LE::SetAppTitle("Level Editor");
    LE::RegisterAbstractPath(K_Win::GetAppPath().c_str());
    //K_Win::GetAppPath() returns the path to the folder of the .exe application file.
    
    //Lua Setup
    LE::BP lua = LE::GetLuaState();
    LE::lua_pushobject(lua, fw);
    LE::lua_setglobal(lua, "fw");
    LE::lua_pop(lua, 1);
    

     

    Loading of the model in both instances. Note that I don't use abstract path in the C++ code at all anymore. So these arguments that may look foreign are simply absolute paths.

    //This is how it is called when loading a scene
    gateModel = LE::LoadModel((lvlDat->gameDir + lvlDat->csGatePath.at(CS_ID)).c_str());
    
    
    //And this is how it is called when simply adding to the scene
    gateModel = LE::LoadModel((lvlDat->gameDir + lvlDat->csGatePath.at(CS_ID)).c_str());
    

     

    Yes they are indeed exactly the same and the arguments calculate to be the exact same path as well granted that CS_ID is the same. These are called within a Gate class in the constructors. It has a constructor for loading from database (DDD) and a non DDD constructor for when you want to add one to the scene with default settings. They only differ slightly and in no way do they effect this LoadModel() function call.

     

    Both the game and the editor work straight out of the same folders too.. so I really have ran out of things that I can think of even trying to do that will solve this.

  16. It would be nice to see that LUA-script and that error message. Source code must say much more than video in this case.

     

    I think something wrong with paths.

     

    Try to replace relative path to script "scripts/class" with abstract one "abstract::class".

     

    The error is: "can't open scripts/class"

     

    The paths should be irrelevant as it works In all other instances as shown in the video. However, I did try abstract::class instead to no avail. If the path is the problem then It doesn't make sense that it will work one second and not the next.... with the exact same LoadModel() function call.

     

    There is no point showing you the script itself because there is nothing wrong with it. The exact same script works in the editor and in the actual game and strangely when I add objects in the editor but not when I load a level with the editor.....

  17. It is much better to check hit against some primitives not player mesh . Best practice use capsule . If you want to have check hits against all body parts then you have to make something like ragdoll and bounding box .First make check is there hit on bounding box.Only in the case if there is , then you can check which part of body.

     

    One capsule is OK , make it simple.

     

     

    Entity Picks only work on mesh / surfaces. How are you going to have a capsule mesh that isn't obscuring the model..... If you hide it the pick won't work.

     

    I think you've confused this with body collisions.

×
×
  • Create New...