Jump to content

Guppy

Members
  • Posts

    775
  • Joined

  • Last visited

Posts posted by Guppy

  1. [...] and I don't know how to test this.

     

     

    [...]If you want to play along you can experience it your self by running;

     

    LC_NUMERIC=en_DK.UTF-8 steam steam://rungameid/251810
    

     

    or even;

     

    LC_ALL=en_DK.UTF-8 steam steam://rungameid/251810
    

     

     

    if it fails you may have to install aditional code pages.

     

    [...]

     

    I'd be happy to supply a test map, but it would just look like I drunkenly entered random numbers, run the editor with the above LC values instead.

     

     

     

    It's a total non-issue on Windows and Mac, it just works.

     

    Have you actually tried exiting the editor, deleting the settings and then changing the system numeric format to have use period ( . ) as 1000 seperator and comma ( , ) as decimal seperator ?

     

    Because the problem seems to be that there is no conversion from local input to what the editor uses internally - heck it even seem to save it in local format.

  2. I don't know if the grenade will actually work. The animation includes the grenade being thrown, which makes it not very useful right now...

    You perfer it explode without being thrown? Outch

  3. Just copy the code from the C++ source files of a Lua project and replace the C++ source files in your C++ project with the ones from the Lua project, then use the normal App.lua file from a Lua project and edit it as you please, this would make it behave the same way as a Lua project but you'd still be able to code C++ in your project.

     

    This is what I did, I find it works the best.

    Oh I honestly didnt even look for that do not make much sende for the c++ code to be there, but very handy that it is :)

  4. In an effort to keep thing simple I decided to try and move my entire game loop to lua rather than c++.

     

    Unfortunately it seems that this file isn't called from the c++ version - I get why as it would duplicate functionality.

     

    But even so I wanted to do it, the plan was;

     

    Enity* app;
    
    bool App::Start()
    {
       /* set up anything that lua migth need */
       app = Pivot:Create();
       app->CallFunction('Start');
       //Attach 'scripts/App.lua' to app here
       /*extra c++ stuff that lua dont care about here*/
    }
    
    bool App::Loop()
    {
       if ( !app->CallFunction('Loop') ) { return false; }
    
    }
    

     

    But as far as I can see there is no possible way of attaching that script?

     

     

    I may be braving uncharted waters here, but I think it should be possible to use the C++ version as "lua version with c++ stuff added in"

    • Upvote 1
  5. Additional information about the driver ( it's the "fglrx-updates" that is distributed with ubuntu, ie what 90% using ubuntu and AMD cards will be using )

    $ fglrxinfo
    display: :0  screen: 0
    OpenGL vendor string: Advanced Micro Devices, Inc.
    OpenGL renderer string: AMD Radeon HD 6800 Series 
    OpenGL version string: 4.3.12798 Compatibility Profile Context 13.35.1005
    

  6. My code boils down to this;

     

    in C++

    Leadwerks::World* world = Leadwerks::World::GetCurrent();
    Leadwerks::Entity* e=world->FindEntity(EntityName);
    if ( output ) {
    e->CallOutputs(EntityFunction);
    }else{
    e->CallFunction(EntityFunction);
    }
    

     

     

    in the first lua script

     

    function Script:TestOutput(event)--out
    print("[Lua] TestOutput");
    if ( type(event)=="table" ) then
    print ( "TestOutput has event data")
    end
    self.component:CallOutputs("TestOutputxx")
    end
    

     

    in the 2nd lua script

    function Script:TestInput(event) --in
    print("[Lua] TestInput");
    if ( type(event)=="table" ) then
    print ( "TestInput has event data")
    end
    end
    

     

     

    Calling the function TestOutput works - it ends up calling TestInput, but when I try to skip the middle man and call "TestOutputxx" notting happens.

     

    Is that a bug or am I missing something?

     

     

    ps. code tags are murdering my indentation - sorry about that

  7. No dice, not exactly. There's a few issues.

    First, there's no diffuse+normal+alphamask.shader, only a diffuse+normal+specular+alphamask.shader

    Second, while it solves the issue of the background (which is now fully transparent) disappearing, the transparent aspects of the textures now disappear as well.

    Example.

    Probably because the shader is discarding those pixels.

    Ideally though, it should have a slight transparency for those textures, basically like this.

     

    Leadwerks doesn't support true alpha transparency on models - only what is essentially 1 bit transparency ( think GIF vs PNG ).

    This means that a pixel is either fully there or fully not there.

    What the shader does is take a cut off value like say 50% transparent and discards all pixels that are below this value and draws the ones above - so you cannot have semi transparent objects like you wanted above.

     

    As I understand this is a technical limitation of the engine.

     

    Because your UI is essentially an overlay you can still do it with a bit of trickery tho, every frame;

    1. first render you UI to texture keeping the alpha values.
    2. Wait for the engine to be done drawing ( context.sync() iirc )
    3. Draw a quad ( tristrip/vert buf/etc ) on top of everything ( in orthomode) with the correct blending mode using the texture you created in step 1
    4. set blend & perspektive mode back to defaults

×
×
  • Create New...