Jump to content

Guppy

Members
  • Posts

    775
  • Joined

  • Last visited

Posts posted by Guppy

  1. Right here.

     

    http://store.steampowered.com/news/15512/

     

    You can check your steam.sh file to see if you have it already. The naughty line now checks if $STEAMROOT is empty.

     

    # Check before removing
    if [ "$STEAMROOT" != "" ]; then
    rm -rf "$STEAMROOT/"*
    fi
    

    will still fail if $STEAMROOT is one of

    • .. ( optionally with /.. added ad-nauseum )
    • one or more spaces
    • ~

    and properly a host more

     

    readlink -m $STEAMROOT

     

    or realpath if available on the system side steps this issue by resolving the actual path first and then you can see if your someplace stupid like root, the root of your user dir ( ~ ) etc...

     

    not sure how to alert value to the problem tho

  2. Nice function, a little critique

     

    wrt the main function "GetEntityNeighborsViewCone(entity, raduis, scriptOnly, angle)"

     

    assuming that "angle" is the apex angle ( it the angle of the pointy bit of the cone ) and that "raduis" is not the radius of the cone but rather the radius of the circle of interest (ie the height of the cone)

     

    Might I suggest that it be changed to

     

    "GetEntityNeighborsViewCone(entity, angle, height, scriptOnly)"

     

    To keep the optional parameter at the end where it belongs and also keep the cone definition together.

     

     

    For "WorldGetEntitiesInAABBDoCallback"

    a cleaner solution would be to pass the global parameters as a table ( tables in lua are passed by reference always so changes to it will be reflected in the variable of the calling function ) using the "extra" field like so

     

    local extraParameters={
     table={},
     entity=entity,
     scriptOnly=scriptOnly
    }
    

     

    It just removes an error source in case you start using it for both players and mobs ( concurrency, interrupts, etc )

  3. Guppy, you're my hero.

     

    Any idea how to pass a C++ context to Lua?

     

    I'd like to be able to draw in either C++ or Lua.

     

    Same with window.

     

    As already pointed You dont really want to pass those as getCurrent work in both cases, also passing anything other than simple types is error prone.

     

    Window:GetCurrent()

    http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/window/windowgetcurrent-r628

     

    Context:GetCurrent()

    http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/context/contextgetcurrent-r632

     

    The bitbucket link has examples of passing data in both directions as well as calling lua functions from C++ and vice versa, but as I said it will require some digging as it's a more or less complete gui

  4. Does anyone have any experience/examples/documentation on the Interpreter class?

     

    What would you like to know?

     

    Here is an example of pushing data from C++ to lua;

     

    http://www.leadwerks.com/werkspace/blog/138/entry-1288-pushing-complex-lua-tables-from-c/

     

    If your up to digging through C++ code there is some examples of going in both directions here https://bitbucket.org/guppy42/cppandluatest (be ware this project is semi-retired)

     

    Finally the c++ source code for the lua version is in the source folder of any lua project you create - you can take that and replace your app.h/c++ of your c++ project and it will work exactly like the lua project - except for any changes you make

  5. a few things to help you debug;

    • Did you infact start a new C++ project?
    • Are you editing the correct map? ( just opening a new project in the editor wont change the map for reasons unkown )
    • Are you using the FPS prefab? ( in this case you need to remove the camera in the C++ code or it wont work )
    • Have you compiled BOTH the debug and release version of the source?

    As for the map needing to be called start.map - look for theese line in the App.cpp file;

    std::string mapname = System::GetProperty("map","Maps/start.map");
    Map::Load(mapname);
    

  6. Wow that looks amazing.

     

    And because purely positive feed back is useless here are a few nitpicks: wink.png

     

    1) The lighting on the model doesn't do it justice it is for instance impossible to see any detail on the neck. Here is a tip from photography - since rending a showcase model is pretty much the same thing

     

    3-point_setup.gif

    http://mrstromain.files.wordpress.com/2014/02/3-point_setup.gif

     

    2) shine (specularity?) map

     

    the leather bits ( small bags, shoes ) it seems unlikely that a guy that scruffy takes the time to do a mirror polish on his boots and belt bags every morning ;)

     

    The bagpack looks a but like plasic, again dampening the shine will help.

     

    The shine on the hair makes it look waxy, if he is to be used for 3rd person this will become very anoying after a while.

     

     

    The face colour seems a little bland you might want to add a tiny smidge of shine here ( just dont overdo it or he will end up looking greasy )

     

     

    Over all I'm extremely impressed - I've seen people who sell their models who didn't look half this good.

    • Upvote 2
  7. Google for "visual studio project header search paths" leads to this answer;

     

    in the Visual Studio C++ Include directories under Tools | Options | Projects and Solutions | VC++ Directories

     

    I am however unable to verify the solution as I have no windows machines at my disposal

×
×
  • Create New...