Jump to content

Canardia

Developers
  • Posts

    4,127
  • Joined

  • Last visited

Posts posted by Canardia

  1. But someone could start a paid support hotline, if Josh doesn't mind :lol:

    Most of us here are freelancers, indies, entrepreneurs, and little teams, who are often looking for new business ideas.

     

    I see sometimes requests for code examples, but going after each such request takes a lot of time, and I want to get my own projects also done. However, I wouldn't mind to get few bucks if someone wants me to do a demo with source code. Smaller code examples are of course usually answered on the forum for free, I'm talking more about more complex demos which need several hours of work to do, even when using gamelib.

  2. When you make the leo project, does it have engine.cpp and leo.cpp in the source list?

    And when using gamelib, you need only gamelib.cpp in the source list.

     

    gamelib project:

    #include "gamelib.h"

    source list: gamelib.cpp

     

    leo project:

    #include "leo.h"

    source list: engine.cpp, leo.cpp

     

    procedural project:

    #include "engine.h"

    source list: engine.cpp

  3. You need to do:

    SetVegetationShadowMode(1);

    in your code. Editor has by default the vegation shadow mode: "sometimes" enabled, so you need to enable vegetation shadows in your code. You could also change the vegetation shadow mode in Editor to: "always", but that's not a good idea I think, because then you can't turn the shadows on/off by code.

  4. Yeah, picking up objects, moving objects, and inventory system will come to gamelib also.

     

    Although its not officially maintained by Leadwerks, you still get a tested and working library with reusable functions for your game, so you don't have to code everything from scratch.

     

    I think I'll also split gamelib into seperate class files in future, so you can use only parts of gamelib.

  5. The procedural C++ headers are the mostly for easier conversion to other languages. It would be a huge task to convert LEO to all other languages (and many languages don't even have full OOP capability), so the procedural headers are kinda like the minimum you need to convert. There is no additional maintenance for LEO, since LEO uses the procedural headers, so you would need to write the new DLL imports anyway.

  6. UPS() works also in C++, if you code your main loop correctly.

    The raw version of the main loop should be like this:

    UpdateAppTime();
    UpdateWorld(AppSpeed());
    RenderWorld();

    but since everyone should use LEO Framework, it should look like this:

    fw.Update();
    fw.Render();

  7. A convex hull has all its face normals facing outwards, so that no face normals ever intersect eachother.

    That's why you get those "shortcuts" over faces which are not convex, like on the lower left corner of the last pic.

    So the last pic is a correct convex hull, the first pic is a binary tree hull.

  8. Maybe the new Platform SDK is buggy then, I still use the Windows SDK from August 2007.

    In gamelib there is the line "#include <gl/glut.h>" that should correctly bind the opengl .lib files,

    and you don't need to do anything else to use glBegin, glEnd and such commands then.

  9. It should work, since it works in gamelib too (and gamelib is using LEO Framework):

     

    from gamelib.cpp:

    	luat.Create();					// create the LuaTools object
    luat.SetScriptObject("fw",scene.framewerk);	// set the Lua variable fw

    // Structs
    
    int LuaTools::GetStackSize()
    {
    return GetTop();
    }
    
    void LuaTools::SetStackSize( int size )
    {
    int currentsize = GetStackSize();
    if( size<currentsize )
    	Pop( currentsize-size );
    }
    
    void LuaTools::SetScriptObject( const std::string& name, BP o )
    {
    int size = GetStackSize();
    PushObject( o );
    SetGlobal( name );
    SetStackSize( size );
    }

     

    from gamelib.h:

    // Structs
    
    class LuaTools : public Lua
    {
    public:
    int GetStackSize();
    void SetStackSize( int size );
    void SetScriptObject( const std::string& name, BP o );
    };

×
×
  • Create New...